From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7288709884549267456 X-Received: by 2002:a7b:c4cc:0:b0:402:f91e:df80 with SMTP id g12-20020a7bc4cc000000b00402f91edf80mr16647093wmk.3.1697094941893; Thu, 12 Oct 2023 00:15:41 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:3b96:b0:404:7b5d:9d4d with SMTP id n22-20020a05600c3b9600b004047b5d9d4dls312763wms.2.-pod-prod-02-eu; Thu, 12 Oct 2023 00:15:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKNdVW3G4NGt2au/AVEMzkKTqFGSBg38ybA3UhOJLnb/IiX1CdlX04GOSVCupzv/ktTf/u X-Received: by 2002:a05:6000:1b08:b0:31f:d4ad:544c with SMTP id f8-20020a0560001b0800b0031fd4ad544cmr21380130wrz.52.1697094939840; Thu, 12 Oct 2023 00:15:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697094939; cv=none; d=google.com; s=arc-20160816; b=d7sUb6IGK6S1WWrk1HhHZuGqzCKXqPV2XJRhZGskAepUrP0vb4hwMv5vYoOXzQVAnI FF/ZBLkKAtEcr7McDrOAT9y6ZkdU8dAg2Iyb/iFa1bgYeZNYsf437gQU+DQO/AqbiY4q zcUQhARm9R2YMbqlQpq+5ABtu96xwWbSbuvFj5VWevf1kKGF4Dp+kSUqgF+g6fhf3qMz 75mfCNke0KZOLisjh3Z47P+9Eej5VC7ExPHWvUgEX+adJZ6mDbrBcCkatl/lUmVkmu0J rOE56gL+HVMHiaY8pjB7dMFBPo4Oe/fxxOmV3KvRB84qspgxAPz8DzgCpnF9kguYtUxV OnJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id; bh=HVhYx/azbbPTsLDCe630Mp0+YLWsy4lP8HVci0X4PSg=; fh=4dyZmnrb64+UU6oyUXbnUGIvEcgQo/KB4CgEQ11iq9w=; b=xmvs9X1rzI9IsLtW7gI4UJWOaIZ4UzsCkIK4XiTecmAQJ6kZsWqXn00w9W4OHnhDR6 edPI6DjLMRIWvkWOHYERC4e2PkgmLZwkWv3k3p6ZElyke5YQotDtC7ds4oetBuPw63UB xwBc1rKohG24qrVFsxe52VwopgRcKQTk66zHBpf0Fd8Xu7TkoYIsOVj610XB45GEF3kG Mtv48uTXlsLw3iQOFHYYdINgyfL24qH+rK9N51beHImFh5X0k9BpAhPsvhHUXG3COCix 5geMwFsc7cKIozOIvHbHqGb0tKnwtzXf7/QK056YQIF96MjjcI6toarhLaiTQgPF2SaU r/lg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id ci6-20020a5d5d86000000b0031fe51902bdsi784350wrb.0.2023.10.12.00.15.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Oct 2023 00:15:39 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 39C7FbH9030211 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Oct 2023 09:15:38 +0200 Message-ID: Subject: Re: [PATCH] meta: optee-client: Generalize and update shutdown rule From: Uladzimir Bely To: Jan Kiszka , isar-users Cc: "Su, Bao Cheng (RC-CN DF FA R&D)" , "Lopes Ivo, Diogo Miguel (T CED IFD-PT)" Date: Thu, 12 Oct 2023 10:15:39 +0300 In-Reply-To: <9f958987-bf89-4dd6-8242-f4e5c90aad1f@siemens.com> References: <9f958987-bf89-4dd6-8242-f4e5c90aad1f@siemens.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 9PEpjsrvm4aq On Thu, 2023-10-12 at 09:01 +0200, 'Jan Kiszka' via isar-users wrote: > On 11.10.23 16:36, 'Jan Kiszka' via isar-users wrote: > > From: Jan Kiszka > >=20 > > First, naming changed somewhere between kernel 5.10 and 6.1 so that > > optee-ta-bc50d971... is now optee-ta-supp-bc50d971... > >=20 > > And then we should account for possibly more devices that need to > > be > > unbound. Use POSIX-compliant shell code for this. > >=20 > > The generic loop allows to drop the explicit unmounting of efivarfs > > because the corresponding driver will already get unbound. > >=20 > > Signed-off-by: Jan Kiszka > > --- > > =C2=A0.../optee-client/files/debian/tee-supplicant.service=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 3 > > +-- > > =C2=A01 file changed, 1 insertion(+), 2 deletions(-) > >=20 > > 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=3Doneshot > > =C2=A0RemainAfterExit=3Dyes > > =C2=A0# Start if not already started by the initramfs hook > > =C2=A0ExecStart=3D/bin/sh -c '/usr/bin/pgrep tee-supplicant >/dev/null = || > > /usr/sbin/tee-supplicant -d' > > -ExecStop=3D/bin/sh -c '/usr/bin/findmnt /sys/firmware/efi/efivars > > >/dev/null && /usr/bin/umount /sys/firmware/efi/efivars || true' > > -ExecStop=3D/bin/sh -c 'echo -n optee-ta-bc50d971-d4c9-42c4-82cb- > > 343fb7f37896 > /sys/bus/tee/drivers/optee-ftpm/unbind || true' > > +ExecStop=3D/bin/sh -c 'for dev in /sys/bus/tee/devices/*; do case > > "$dev" in *optee-ta-*) basename "$dev" > "$dev"/driver/unbind;; > > esac done' > > =C2=A0ExecStop=3D/usr/bin/pkill tee-supplicant > > =C2=A0 > > =C2=A0[Install] >=20 > Would be nice to get this quickly merged as well, then we could drop > all > isar patches again downstream. >=20 The patch (as soon as another optee-client patch) are currently under CI testing (together with 3rd version of HOST_ARCH* patchset which now is OK with repro_test). If it passes OK (I expect by the end of the day) the patches will be merged. If there are some problems, I'll then check them separately. > Jan >=20 > --=20 > Siemens AG, Technology > Linux Expert Center >=20