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
| ||
|
Date: Wed, 26 Jan 2022 23:38:21 +0100 From: Michael Walle <michael@...le.cc> To: Chen-Tsung Hsieh <chentsung@...omium.org> Cc: 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>, linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org Subject: Re: [RESEND PATCH] mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check() Am 2022-01-26 08:32, schrieb Chen-Tsung Hsieh: > Read back Status Register 1 to ensure that the written byte match the > received value and return -EIO if read back test failed. > > Without this patch, spi_nor_write_16bit_sr_and_check() only check the > second half of the 16bit. It causes errors like spi_nor_sr_unlock() > return success incorrectly when spi_nor_write_16bit_sr_and_check() > doesn't write SR successfully. > > Fixes: 39d1e3340c73 ("mtd: spi-nor: Fix clearing of QE bit on > lock()/unlock()") > Signed-off-by: Chen-Tsung Hsieh <chentsung@...omium.org> Looks good to me. spi_nor_write_16bit_cr_and_check() also checks the SR1 and the function doc also mentions it will check it - although it doesn't. Reviewed-by: Michael Walle <michael@...le.cc> Out of curiosity, on what flash did you discover this? -michael
Powered by blists - more mailing lists