Skip to content

[nanvix] Make map_file_cow produce RWX memory regions behind nanvix-unstable #1334

@danbugs

Description

@danbugs

Summary

Hyperlight's map_file_cow creates READ+EXECUTE memory regions (no WRITE). Nanvix's VFS/FAT32 layer requires writable memory for the RAMFS image. Currently, Nanvix works around this by copying the entire RAMFS image from the read-only MMIO region to a heap-allocated buffer on Hyperlight (see nanvix/nanvix#1729).

Proposal

Behind the nanvix-unstable feature flag, make map_file_cow produce RWX (read-write-execute) memory regions instead of RX (read-execute). This would allow Nanvix to mount the RAMFS image directly from the mapped memory without the extra heap copy.

Context

  • The workaround is in src/libs/nvx/src/lib.rs in the Nanvix repo, cfg-gated to the hyperlight feature.
  • Once this is implemented, Nanvix will revert the heap-copy workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions