You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow constructing MmapRegions for non-seekable fds
vm-memory validates that the file,offset,len combination passed to a
MmapRegionBuilder is actually in bounds for the actual size of the file.
It uses `lseek(2)` for this, due to #195, however not all file
descriptors that can be mmap'd can also be lseek'd. Thus, if lseek is
not supported on a fd, fall back to using `fstat(2)` instead of lseek.
This allows mmap-ing things like guest_memfd, which does not support
seeking.
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
0 commit comments