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: <CAPDyKFopLrZ2Pn66m-CtjDGOEZyiZ+_i8TnnD4KSHpFqCTN7eg@mail.gmail.com>
Date: Tue, 12 Nov 2024 19:43:51 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Andy-ld Lu <andy-ld.lu@...iatek.com>
Cc: angelogioacchino.delregno@...labora.com, matthias.bgg@...il.com, 
	wenbin.mei@...iatek.com, mengqi.zhang@...iatek.com, linux-mmc@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
	linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] mmc: mtk-sd: Fix MMC_CAP2_CRYPTO flag setting

On Mon, 11 Nov 2024 at 09:50, Andy-ld Lu <andy-ld.lu@...iatek.com> wrote:
>
> Currently, the MMC_CAP2_CRYPTO flag is set by default for eMMC hosts.
> However, this flag should not be set for hosts that do not support inline
> encryption.
>
> The 'crypto' clock, as described in the documentation, is used for data
> encryption and decryption. Therefore, only hosts that are configured with
> this 'crypto' clock should have the MMC_CAP2_CRYPTO flag set.
>
> Fixes: 7b438d0377fb ("mmc: mtk-sd: add Inline Crypto Engine clock control")
> Fixes: ed299eda8fbb ("mmc: mtk-sd: fix devm_clk_get_optional usage")
> Signed-off-by: Andy-ld Lu <andy-ld.lu@...iatek.com>

This didn't apply on fixes the branch, but only on next. That said, I
have queued this up for next and added a stable tag.

Note that, this means that the fix needs to be backported manually,
but I leave that to you or someone else to take care of.

Thanks and kind regards
Uffe


> ---
>  drivers/mmc/host/mtk-sd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 022526a1f754..efb0d2d5716b 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -2907,7 +2907,8 @@ static int msdc_drv_probe(struct platform_device *pdev)
>                 host->crypto_clk = devm_clk_get_optional(&pdev->dev, "crypto");
>                 if (IS_ERR(host->crypto_clk))
>                         return PTR_ERR(host->crypto_clk);
> -               mmc->caps2 |= MMC_CAP2_CRYPTO;
> +               else if (host->crypto_clk)
> +                       mmc->caps2 |= MMC_CAP2_CRYPTO;
>         }
>
>         host->irq = platform_get_irq(pdev, 0);
> --
> 2.46.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ