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:	Sun, 17 Apr 2016 18:57:41 +0200
From:	Rafał Miłecki <zajec5@...il.com>
To:	Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc:	"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
	Richard Weinberger <richard@....at>,
	David Woodhouse <dwmw2@...radead.org>,
	Brian Norris <computersforpeace@...il.com>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 10/12] mtd: nand: read ECC algorithm from the new field

On 17 April 2016 at 18:50, Boris Brezillon
<boris.brezillon@...e-electrons.com> wrote:
> On Sun, 17 Apr 2016 18:27:40 +0200
> Rafał Miłecki <zajec5@...il.com> wrote:
>
>> On 16 April 2016 at 09:58, Boris Brezillon
>> <boris.brezillon@...e-electrons.com> wrote:
>> > On Fri, 15 Apr 2016 21:54:10 +0200
>> > Rafał Miłecki <zajec5@...il.com> wrote:
>> >
>> >> Now we have all drivers properly setting this new field we can start
>> >> using it and proceed with deprecating NAND_ECC_SOFT_BCH.
>> >>
>> >> Signed-off-by: Rafał Miłecki <zajec5@...il.com>
>> >> ---
>> >>  drivers/mtd/nand/nand_base.c | 98 ++++++++++++++++++++++++--------------------
>> >>  1 file changed, 53 insertions(+), 45 deletions(-)
>> >>
>> >> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
>> >> index e1f3cf8..ffd1b32 100644
>> >> --- a/drivers/mtd/nand/nand_base.c
>> >> +++ b/drivers/mtd/nand/nand_base.c
>> >> @@ -4154,7 +4154,7 @@ int nand_scan_tail(struct mtd_info *mtd)
>> >>       /*
>> >>        * If no default placement scheme is given, select an appropriate one.
>> >>        */
>> >> -     if (!mtd->ooblayout && (ecc->mode != NAND_ECC_SOFT_BCH)) {
>> >> +     if (!mtd->ooblayout && ecc->algo != NAND_ECC_BCH) {
>> >
>> > Should be:
>> >
>> >         if (!mtd->ooblayout && ecc->algo == NAND_ECC_SOFT &&
>> >             ecc->algo != NAND_ECC_BCH) {
>> >
>> > Otherwise you're also taking the NAND_ECC_HW + NAND_ECC_BCH into
>> > account.
>>
>> Pretty much yes, but without
>> [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
>> we may be getting NAND_ECC_SOFT as well as NAND_ECC_SOFT_BCH. And
>> 11/12 can't be applied before 10/12. We'll need to support both values
>> for this very short moment (after 10/12 but before 11/12).
>
>
> Why can't you move patch 11 before patch 10. The DT parsing code has
> already been patched to set both ecc->algo to NAND_ECC_BCH and
> ecc->mode to NAND_ECC_SOFT, so, to it seems perfectly safe to reorder
> those changes to me (and change the test as suggested).
>
> Am I missing something?

Without patch 10/12 we still check "mode" instead of "algo" in
nand_base.c. It means it does matter if there is NAND_ECC_SOFT or
NAND_ECC_SOFT_BCH used. We can't simply make of_get_nand_ecc_mode stop
returning NAND_ECC_SOFT_BCH without adjusting nand_base.c (as in
10/12) first.

-- 
Rafał

Powered by blists - more mailing lists