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: <37abbb4e-cac4-4278-98fb-0af75e5b3ef4@sirena.org.uk>
Date: Mon, 3 Jun 2024 13:08:11 +0100
From: Mark Brown <broonie@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Jim Wylder <jwylder@...gle.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>, kernel-team@...roid.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] regmap-i2c: Subtract reg size from max_write

On Sun, Jun 02, 2024 at 10:29:07AM +0300, Andy Shevchenko wrote:

> >  		    (bus->max_raw_write == 0 || bus->max_raw_write > quirks->max_write_len))
> > -			max_write = quirks->max_write_len;
> > +			max_write = quirks->max_write_len -
> > +				(config->reg_bits + config->pad_bits) / BITS_PER_BYTE;

> Interesting. regmap-spi does this slightly differently, i.e. reg/8 + pad/8.
> I'm wondering which one is more correct (potential off-by-one I suppose).

The above seems more correct if we have less than a full byte of padding.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ