diff options
author | delphij <delphij@FreeBSD.org> | 2017-05-31 05:11:28 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2017-05-31 05:11:28 +0000 |
commit | 6486680e0a2c03d2e15ea709c3f72a9e5eac9753 (patch) | |
tree | 172a7824b227f814599d72ba5302e896968273d9 /lib/libc/sys | |
parent | aaa7bcdbf6d0aa0cfbaca2123632feee92eab69b (diff) | |
download | FreeBSD-src-6486680e0a2c03d2e15ea709c3f72a9e5eac9753.zip FreeBSD-src-6486680e0a2c03d2e15ea709c3f72a9e5eac9753.tar.gz |
MFC r315272, r315370
r315272:
Implement INHERIT_ZERO for minherit(2).
INHERIT_ZERO is an OpenBSD feature.
When a page is marked as such, it would be zeroed
upon fork().
This would be used in new arc4random(3) functions.
PR: 182610
Reviewed by: kib (earlier version)
Differential Revision: https://reviews.freebsd.org/D427
r315370:
The adj_free and max_free values of new_entry will be calculated and
assigned by subsequent vm_map_entry_link(), therefore, remove the
pointless copying.
Submitted by: alc
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/minherit.2 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/libc/sys/minherit.2 b/lib/libc/sys/minherit.2 index dc85d09..f2d437d 100644 --- a/lib/libc/sys/minherit.2 +++ b/lib/libc/sys/minherit.2 @@ -29,7 +29,7 @@ .\" .\" @(#)minherit.2 8.1 (Berkeley) 6/9/93 .\" -.Dd October 30, 2007 +.Dd March 15, 2017 .Dt MINHERIT 2 .Os .Sh NAME @@ -91,6 +91,11 @@ it will no longer be shared in the parent after the parent forks and there is no way to get the previous shared-backing-store mapping without unmapping and remapping the address space in the parent. +.It Dv INHERIT_ZERO +This option causes the address space in question to be mapped as new +anonymous pages, +which would be initialized to all zero bytes, +in the child process. .El .Sh RETURN VALUES .Rv -std minherit @@ -130,6 +135,13 @@ system call first appeared in .Ox and then in .Fx 2.2 . +.Pp +The +.Dv INHERIT_ZERO +support first appeared in +.Ox 5.6 +and then in +.Fx 12.0 . .Sh BUGS Once you set inheritance to .Dv MAP_PRIVATE |