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]
Date:   Tue, 28 Jul 2020 11:20:15 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Christian Eggers' <ceggers@...i.de>
CC:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH] eeprom: at25: set minimum read/write access stride to 1

From: Christian Eggers
> Sent: 28 July 2020 11:30
> 
> On Tuesday, 28 July 2020, 11:52:05 CEST, David Laight wrote:
> > From: Christian Eggers
> >
> > > Sent: 28 July 2020 10:30
> > >
> > > SPI eeproms are addressed by byte.
> >
> > They also support multi-byte writes - possibly with alignment
> > restrictions.
> > So forcing 4-byte writes (at aligned addresses) would typically
> > speed up writes by a factor of 4 over byte writes.
> >
> > So does this fix a problem?
> > If so what.
> I use the nvmem-cells property for getting the MAC-Address out of the eeprom
> (actually an FRAM in my case).
> 
> &spi {
>     ....
>     fram: fram@0 {
>     ...
>         mac_address_fec2: mac-address@126 {
>             reg = <0x126 6>;
>         };
>     ...
>     };
> };

Hmmmm.... the 'stride' only constrains the alignment of 'cells'.
(ie address ranges from the device tree.)

It looks as though you can open the entire NVMEM device and
then do reads from byte offsets.
The 'stride' and 'word_size' are then not checked!

Actually it might be that before 01973a01f9ec3 byte aligned
'cells' were allowed.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ