]> sourceware.org Git - glibc.git/commitdiff
Add MADV_WIPEONFORK, MADV_KEEPONFORK from Linux 4.14.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 15 Nov 2017 18:40:29 +0000 (18:40 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 15 Nov 2017 18:40:29 +0000 (18:40 +0000)
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.

ChangeLog
sysdeps/unix/sysv/linux/bits/mman-linux.h
sysdeps/unix/sysv/linux/hppa/bits/mman.h

index 88f3ac8478a818a2b2fcfed93a7c4bb0d4109bab..6ebdeedc246c07cad9ffd2d39cbe985c24d361ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-11-15  Joseph Myers  <joseph@codesourcery.com>
+
+       * 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.
+
 2017-11-15  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        * signal/sigrelse.c (sigrelse): Optimize implementation.
index b09118196005d677278797940b2053471ab63161..78c07c890ab10e1413ec2f82457365d6a7ae408f 100644 (file)
@@ -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
 
index acf7002beb8eccf430692d591c933fc6906a5609..4ad9153d926da62e3aeb3ecb9d144d03a990d017 100644 (file)
@@ -99,6 +99,8 @@
 # define MADV_DONTDUMP  69     /* Explicity exclude from the core dump,
                                   overrides the coredump filter bits */
 # define MADV_DODUMP    70     /* Clear the MADV_NODUMP flag */
+# define MADV_WIPEONFORK 71    /* Zero memory on fork, child only.  */
+# define MADV_KEEPONFORK 72    /* Undo MADV_WIPEONFORK.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
This page took 0.105489 seconds and 5 git commands to generate.