diff options
author | delphij <delphij@FreeBSD.org> | 2017-05-31 05:10:03 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2017-05-31 05:10:03 +0000 |
commit | bfde52da67b17e680ca5da34f553788ce1cbf7ef (patch) | |
tree | 4c8a0d1953b02c05a68b3ea408e34c0d4ca31aa5 /lib/libc/sys | |
parent | 7ce24dc81f292794ddadd8289ff9cd494aa96852 (diff) | |
download | FreeBSD-src-bfde52da67b17e680ca5da34f553788ce1cbf7ef.zip FreeBSD-src-bfde52da67b17e680ca5da34f553788ce1cbf7ef.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 |