[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <60657a94-8b91-41d5-9cf7-61ed5ceb2161@gmail.com>
Date: Wed, 29 Oct 2025 12:30:13 +0530
From: Ankan Biswas <spyjetfayed@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: ajit.khaparde@...adcom.com, sriharsha.basavapatna@...adcom.com,
somnath.kotur@...adcom.com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, skhan@...uxfoundation.org, khalid@...nel.org,
david.hunter.linux@...il.com, linux-kernel-mentees@...ts.linux.dev
Subject: Re: [PATCH v3] net: ethernet: emulex: benet: fix adapter->fw_on_flash
truncation warning
On 10/29/25 7:12 AM, Jakub Kicinski wrote:
> On Fri, 24 Oct 2025 23:45:41 +0530 Ankan Biswas wrote:
>> The benet driver copies both fw_ver (32 bytes) and fw_on_flash (32 bytes)
>> into ethtool_drvinfo->fw_version (32 bytes), leading to a potential
>> string truncation warning when built with W=1.
>>
>> Store fw_on_flash in ethtool_drvinfo->erom_version instead, which some
>> drivers use to report secondary firmware information.
>
> You are changing user-visible behavior to silence a W=1 warning.
> I can't stress enough how bad of an idea this is.
> Please find a better fix.. or leave this code be.
Hi Jakub,
Thanks for the feedback. I felt this would be better than the value
appearing truncated to the user. However, yes this is not the ideal fix.
Will avoid modifying user-visible behavior.
An ideal fix may require a lot more changes, which may not be worth the
effort at this point, so I guess it is better to drop this patch.
Best Regards,
Ankan Biswas
Powered by blists - more mailing lists