Bug 218587
Summary: | optee/fTPM access to RPMB via tee-supplicant broken in 6.6.13 compared to 6.5.10 | ||
---|---|---|---|
Product: | Drivers | Reporter: | Mikko Rapeli (Linaro) (mikko.rapeli) |
Component: | MMC/SD | Assignee: | drivers_mmc-sd |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | bagasdotme |
Priority: | P3 | ||
Hardware: | ARM | ||
OS: | Linux | ||
Kernel Version: | 6.6.20 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | 1653a8102868264f3488c298a9f20af2add9a288 |
Description
Mikko Rapeli (Linaro)
2024-03-11 13:31:05 UTC
Discussion in https://lore.kernel.org/all/20231129092535.3278-1-avri.altman@wdc.com/ refers that multiple threads are calling the RPMB ioctls through a shared file descriptor. Jens Wiklander <jens.wiklander@linaro.org> provided simple patch to optee_client/tee-supplicant to reduce to single userspace thread: https://github.com/OP-TEE/optee_client --- a/tee-supplicant/src/tee_supplicant.c +++ b/tee-supplicant/src/tee_supplicant.c @@ -588,6 +588,8 @@ static bool spawn_thread(struct thread_arg *arg) int e = 0; pthread_t tid; + return true; + memset(&tid, 0, sizeof(tid)); DMSG("Spawning a new thread"); This does not fix or work around the issue. (In reply to Mikko Rapeli (Linaro) from comment #0) > Firmware TPM device (fTPM) use of RPMB storage via optee tee-supplicant > client is broken in 6.6.13 compared to 6.5.10 kernel. > > Commit which breaks this is in MMC core: > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/ > ?id=1653a8102868264f3488c298a9f20af2add9a288 > > mmc: core: Use mrq.sbc in close-ended ffu > commit 4d0c8d0aef6355660b6775d57ccd5d4ea2e15802 upstream. > Forwarded to [1]. [1]: https://bugzilla.kernel.org/show_bug.cgi?id=218587 Fix proposal submitted: https://lore.kernel.org/linux-mmc/20240313133744.2405325-1-mikko.rapeli@linaro.org/ Fixed in master v6.9-rc2 and stable tree tags v6.1.84, v6.6.24, v6.7.12, v6.8.3. |