syscall::flag

Constant MAP_LAZY

source
pub const MAP_LAZY: MapFlags;
Expand description

For userspace-backed mmaps, return from the mmap call before all pages have been provided by the scheme. This requires the scheme to be trusted, as the current context can block indefinitely, if the scheme does not respond to the page fault handler’s request, as it tries to map the page by requesting it from the scheme.

In some cases however, such as the program loader, the data needs to be trusted as much with or without MAP_LAZY, and if so, mapping lazily will not cause insecureness by itself.

For kernel-backed mmaps, this flag has no effect at all. It is unspecified whether kernel mmaps are lazy or not.