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>] [day] [month] [year] [list]
Message-ID: <YqwLaIvjdRBsNRuU@lahna>
Date:   Fri, 17 Jun 2022 08:04:40 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     "Oleksandr Ocheretnyi -X (oocheret - GLOBALLOGIC INC at Cisco)" 
        <oocheret@...co.com>
Cc:     "tudor.ambarus@...rochip.com" <tudor.ambarus@...rochip.com>,
        "miquel.raynal@...tlin.com" <miquel.raynal@...tlin.com>,
        "p.yadav@...com" <p.yadav@...com>,
        "michael@...le.cc" <michael@...le.cc>,
        "richard@....at" <richard@....at>,
        "vigneshr@...com" <vigneshr@...com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
        "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
        "mauro.lima@...ypsium.com" <mauro.lima@...ypsium.com>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "xe-linux-external(mailer list)" <xe-linux-external@...co.com>
Subject: Re: [PATCH v2] mtd: spi-nor: handle unsupported FSR opcodes properly

Hi,

On Thu, Jun 16, 2022 at 08:26:33PM +0000, Oleksandr Ocheretnyi -X (oocheret - GLOBALLOGIC INC at Cisco) wrote:
>    Hi Mika,
> 
>    >    ​However I remember you caught situation where
>    micron_st_nor_read_fsr()
>    >    returns -EOPNOTSUPP
>    >    (intel_spi_exec_mem_op callback returns -EOPNOTSUPP), according to
>    your
>    >    patch
>    >
>    [3]https://lore.kernel.org/linux-mtd/20220506105158.43613-1-mika.wester
>    >    berg@...ux.intel.com/ I've noted in description body. So I think I
>    have
>    >    to cover both errorcodes, haven't I?
>    I was thinking that you change the both functions in Intel SPI to
>    return
> 
>    -ENOTSUPP, not just one.
> 
>    ​you know 'drivers/mtd/spi-nor' sources use -EOPNOTSUPP errorcode only,
>    however
> 
>    'drivers/spi' modules (where intel driver is located as well as
>    spi-mem.c) use both errorcodes many times
> 
>    (-EOPNOTSUPP and -ENOTSUPP).

Oh, indeed. I remembered that SPI-NOR core was using ENOTSUP but it was
SPI-MEM instead.

>    So maybe it is better to use -EOPNOTSUPP for intel driver file (what
>    uses -EOPNOTSUPP everywhere) and
> 
>    update the spi-mem.c with -EOPNOTSUPP as return value, how do you
>    think?

Yes, I think this is the correct approach. You need to be careful though
to make sure the callers of SPI-MEM functions do not get unexpected
values.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ