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-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Jan 2024 21:43:09 +0100
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Dmitry Antipov <dmantipov@...dex.ru>,
	Christian Brauner <brauner@...nel.org>, zack.rusin@...adcom.com,
	mcgrof@...nel.org, pstanner@...hat.com, nick.alcock@...cle.com,
	code@...dh.me, ddiss@...e.de
Subject: Re: [PATCH AUTOSEL 5.10 01/10] watch_queue: fix kcalloc() arguments
 order

Hi!

> From: Dmitry Antipov <dmantipov@...dex.ru>
> 
> [ Upstream commit 1bfc466b13cf6652ba227c282c27a30ffede69a5 ]
> 
> When compiling with gcc version 14.0.0 20231220 (experimental)
> and W=1, I've noticed the following warning:
> 
> kernel/watch_queue.c: In function 'watch_queue_set_size':
> kernel/watch_queue.c:273:32: warning: 'kcalloc' sizes specified with 'sizeof'
> in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
>   273 |         pages = kcalloc(sizeof(struct page *), nr_pages, GFP_KERNEL);
>       |                                ^~~~~~
> 
> Since 'n' and 'size' arguments of 'kcalloc()' are multiplied to
> calculate the final size, their actual order doesn't affect the
> result and so this is not a bug. But it's still worth to fix it.

Not a bugfix, please drop.

BR,
									Pavel
									-- 
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ