Skip to content

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

Closed

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.

Activity

  1. danbugs commented on Mar 21, 2026

    @danbugs
    ContributorAuthor

    Once this lands, the Nanvix-side workaround will be reverted in nanvix/nanvix#1760.

  2. self-assigned this
    on Mar 24, 2026
  3. jsturtevant commented on Jun 5, 2026

    @jsturtevant
    Contributor

    went a different direction and used Guest CoW instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

S-needs-triageThe issue has not yet been reviewed.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions