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:   Fri, 22 Sep 2023 16:04:00 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Rouven Czerwinski <r.czerwinski@...gutronix.de>
Cc:     Martin Hundebøll <martin@...nix.com>,
        Måns Rullgård <mans@...sr.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        JaimeLiao <jaimeliao.tw@...il.com>, kernel@...gutronix.de,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Alexander Shiyan <eagle.alexander923@...il.com>
Subject: Re: [PATCH] mtd: rawnand: check nand support for cache reads

Hi Rouven,

Thanks a lot for the investigation and the patch!

r.czerwinski@...gutronix.de wrote on Fri, 22 Sep 2023 12:01:13 +0200:

Would you mind changing the title to
"mtd: rawnand: Ensure the nand chip supports cached reads"

> Both the JEDEC and ONFI specification say that read cache sequential
> support is an optional command.

I clearly overlooked that part, just checking the set/get_features()
entries as usual, good catch.

> This means that we not only need to
> check whether the individual controller implements the command, we also

The controller itself does not implement the command, but may or may
not support it (can you please update the sentence?).

> need to check the parameter pages for both ONFI and JEDEC NAND flashes
> before enabling sequential cache reads.
> 
> This fixes support for NAND flashes which don't support enabling cache
> reads, i.e. Samsung K9F4G08U0F or Toshiba TC58NVG0S3HTA00.
> 
> Sequential cache reads are no only available for ONFI and JEDEC devices,
> if individual vendors implement this, it needs to be enabled per vendor.

Agreed.

> Tested on i.MX6Q with a Samsung NAND flash chip that doesn't support
> sequential reads.
> 
> Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads")
> 

Please remove this empty line and instead add:

Cc: stable@...r.kernel.org

> Signed-off-by: Rouven Czerwinski <r.czerwinski@...gutronix.de>
> ---
> @Martin, Måns:
> I would appreciate if you could test this on your hardware.

That would me much appreciated!

I also added Alexander who also had troubles with this patchset, could
you check on your setup if that solves the issue?

> @Miguel:
> I didn't have the time to test this on ONFI/JEDEC devices with support
> yet, I'd be fine if you hold off merging this.

Of course. I was about to send a revert but that looks a promising fix,
let's see how it goes.

> 
>  drivers/mtd/nand/raw/nand_base.c  | 3 +++
>  drivers/mtd/nand/raw/nand_jedec.c | 3 +++
>  drivers/mtd/nand/raw/nand_onfi.c  | 3 +++
>  include/linux/mtd/jedec.h         | 3 +++
>  include/linux/mtd/onfi.h          | 1 +
>  include/linux/mtd/rawnand.h       | 1 +
>  6 files changed, 14 insertions(+)
> 

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ