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] [thread-next>] [day] [month] [year] [list]
Message-Id: <D6GE3CD5XK5F.35VL454SBGOID@kernel.org>
Date: Fri, 20 Dec 2024 09:36:57 +0100
From: "Michael Walle" <mwalle@...nel.org>
To: "Miquel Raynal" <miquel.raynal@...tlin.com>, "Tudor Ambarus"
 <tudor.ambarus@...aro.org>
Cc: "Renjun Wang" <renjunw0@...mail.com>, "Pratyush Yadav"
 <pratyush@...nel.org>, "Richard Weinberger" <richard@....at>, "Vignesh
 Raghavendra" <vigneshr@...com>, <linux-mtd@...ts.infradead.org>,
 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mtd: spi-nor: extend description of size member of
 struct flash_info

Hi,

On Thu Dec 19, 2024 at 5:15 PM CET, Miquel Raynal wrote:
> On 19/12/2024 at 10:01:41 GMT, Tudor Ambarus <tudor.ambarus@...aro.org> wrote:
>
> > On 12/19/24 9:38 AM, Miquel Raynal wrote:
> >> On 19/12/2024 at 09:20:04 GMT, Tudor Ambarus <tudor.ambarus@...aro.org> wrote:
> >> 
> >>> We use the size as an indicator whether to parse SFDP or not. We don't
> >>> introduce a dedicated member for SFDP parsing because we'd like to keep
> >>> the struct size at a minimum, as it's used for every flash declaration.
> >>> Ideally we won't have flash entries at all, but there are still flash
> >>> parameters that aren't defined by SFDP, thus we need to statically
> >>> specify them.

Thanks!

Reviewed-by: Michael Walle <mwalle@...nel.org>

> >> 
> >> TBH I'd be perfectly fine (and prefer) a dedicated member, because
> >> code clarity is IMO more important than memory footprint today.

But that would have meant more code churn, because the default
should be the new method. Thus we'd have to change all the old
entries.

> >> However for now I am totally agreeing with changes clarifying what we
> >> currently do, so:
> >> 
> >> Reviewed-by: Miquel Raynal <miquel.raynal@...tlin.com>
> >> 
> >> One minor nit below though:
> >> 
> >>> + * @size:           the size of the flash in bytes. The flash size is one
> >>> + *                  property parsed by the SFDP. We use it as an indicator
> >>> + *                  whether we need SFDP parsing for a particular flash.
> >>> + *                  I.e. non-legacy flash entries in flash_info will have
> >>> + *                  a size of zero iff SFDP should be used.
> >> 
> >> typo, 'if'                            ^^^
> >> 
> >
> > iff is a conjunction: if and only if.
> >
> > I think Michael used it to emphasize that we don't allow size > 0 when
> > we want SFDP parsing. Using if allows it.

Yep :)

> Ah, ok, I didn't know the abbreviation.

-michael

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ