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]
Date: Fri, 19 May 2023 11:09:12 -0400
From: Chuck Lever <cel@...nel.org>
To: netdev@...r.kernel.org, kernel-tls-handshake@...ts.linux.dev
Cc: Linux Kernel Functional Testing <lkft@...aro.org>,
 Chuck Lever <chuck.lever@...cle.com>
Subject: [PATCH] net/handshake: Squelch allocation warning during Kunit test

From: Chuck Lever <chuck.lever@...cle.com>

The "handshake_req_alloc excessive privsize" kunit test is intended
to check what happens when the maximum privsize is exceeded. The
WARN_ON_ONCE_GFP at mm/page_alloc.c:4744 can be disabled safely for
this allocator call site.

Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
Fixes: 88232ec1ec5e ("net/handshake: Add Kunit tests for the handshake consumer API")
Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
---
 net/handshake/request.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

I sent this fix to the reporter last week, but haven't posted it to
netdev@ yet.

diff --git a/net/handshake/request.c b/net/handshake/request.c
index d78d41abb3d9..24097cccd158 100644
--- a/net/handshake/request.c
+++ b/net/handshake/request.c
@@ -120,7 +120,8 @@ struct handshake_req *handshake_req_alloc(const struct handshake_proto *proto,
 	if (!proto->hp_accept || !proto->hp_done)
 		return NULL;
 
-	req = kzalloc(struct_size(req, hr_priv, proto->hp_privsize), flags);
+	req = kzalloc(struct_size(req, hr_priv, proto->hp_privsize),
+		      flags | __GFP_NOWARN);
 	if (!req)
 		return NULL;
 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ