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-next>] [day] [month] [year] [list]
Date:   Fri, 21 Jul 2023 10:38:51 +0300
From:   Tudor Ambarus <tudor.ambarus@...aro.org>
To:     Vlim <vlim@...adevice.com>, Michael Walle <michael@...le.cc>
Cc:     "pratyush@...nel.org" <pratyush@...nel.org>,
        "miquel.raynal@...tlin.com" <miquel.raynal@...tlin.com>,
        "richard@....at" <richard@....at>,
        "vigneshr@...com" <vigneshr@...com>,
        "akumarma@....com" <akumarma@....com>,
        "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "vikhyat.goyal@....com" <vikhyat.goyal@....com>
Subject: Re: [PATCH V1 1/1] linux: drivers: mtd: spi-nor: gigadevice.c



On 21.07.2023 09:51, Vlim wrote:
> Thanks, Tudor,
> 

you're welcome

> Is PARSE_SFDP the command to read the SFDP parameters?

it's a flag, not a command, that when set at probe time the SFDP will be
read.

> It looks to me that the examples below are both using SFDP. But I do not
> see the flag that saying SFDP is used.

not quite

> 
> { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256)
>             FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)

The locking support is not part of the JEDEC SFDP standard, but vendors
can define their own SFDP tables where they describe the locking
support. So for now, if you want to enable locking you have to specify
the locking flags, whatever they are. There are different flavors of
block protection locking, with 3 or 4 block protection bits, their
order, etc. You'll have to check the datasheet.

>             NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>                         SPI_NOR_QUAD_READ) },

If the flash supports SFDP then the flags from above should be replaced
with PARSE_SFDP.

We have some requirements when one updates or adds new flash entries.
They have to dump the sysfs data, including the SFDP tables, and do some
sanity check with mtd_utils. Check the following cover letter to find
out how to do it:
https://lore.kernel.org/linux-mtd/cover.1686557139.git.Takahiro.Kuwano@infineon.com/

>       { "gd25q256", INFO(0xc84019, 0, 64 * 1024, 512)
>             PARSE_SFDP
>             FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6)
>             FIXUP_FLAGS(SPI_NOR_4B_OPCODES)
>             .fixups = &gd25q256_fixups },

these are all different types of flags. Use git blame to find the reason
why some were set.

Cheers,
ta

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ