lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <28729.1160771116@lwn.net>
Date:	Fri, 13 Oct 2006 14:25:16 -0600
From:	Jonathan Corbet <corbet@....net>
To:	linux-kernel@...r.kernel.org
cc:	akpm@...l.org
Subject: [PATCH,RFC] Add __GFP_ZERO to GFP_LEVEL_MASK

There is a very helpful comment in <linux/gfp.h>:

  /* if you forget to add the bitmask here kernel will crash, period */

Well, my kernel has been crashing (period) at the BUG() in cache_grow();
the offending flag is __GFP_ZERO.  I think it needs to be in
GFP_LEVEL_MASK.  Anybody know a good reason why it's not there now?

jon


Add __GFP_ZERO to GFP_LEVEL_MASK and cut down on those unsightly oopses.

Signed-off-by: Jonathan Corbet <corbet@....net>

--- /k/t/2.6.19-rc2/include/linux/gfp.h	2006-10-13 13:04:17.000000000 -0600
+++ 19-rc2.jc/include/linux/gfp.h	2006-10-13 14:17:10.000000000 -0600
@@ -54,7 +54,8 @@ struct vm_area_struct;
 #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \
 			__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \
 			__GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
-			__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE)
+			__GFP_ZERO|__GFP_NOMEMALLOC|__GFP_HARDWALL|\
+			__GFP_THISNODE)
 
 /* This equals 0, but use constants in case they ever change */
 #define GFP_NOWAIT	(GFP_ATOMIC & ~__GFP_HIGH)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ