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]
Message-ID: <392d911c-7b71-4d58-b07f-8e215c65b3c8@kernel.org>
Date: Mon, 25 Aug 2025 10:53:12 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Abinash Singh <abinashsinghlalotra@...il.com>, bvanassche@....org
Cc: James.Bottomley@...senPartnership.com, linux-kernel@...r.kernel.org,
 linux-scsi@...r.kernel.org, martin.petersen@...cle.com
Subject: Re: [PATCH v9 2/3] scsi: sd: Fix build warning in
 sd_revalidate_disk()

On 8/25/25 3:02 AM, Abinash Singh wrote:
> A build warning was triggered due to excessive stack usage in
> sd_revalidate_disk():
> 
> drivers/scsi/sd.c: In function ‘sd_revalidate_disk.isra’:
> drivers/scsi/sd.c:3824:1: warning: the frame size of 1160 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> 
> This is caused by a large local struct queue_limits (~400B) allocated
> on the stack. Replacing it with a heap allocation using kmalloc()
> significantly reduces frame usage. Kernel stack is limited (~8 KB),
> and allocating large structs on the stack is discouraged.
> As the function already performs heap allocations (e.g. for buffer),
> this change fits well.
> 
> Signed-off-by: Abinash Singh <abinashsinghlalotra@...il.com>
> Reviewed-by: Bart Van Assche <bvanassche@....org>

Looks good, but please move this patch as patch 1 in the series to make sure it
can be easily backported. And please add:

Fixes: 804e498e0496 ("sd: convert to the atomic queue limits API")
Cc: stable@...r.kernel.org

before your signed-off.

-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ