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: <20250821134117.6347-1-rongqianfeng@vivo.com>
Date: Thu, 21 Aug 2025 21:41:15 +0800
From: Qianfeng Rong <rongqianfeng@...o.com>
To: Davidlohr Bueso <dave@...olabs.net>,
	"Paul E. McKenney" <paulmck@...nel.org>,
	Josh Triplett <josh@...htriplett.org>,
	Frederic Weisbecker <frederic@...nel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@...nel.org>,
	Joel Fernandes <joelagnelf@...dia.com>,
	Boqun Feng <boqun.feng@...il.com>,
	Uladzislau Rezki <urezki@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Lai Jiangshan <jiangshanlai@...il.com>,
	Zqiang <qiang.zhang@...ux.dev>,
	linux-kernel@...r.kernel.org (open list:TORTURE-TEST MODULES),
	rcu@...r.kernel.org (open list:READ-COPY UPDATE (RCU))
Cc: Qianfeng Rong <rongqianfeng@...o.com>
Subject: [PATCH 0/2] rcu: Use kcalloc() instead of kzalloc()

Replace kzalloc() with kcalloc() in kernel/rcu.  As noted in the kernel
documentation [1], open-coded multiplication in allocator arguments is
discouraged because it can lead to integer overflow.

Use kcalloc() to gain built-in overflow protection, making memory
allocation safer when calculating allocation size compared to explicit
multiplication.

Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments #1
Signed-off-by: Qianfeng Rong <rongqianfeng@...o.com>

Qianfeng Rong (2):
  rcutorture: Use kcalloc() instead of kzalloc()
  refscale: Use kcalloc() instead of kzalloc()

 kernel/rcu/rcutorture.c | 4 ++--
 kernel/rcu/refscale.c   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ