From patchwork Tue May 5 15:44:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 87513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6BD8CD3440 for ; Tue, 5 May 2026 15:44:36 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.151.1777995874071490347 for ; Tue, 05 May 2026 08:44:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=PRf1yo2e; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 036362681 for ; Tue, 5 May 2026 08:44:28 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 006153F836 for ; Tue, 5 May 2026 08:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1777995873; bh=2n9E36Kt1lyg0V481K3Gz0vdylQQVb8ENLSxe2UAK3Q=; h=From:To:Subject:Date:From; b=PRf1yo2eg58Dn2EAJ4nMtD9ITg/ZYVRzseCUGvQuCKzj0U+CiHHdbuvOFhuPfBo4A /KM6rNLcun1N7nIKIpkLW0jCvT/3DE7+zwEcuKHtqDcVKo0+GZy/9pVh3Dlochic/z V1rv5ej1kBRAfIGPydS18lvXD6QRFfNzfB5dL+f4= From: Ross Burton To: yocto-patches@lists.yoctoproject.org Subject: [PATCH][meta-security][meta-parsec 1/3] parsec-service: assign PACKAGECONFIG in one line Date: Tue, 5 May 2026 16:44:21 +0100 Message-ID: <20260505154423.535572-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 05 May 2026 15:44:36 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/3916 By :appending the TPM option we make it impossible for distros to simply assign to PACKAGECONFIG. Signed-off-by: Ross Burton --- .../recipes-parsec/parsec-service/parsec-service_1.5.0.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb index d88f1b2..c5f9978 100644 --- a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb +++ b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb @@ -16,9 +16,8 @@ SRC_URI[parsec-service-1.5.0.sha256sum] = "819f1f658a1c62fee1b4986fe33232d5dc539 B = "${CARGO_VENDORING_DIRECTORY}/${BP}" -PACKAGECONFIG ??= "PKCS11 MBED-CRYPTO" have_TPM = "${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', 'TPM', '', d)}" -PACKAGECONFIG:append = " ${@bb.utils.contains('BBFILE_COLLECTIONS', 'tpm-layer', '${have_TPM}', '', d)}" +PACKAGECONFIG ??= "PKCS11 MBED-CRYPTO ${@bb.utils.contains('BBFILE_COLLECTIONS', 'tpm-layer', '${have_TPM}', '', d)}" PACKAGECONFIG[TPM] = "-F tpm-provider -F tss-esapi/generate-bindings,,tpm2-tss,tpm2-tss libtss2-tcti-device" PACKAGECONFIG[PKCS11] = "-F pkcs11-provider -F cryptoki/generate-bindings," From patchwork Tue May 5 15:44:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 87511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACD8BFF8855 for ; Tue, 5 May 2026 15:44:36 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.153.1777995874603152705 for ; Tue, 05 May 2026 08:44:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=dzXsuHIn; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A8665293B for ; Tue, 5 May 2026 08:44:28 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AE0873F836 for ; Tue, 5 May 2026 08:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1777995874; bh=gyIWnNl+Y/TkBM87iKwgWboQRfyqTb8wHAk3Sw4KUzY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dzXsuHInlSeGSspxxJi5H/S7xIsUqW0JeiLeaPnk5yVcbr5g0dxoWdVQMkCohxNlC h+ljeokeXwZgyrhb2byRMEPhARRrWGfk5AudvU8VOww/DpZMXYU6H3RHYJ/brUdMBB AtNmQ3ey6p3i9qAPloePGm8dwGzKsu4P4sV00o18= From: Ross Burton To: yocto-patches@lists.yoctoproject.org Subject: [PATCH][meta-security][meta-parsec 2/3] parsec-service: do group membership modifications in useradd Date: Tue, 5 May 2026 16:44:22 +0100 Message-ID: <20260505154423.535572-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260505154423.535572-1-ross.burton@arm.com> References: <20260505154423.535572-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 05 May 2026 15:44:36 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/3917 Instead of calling groupmems after creating the user, we can tell useradd to do the group membership when creating the user. There are several reasons for this: 1) Consolidation of the calls into a single call means creation is atomic, it either worked or it did not. 2) The existing logic doesn't work if both TPM and TS were enabled. 3) GROUPMEMS_PARAM is broken in oe-core master[1] and this will not be fixed as groupmems has been removed from shadow[2]. Instead, construct a list of groups that parsec needs to be a member of, and pass them to useradd. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=16277 [2] shadow 388ce70 "*/: groupmems(8): Remove program" Signed-off-by: Ross Burton --- .../parsec-service/parsec-service_1.5.0.bb | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb index c5f9978..0268c0e 100644 --- a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb +++ b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb @@ -72,9 +72,22 @@ do_install () { inherit useradd USERADD_PACKAGES = "${PN}" GROUPADD_PARAM:${PN} = "-r parsec" -USERADD_PARAM:${PN} = "-r -g parsec -s /usr/sbin/nologin -d ${localstatedir}/lib/parsec parsec" -GROUPMEMS_PARAM:${PN} = "${@bb.utils.contains('PACKAGECONFIG_CONFARGS', 'tpm-provider', '-a parsec -g tss ;', '', d)}" -GROUPMEMS_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG_CONFARGS', 'trusted-service-provider', '-a parsec -g tee', '', d)}" +USERADD_PARAM:${PN} = "\ + --system \ + --gid parsec \ + --shell /usr/sbin/nologin \ + --home-dir ${localstatedir}/lib/parsec \ + ${@parsec_groups(d)} \ + parsec" + +def parsec_groups(d): + groups = [] + config = d.getVar("PACKAGECONFIG").split() + if "TPM" in config: + groups.append("tss") + if "TS" in config: + groups.append("teeclnt") + return "--groups " + ",".join(groups) if groups else "" FILES:${PN} += " \ ${sysconfdir}/parsec/config.toml \ From patchwork Tue May 5 15:44:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 87512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E41DCD3427 for ; Tue, 5 May 2026 15:44:36 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.155.1777995875305998580 for ; Tue, 05 May 2026 08:44:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=WhDxFd8B; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 621AB2681 for ; Tue, 5 May 2026 08:44:29 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5EB913F836 for ; Tue, 5 May 2026 08:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1777995874; bh=Hq8PeOlCCm2PiM3JJkhrD6frXScxKIxwmjw+EN1FoNI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WhDxFd8BD2yAOMWXElSY9jzwWd7eGzNc3+kah1XRkIYTNlS/yZqhXH9yj+gfs+0GK EaI4pndHJTy1H9+PNJ2Vk08aLDDlKd/ILnuXDCsC5PhwhCp+V/oP8BFntmXJmgqpJ7 r+h8lKCnT41rhWK+DxcsKsuDSpNLBL6A/4ZyE7pE= From: Ross Burton To: yocto-patches@lists.yoctoproject.org Subject: [PATCH][meta-security][meta-parsec 3/3] parsec-service: update TS group name Date: Tue, 5 May 2026 16:44:23 +0100 Message-ID: <20260505154423.535572-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260505154423.535572-1-ross.burton@arm.com> References: <20260505154423.535572-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 05 May 2026 15:44:36 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/3918 meta-arm recently changed the group name that is used by TS[1], so update the group name to match. [1] meta-arm 595cb0f1a0 ("arm/trusted-services: fix udev management in libts") Signed-off-by: Ross Burton --- .../recipes-parsec/parsec-service/parsec-service_1.5.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb index 0268c0e..857a3c8 100644 --- a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb +++ b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.5.0.bb @@ -86,7 +86,7 @@ def parsec_groups(d): if "TPM" in config: groups.append("tss") if "TS" in config: - groups.append("teeclnt") + groups.append("tee") return "--groups " + ",".join(groups) if groups else "" FILES:${PN} += " \