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: <20250726194813.GN1367887@horms.kernel.org>
Date: Sat, 26 Jul 2025 20:48:13 +0100
From: Simon Horman <horms@...nel.org>
To: Jimmy Assarsson <jimmyassarsson@...il.com>
Cc: Jimmy Assarsson <extja@...ser.com>, linux-can@...r.kernel.org,
	Marc Kleine-Budde <mkl@...gutronix.de>,
	Vincent Mailhol <mailhol.vincent@...adoo.fr>,
	netdev@...r.kernel.org
Subject: Re: [PATCH v2 01/11] can: kvaser_usb: Add support to control CAN
 LEDs on device

On Fri, Jul 25, 2025 at 02:44:52PM +0200, Jimmy Assarsson wrote:
> On 7/24/25 8:26 PM, Simon Horman wrote:
> > On Thu, Jul 24, 2025 at 11:24:55AM +0200, Jimmy Assarsson wrote:

...

> > GCC seems to know that:
> > * cmd was allocated sizeof(*cmd) = 32 bytes
> > * struct kvaser_cmd_ext is larger than this (96 bytes)
> > 
> > And it thinks that cmd->header.cmd_no might be CMD_EXTENDED.
> > This is not true, becuae .cmd_no is set to CMD_LED_ACTION_REQ
> > earlier in kvaser_usb_hydra_set_led. But still, GCC produces
> > a big fat warning.
> > 
> > On the one hand we might say this is a shortcoming in GCC,
> > a position I agree with. But on the other hand, we might follow
> > the pattern used elsewhere in this file for similar functions,
> > which seems to make GCC happy, I guess, and it is strictly a guess,
> > because less context is needed for it to analyse things correctly.
> 
> Thanks for finding this!
> 
> Marc Kleine-Budde actually sorted this out for other commands some years ago [1],
> but I had completely forgotten.
> 
> [1] https://lore.kernel.org/all/20221219110104.1073881-1-mkl@pengutronix.de

Nice, thanks for digging that up.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ