gvisor/pkg/sentry
Jamie Liu 2421006426 Implement mlock(), kind of.
Currently mlock() and friends do nothing whatsoever. However, mlocking
is directly application-visible in a number of ways; for example,
madvise(MADV_DONTNEED) and msync(MS_INVALIDATE) both fail on mlocked
regions. We handle this inconsistently: MADV_DONTNEED is too important
to not work, but MS_INVALIDATE is rejected.

Change MM to track mlocked regions in a manner consistent with Linux.
It still will not actually pin pages into host physical memory, but:

- mlock() will now cause sentry memory management to precommit mlocked
pages.

- MADV_DONTNEED and MS_INVALIDATE will interact with mlocked pages as
described above.

PiperOrigin-RevId: 225861605
Change-Id: Iee187204979ac9a4d15d0e037c152c0902c8d0ee
2018-12-17 11:38:59 -08:00
..
arch Validate FS_BASE in Task.Clone 2018-12-10 12:37:16 -08:00
context Filesystems shouldn't be saving references to Platform. 2018-12-12 17:47:55 -08:00
control Make error messages a bit more user friendly. 2018-11-01 17:40:09 -07:00
device Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
fs Move fdnotifier package to reduce internal confusion. 2018-12-14 18:05:01 -08:00
hostcpu Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
inet Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
kernel Move fdnotifier package to reduce internal confusion. 2018-12-14 18:05:01 -08:00
limits Implement mlock(), kind of. 2018-12-17 11:38:59 -08:00
loader Remove unused envv variable from two funcs. 2018-12-11 11:40:16 -08:00
memmap Implement mlock(), kind of. 2018-12-17 11:38:59 -08:00
memutil Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
mm Implement mlock(), kind of. 2018-12-17 11:38:59 -08:00
platform Add safecopy support for arm64 platform. 2018-12-10 21:35:02 -08:00
safemem Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
sighandling Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
socket Move fdnotifier package to reduce internal confusion. 2018-12-14 18:05:01 -08:00
state Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
strace Format unshare flags 2018-12-11 15:33:14 -08:00
syscalls Implement mlock(), kind of. 2018-12-17 11:38:59 -08:00
time Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
unimpl Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
uniqueid Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
usage Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
usermem Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
watchdog Dumps stacks if watchdog thread is stuck 2018-11-20 17:24:19 -08:00
BUILD Check in gVisor. 2018-04-28 01:44:26 -04:00