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: <20250819143935.372084-1-rongqianfeng@vivo.com>
Date: Tue, 19 Aug 2025 22:39:31 +0800
From: Qianfeng Rong <rongqianfeng@...o.com>
To: Steen Hegelund <Steen.Hegelund@...rochip.com>,
	Daniel Machon <daniel.machon@...rochip.com>,
	UNGLinuxDriver@...rochip.com (maintainer:ARM/Microchip Sparx5 SoC support),
	Linus Walleij <linus.walleij@...aro.org>,
	Michal Simek <michal.simek@....com>,
	Bjorn Andersson <andersson@...nel.org>,
	Chen-Yu Tsai <wens@...e.org>,
	Jernej Skrabec <jernej.skrabec@...il.com>,
	Samuel Holland <samuel@...lland.org>,
	linux-arm-kernel@...ts.infradead.org (moderated list:ARM/Microchip Sparx5 SoC support),
	linux-gpio@...r.kernel.org (open list:PIN CONTROL SUBSYSTEM),
	linux-kernel@...r.kernel.org (open list),
	linux-arm-msm@...r.kernel.org (open list:ARM/QUALCOMM MAILING LIST),
	linux-sunxi@...ts.linux.dev (open list:ARM/Allwinner sunXi SoC support)
Cc: Qianfeng Rong <rongqianfeng@...o.com>
Subject: [PATCH 0/4] pinctrl: use kcalloc() instead of kzalloc()

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

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

[1]: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments

Qianfeng Rong (4):
  pinctrl: microchip-sgpio: use kcalloc() instead of kzalloc()
  pinctrl: pinctrl-zynqmp: use kcalloc() instead of kzalloc()
  pinctrl: qcom: sc8180x: use kcalloc() instead of kzalloc()
  pinctrl: sunxi: use kcalloc() instead of kzalloc()

 drivers/pinctrl/pinctrl-microchip-sgpio.c | 2 +-
 drivers/pinctrl/pinctrl-zynqmp.c          | 2 +-
 drivers/pinctrl/qcom/pinctrl-sc8180x.c    | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c  | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ