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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070514054837.GA18879@gondor.apana.org.au>
Date:	Mon, 14 May 2007 15:48:37 +1000
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: [IPSEC]: Don't warn if high-order hash resize fails

Hi Dave:

I just got this when rekeying my VPN (2.6.21.1):

events/0: page allocation failure. order:7, mode:0xd0
 [<c0146235>] __alloc_pages+0x1e5/0x2e0
 [<c0146356>] __get_free_pages+0x26/0x50
 [<c02a01ef>] xfrm_hash_alloc+0x2f/0x80
 [<c029a947>] xfrm_bydst_resize+0x37/0xc0
 [<c029aa70>] xfrm_hash_resize+0x0/0x80
 [<c029aae7>] xfrm_hash_resize+0x77/0x80
 [<c012a8ea>] run_workqueue+0x8a/0x190
 [<c012ab17>] worker_thread+0x127/0x160
 [<c0117490>] default_wake_function+0x0/0x10
 [<c01174d7>] __wake_up_common+0x37/0x70
 [<c0117490>] default_wake_function+0x0/0x10
 [<c012a9f0>] worker_thread+0x0/0x160
 [<c012e044>] kthread+0xb4/0xc0
 [<c012df90>] kthread+0x0/0xc0
 [<c0105287>] kernel_thread_helper+0x7/0x10
 =======================

Isn't an order-7 allocation (half a meg) a bit over-the-top for that hash,
especially since I've got a grand total of 4 SAs :)

Anyway, we shouldn't warn about these allocations since they're expected
to fail after the box has been up for a while.  Also, should we try
vmalloc when it does fail?

[IPSEC]: Don't warn if high-order hash resize fails

Multi-page allocations are always likely to fail.  Since such failures
are expected and non-critical in xfrm_hash_alloc, we shouldn't warn about
them.

Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/net/xfrm/xfrm_hash.c b/net/xfrm/xfrm_hash.c
index 37643bb..55ab579 100644
--- a/net/xfrm/xfrm_hash.c
+++ b/net/xfrm/xfrm_hash.c
@@ -22,7 +22,8 @@ struct hlist_head *xfrm_hash_alloc(unsigned int sz)
 		n = __vmalloc(sz, GFP_KERNEL, PAGE_KERNEL);
 	else
 		n = (struct hlist_head *)
-			__get_free_pages(GFP_KERNEL, get_order(sz));
+			__get_free_pages(GFP_KERNEL | __GFP_NOWARN,
+					 get_order(sz));
 
 	if (n)
 		memset(n, 0, sz);
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ