about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/bits
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-11-15 18:40:29 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-11-15 18:40:29 +0000
commitfa680dc61455acdf8779d82c6f4bba5b48935c08 (patch)
tree6fc7fa9e8c275e605ee6734a3f9f01c4a66ba8a4 /sysdeps/unix/sysv/linux/bits
parent1ba1d8a44d244110c1f8d768f098ac44351acb76 (diff)
downloadglibc-fa680dc61455acdf8779d82c6f4bba5b48935c08.tar.gz
glibc-fa680dc61455acdf8779d82c6f4bba5b48935c08.tar.xz
glibc-fa680dc61455acdf8779d82c6f4bba5b48935c08.zip
Add MADV_WIPEONFORK, MADV_KEEPONFORK from Linux 4.14.
This patch adds the new MADV_WIPEONFORK and MADV_KEEPONFORK from Linux
4.14 to bits/mman-linux.h (and bits/mman.h in the hppa case).  Note
there are further hppa MADV_* changes in 4.14; I plan a separate glibc
patch for those.

Tested for x86_64.

	* sysdeps/unix/sysv/linux/bits/mman-linux.h
	[__USE_MISC] (MADV_WIPEONFORK): New macro.
	[__USE_MISC] (MADV_KEEPONFORK): Likewise.
	* sysdeps/unix/sysv/linux/hppa/bits/mman.h
	[__USE_MISC] (MADV_WIPEONFORK): Likewise.
	[__USE_MISC] (MADV_KEEPONFORK): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r--sysdeps/unix/sysv/linux/bits/mman-linux.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h
index b091181960..78c07c890a 100644
--- a/sysdeps/unix/sysv/linux/bits/mman-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h
@@ -89,6 +89,8 @@
 # define MADV_DONTDUMP	  16    /* Explicity exclude from the core dump,
                                    overrides the coredump filter bits.  */
 # define MADV_DODUMP	  17	/* Clear the MADV_DONTDUMP flag.  */
+# define MADV_WIPEONFORK  18	/* Zero memory on fork, child only.  */
+# define MADV_KEEPONFORK  19	/* Undo MADV_WIPEONFORK.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif