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: <CACRpkdbbXxpOx_uVX6WTWfbqBbXwt2ssvpQDMrmvYSydNaiY8w@mail.gmail.com>
Date: Fri, 28 Feb 2025 09:02:39 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Guan Wang <guan.wang.jy@...il.com>
Cc: Ulf Hansson <ulf.hansson@...aro.org>, Avri Altman <avri.altman@....com>, 
	Adrian Hunter <adrian.hunter@...el.com>, Jens Axboe <axboe@...nel.dk>, guan.wang.jy@...esas.com, 
	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: block: add reset workaround for partition switch failures

On Mon, Feb 24, 2025 at 6:00 AM Guan Wang <guan.wang.jy@...il.com> wrote:

> Some eMMC devices (e.g., BGSD4R and AIM20F) may enter an unresponsive state
> after encountering CRC errors during RPMB writes (CMD25). This prevents the
> device from switching back to the main partition via CMD6, blocking further
> I/O operations.
>
> The root cause is suspected to be a firmware/hardware issue in specific
> eMMC models. A workaround is to perform a hardware reset via mmc_hw_reset()
> when the partition switch fails, followed by a retry.
>
> Add a workaround that:
> 1. If initial partition switch fails after rpmb access
> 2. Performs mmc card reset using mmc_hw_reset()
> 3. Retries switching to main partition
> This helps resolve cases where the device becomes unresponsive after
> RPMB operations.
>
> Signed-off-by: Guan Wang <guan.wang.jy@...esas.com>

This looks like a reasonable recovery to me.

However not all hosts support HW reset. You currently have to do
something this:

if ((host->caps & MMC_CAP_HW_RESET) &&
  host->ops->card_hw_reset)
   mmc_hw_reset(card);

Perhaps we should first just move this check into
mmc_hw_reset() so that function can be called unconditionally?

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ