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] [day] [month] [year] [list]
Message-ID: <874ixqp826.fsf@bootlin.com>
Date: Mon, 12 May 2025 10:06:09 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Bence Csókás <csokas.bence@...lan.hu>
Cc: <linux-mtd@...ts.infradead.org>,  <linux-kernel@...r.kernel.org>,
  Csókás,  "Michael Walle" <mwalle@...nel.org>,  Richard
 Weinberger
 <richard@....at>,  Vignesh Raghavendra <vigneshr@...com>
Subject: Re: [PATCH v2] mtd: Verify written data in paranoid mode

Hello,

On 08/05/2025 at 20:37:34 +02, Bence Csókás <csokas.bence@...lan.hu> wrote:

> From: Csókás, Bence <csokas.bence@...lan.hu>
>
> Add MTD_PARANOID config option for verifying all written data to prevent
> silent bit errors being undetected, at the cost of some bandwidth overhead.
>
> Signed-off-by: Csókás, Bence <csokas.bence@...lan.hu>
> ---

...

> +int mtd_write_oob(struct mtd_info *mtd, loff_t to,
> +		  struct mtd_oob_ops *ops)
> +{
> +	int ret = _mtd_write_oob(mtd, to, ops);
> +
> +#if IS_ENABLED(CONFIG_MTD_PARANOID)
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = _mtd_verify(mtd, to, ops->retlen, ops->datbuf);
> +#endif // CONFIG_MTD_PARANOID
> +	return ret;
> +}

I'd prefer to extend mtd_write_oob() with a simple

    if (IS_ENABLED(CONFIG_MTD_PARANOID))
            mtd_verify();

It will also likely solve the kernel test robot report.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ