-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Isar patch to fix/improve tee-supplicant shutdown rules
Pending upstream. Will be needed for kernel 6.1. Signed-off-by: Jan Kiszka <[email protected]>
- Loading branch information
1 parent
9221fc1
commit 4e8d671
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
isar-patches/0001-meta-optee-client-Generalize-and-update-shutdown-rul.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From 2dde60388814aa09d85714375a06ef1e0688f16d Mon Sep 17 00:00:00 2001 | ||
From: Jan Kiszka <[email protected]> | ||
Date: Wed, 11 Oct 2023 16:04:53 +0200 | ||
Subject: [PATCH] meta: optee-client: Generalize and update shutdown rule | ||
|
||
First, naming changed somewhere between kernel 5.10 and 6.1 so that | ||
optee-ta-bc50d971... is now optee-ta-supp-bc50d971... | ||
|
||
And then we should account for possibly more devices that need to be | ||
unbound. Use POSIX-compliant shell code for this. | ||
|
||
The generic loop allows to drop the explicit unmounting of efivarfs | ||
because the corresponding driver will already get unbound. | ||
|
||
Signed-off-by: Jan Kiszka <[email protected]> | ||
--- | ||
.../optee-client/files/debian/tee-supplicant.service | 3 +-- | ||
1 file changed, 1 insertion(+), 2 deletions(-) | ||
|
||
diff --git a/meta/recipes-bsp/optee-client/files/debian/tee-supplicant.service b/meta/recipes-bsp/optee-client/files/debian/tee-supplicant.service | ||
index cc92a5fd..d8b630a4 100644 | ||
--- a/meta/recipes-bsp/optee-client/files/debian/tee-supplicant.service | ||
+++ b/meta/recipes-bsp/optee-client/files/debian/tee-supplicant.service | ||
@@ -13,8 +13,7 @@ Type=oneshot | ||
RemainAfterExit=yes | ||
# Start if not already started by the initramfs hook | ||
ExecStart=/bin/sh -c '/usr/bin/pgrep tee-supplicant >/dev/null || /usr/sbin/tee-supplicant -d' | ||
-ExecStop=/bin/sh -c '/usr/bin/findmnt /sys/firmware/efi/efivars >/dev/null && /usr/bin/umount /sys/firmware/efi/efivars || true' | ||
-ExecStop=/bin/sh -c 'echo -n optee-ta-bc50d971-d4c9-42c4-82cb-343fb7f37896 > /sys/bus/tee/drivers/optee-ftpm/unbind || true' | ||
+ExecStop=/bin/sh -c 'for dev in /sys/bus/tee/devices/*; do case "$dev" in *optee-ta-*) basename "$dev" > "$dev"/driver/unbind;; esac done' | ||
ExecStop=/usr/bin/pkill tee-supplicant | ||
|
||
[Install] | ||
-- | ||
2.35.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters