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: <33abf7b84860049c4a22605578303ff2@walle.cc>
Date:   Thu, 14 Jul 2022 23:51:56 +0200
From:   Michael Walle <michael@...le.cc>
To:     Michal Suchánek <msuchanek@...e.de>
Cc:     linux-sunxi@...ts.linux.dev, Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Chen-Yu Tsai <wens@...e.org>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Samuel Holland <samuel@...lland.org>,
        Tudor Ambarus <tudor.ambarus@...rochip.com>,
        Pratyush Yadav <p.yadav@...com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH 1/2] mtd: spi-nor: When a flash memory is missing do not
 report an error

Am 2022-07-14 22:55, schrieb Michal Suchánek:
> On Thu, Jul 14, 2022 at 09:41:48PM +0200, Michael Walle wrote:
>> Hi,
>> 
>> Am 2022-07-14 21:19, schrieb Michal Suchanek:
>> > It is normal that devices are designed with multiple types of storage,
>> > and only some types of storage are present.
>> >
>> > The kernel can handle this situation gracefully for many types of
>> > storage devices such as mmc or ata but it reports and error when spi
>> > flash is not present.
>> >
>> > Only print a notice that the storage device is missing when no response
>> > to the identify command is received.
>> >
>> > Consider reply buffers with all bits set to the same value no response.
>> 
>> I'm not sure you can compare SPI with ATA and MMC. I'm just speaking 
>> of
>> DT now, but there, for ATA and MMC you just describe the controller 
>> and
>> it will auto-detect the connected storage. Whereas with SPI you 
>> describe
> 
> Why does mmc assume storage and SDIO must be descibed? Why the special
> casing?

I can't follow you here. My SDIO wireless card just works in an SD
slot and doesn't have to be described.

>> both the controller and the flash. So I'd argue that your hardware
>> description is wrong if it describes a flash which is not present.
> 
> At any rate the situation is the same - the storage may be present
> sometimes. I don't think assuming some kind of device by defualt is a
> sound practice.

Where is the assumption when the DT tells you there is a flash
on a specific chip select but actually there it isn't. Shouldn't
the DT then be fixed?

Maybe I don't understand your problem. What are you trying to
solve? I mean this just demotes an error to an info message.

> However, when the board is designed for a specific kind of device which
> is not always present, and the kernel can detect the device, it is
> perfectly fine to describe it.
> 
> The alternative is to not use the device at all, even when present,
> which is kind of useless.

Or let the bootloader update your device tree and disable the device
if it's not there? Or load an overlay if it is there?

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ