Skip to content

support returning mmap'ed array from memfd_create and sendfile or splice it #1619

@oech3

Description

@oech3

rustix provides safe splice(2), tee(2), etc... wrappers. But we cannot use it for operations required to modify input.
vmsplice(2) can zero-copy midified input, but it is essentially unsafe (related #1617).

But I think we can make wrap memfd_create to return mmap'ed array and zero-copy it after it was modified via array. The mmap'ed array would never cause SIGBUS since it is protected against truncation by safe wrapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions