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.
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.