ITADN

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

#1619Openoech3 创建于 2026-05-02
O
oech3commented
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 https://github.com/bytecodealliance/rustix/issues/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.
0 条评论