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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <175708416143.334139.12983911214656984817.b4-ty@bootlin.com>
Date: Fri, 05 Sep 2025 16:56:01 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: richard@....at, vigneshr@...com, 
 Wang Zhaolong <wangzhaolong@...weicloud.com>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org, 
 chengzhihao1@...wei.com, yi.zhang@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH V2] mtd: core: skip badblocks increment for blocks
 already known bad

On Tue, 02 Sep 2025 17:27:32 +0800, Wang Zhaolong wrote:
> Repeatedly marking the same eraseblock bad inflates
> mtd->ecc_stats.badblocks because mtd_block_markbad() unconditionally
> increments the counter on success, while some implementations (e.g.
> NAND) return 0 both when the block was already bad and when it has just
> been marked[1].
> 
> Fix by checking if the block is already bad before calling
> ->_block_markbad() when _block_isbad is available. Only skip the counter
> increment when we can confirm the block was already bad. In all other
> cases continue incrementing the counter.
> 
> [...]

Applied to mtd/next, thanks!

[1/1] mtd: core: skip badblocks increment for blocks already known bad
      commit: 1b2dd17dd514b699818afeac1b513651b003ec10

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ