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: <44f9b2b8-fa62-483a-a821-f2a18d5832c9@app.fastmail.com>
Date: Fri, 20 Jun 2025 16:45:24 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "ALOK TIWARI" <alok.a.tiwari@...cle.com>,
 "Arnd Bergmann" <arnd@...nel.org>, "Nilesh Javali" <njavali@...vell.com>,
 GR-QLogic-Storage-Upstream@...vell.com,
 "James E . J . Bottomley" <James.Bottomley@...senpartnership.com>,
 "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: "Quinn Tran" <qutran@...vell.com>,
 "Himanshu Madhani" <himanshu.madhani@...cle.com>, linux <linux@...blig.org>,
 linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: qla2xxx: avoid stack frame size warning in qla_dfs

On Fri, Jun 20, 2025, at 15:34, ALOK TIWARI wrote:
> On 6/20/2025 5:09 PM, Arnd Bergmann wrote:
>
> remove extra " " after pd

Done

>> +		    "Failed to allocate port database structure.\n");
>> +		goto done_free_sp;
>
> -> goto done
> as pd is NULL it wont called dma_pool_free at all.
> dma_pool_free, trying to free a pd (NULL) confusing.

Done

>> +	memset(&mc, 0, sizeof(mc));
>> +	mc.mb[0] = MBC_GET_PORT_DATABASE;
>> +	mc.mb[1] = loop_id;
>> +	mc.mb[2] = MSW(pd_dma);
>> +	mc.mb[3] = LSW(pd_dma);
>> +	mc.mb[6] = MSW(MSD(pd_dma));
>> +	mc.mb[7] = LSW(MSD(pd_dma));
>> +	mc.mb[9] = vha->vp_idx;
>> +	mc.mb[10] = 0;
>
> seems Redundant, as already called memset ?

Done reluctantly: I see the driver is a bit inconsistent here,
with some functions skipping the memset() and initializing all
array entries, some functions do both, and rely on the memset
but skip the individual fields.

The compiler should be smart enough produce the same result
in any of those combinations at least for small structures,
so to me this is mostly about documenting what fields are
actually being accessed by the firmware later.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ