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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260129061758.329806-1-zheng.gong@samsung.com>
Date: Thu, 29 Jan 2026 14:17:58 +0800
From: "zheng.gong" <zheng.gong@...sung.com>
To: linux-scsi@...r.kernel.org
Cc: avri.altman@....com, bvanassche@....org, quic_cang@...cinc.com,
	alim.akhtar@...sung.com, martin.petersen@...cle.com, ebiggers@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re:Re: [PATCH v4 0/3] scsi: ufs: Add crypto_keyslot_remap support

Hi Eric,

Thank you for ur kind question. I understand your concern.
the confusion arises from the coexistence of two different UFS drivers on Exynos platforms.

There are two distinct UFS host controller implementations on Samsung Exynos:
- ufs-exynos.c
- ufs-exynosautovX.c

But ufs-exynosautovX is not mainlined, which:
- Uses a hardware crypto engine that does support keyslots
- Assigns keyslots to VMs (e.g., QNX, Linux, Android)
- Needs to remap logical keyslot + VM-specific offset at request time

We added a minimal, DT-based remap in ufs-exynos.c not because mobile uses it, but to:
- Prove that the hook has a real, upstream-mergeable use pattern
- Show that the mechanism can be used by actual platform

It is a generic, not tied to one usecase.

As for how we use it in our platform.

In our driver, we implement as like:

void exynos_ufs_fmp_crypto_keyslot_remap(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
{
    struct exynosauto_ufs *ufs = to_exynosauto_ufs(hba);
    u32 vm_id = ufs->iov->vm_id;
    u32 offset = vm_id * UFS_KEYSLOTS;

    if (lrbp->crypto_key_slot >= 0)
        lrbp->crypto_key_slot += offset;
}

We have tested this on ExynosAuto V920 platform with:
4 virtual machines: QNX, Linux, Linux, Android.
Each VM has its own UFS VH and keyslot range as per allocation.
Inline encryption is enabled for all VMs. offset is configured in dt for each VH node.

Despite driver resides in our out-of-tree exynosauto-modules and cannot be upstreamed easily,
but the use case is real and actively used in production platform.

To help move this forward, could you please let us know what additional 
information or changes would be needed to make this patch acceptable?

If it is not plausible for mainline, do u have any suggestion in terms of this kind of case?

Appreciate it.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ