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] [day] [month] [year] [list]
Message-ID: <aA9kwHff-88QVkLa@8bytes.org>
Date: Mon, 28 Apr 2025 13:21:36 +0200
From: Joerg Roedel <joro@...tes.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
	Arnd Bergmann <arnd@...db.de>, Mostafa Saleh <smostafa@...gle.com>,
	Jason Gunthorpe <jgg@...pe.ca>, Lu Baolu <baolu.lu@...ux.intel.com>,
	Rob Clark <robdclark@...omium.org>,
	Kunkun Jiang <jiangkunkun@...wei.com>,
	Ashish Mhetre <amhetre@...dia.com>,
	Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
	linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] iommu/io-pgtable-arm: dynamically allocate selftest
 device struct

On Wed, Apr 23, 2025 at 06:48:16PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> In general a 'struct device' is way too large to be put on the kernel
> stack. Apparently something just caused it to grow a slightly larger,
> which pushed the arm_lpae_do_selftests() function over the warning
> limit in some configurations:
> 
> drivers/iommu/io-pgtable-arm.c:1423:19: error: stack frame size (1032) exceeds limit (1024) in 'arm_lpae_do_selftests' [-Werror,-Wframe-larger-than]
>  1423 | static int __init arm_lpae_do_selftests(void)
>       |                   ^
> 
> Change the function to use a dynamically allocated faux_device
> instead of the on-stack device structure.
> 
> Fixes: ca25ec247aad ("iommu/io-pgtable-arm: Remove iommu_dev==NULL special case")
> Link: https://lore.kernel.org/all/ab75a444-22a1-47f5-b3c0-253660395b5a@arm.com/
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> v2: use faux device instead of platform_device, as Robin suggested.
>     The faux device is more appropriate here since the is no actual physical
>     device, though on the other hand the v1 patch had the advantage of not
>     actually needing to register the device.
> ---
>  drivers/iommu/io-pgtable-arm.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)

Applied, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ