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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250330191137.037735d3@jic23-huawei>
Date: Sun, 30 Mar 2025 19:11:37 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Tzung-Bi Shih <tzungbi@...nel.org>
Cc: Kees Cook <kees@...nel.org>, "Gustavo A. R. Silva"
 <gustavoars@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>, Benson Leung
 <bleung@...omium.org>, Guenter Roeck <groeck@...omium.org>,
 linux-iio@...r.kernel.org, chrome-platform@...ts.linux.dev,
 linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2][next] iio: cros_ec: Avoid
 -Wflex-array-member-not-at-end warning

On Wed, 19 Mar 2025 09:13:45 +0000
Tzung-Bi Shih <tzungbi@...nel.org> wrote:

> On Tue, Mar 18, 2025 at 08:42:41AM -0700, Kees Cook wrote:
> > > +	((struct ec_params_get_cmd_versions *)buf->data)->cmd = cmd;
> > > +
> > > +	ret = cros_ec_cmd_xfer_status(ec_dev, buf);
> > >  	if (ret >= 0)
> > > -		*mask = buf.resp.version_mask;
> > > +		*mask = ((struct ec_response_get_cmd_versions *)buf->data)->version_mask;
> > >  	return ret;
> > >  }  
> > 
> > Since "params" is used twice, I'd say do like the other patch and assign
> > it to a new variable:
> > 
> > 	struct ec_response_get_cmd_versions *params = buf->data;
> > 	...
> > 	params->cmd = cmd;
> > 	...
> > 		*mask = params->version_mask;  
> 
> Not a pushback for introducing new variables.  FWIW, it uses "param" and
> "response" only once.

Given that reply I'm assuming Kees is fine with this.

Applied.

Thanks,

Jonathan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ