From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25B44CCF2C4 for ; Sun, 18 Oct 2026 17:11:00 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4j74vQ67Kgz2xqh; Mon, 19 Oct 2026 04:10:58 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1792343458; cv=none; b=NglCvW56mlwKOJs2hD9wDjo9/y/W74wgRmWgjbCItC4/99Df8oFo6BcU2lHVznPMZdGzQenIwuxHULpNpK2jpn/i6yDyGlH3/bzPo7Ra/kooIYt+u0fBriIG+on/pPlot4y/shDm2LtXdTej2ayUo/ITAscK1pzviFHT7LbjskzmKEDGTXHOth/UWgr6nqRVr6k9G8RpEJhYYYljruTEs4Nb6wjKWBNpXfMmEYTMSdwCJRNEfRQyYqiDkcn/7Il8nh6nfz/ljR6+yRshHX3m/n7wLAk0/1/CeHNI0olU/8ZUB1U3wed5nvWp13sREnJNhC4IMfb8DVFBACnOh2Evug== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1792343458; c=relaxed/relaxed; bh=hzuJHGupnQaAjJjAhR5JEAaY4JnTKoh6264OmnsEvzE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QDiVt2ojFNRhMmTqKqGr2obnQ5+5QQoI2Rb50PoH+oWIfBFcRkuVdKX+lwjNVVDqp9Vxi9LImEFv9fbmOSSE9Plnb1ceMZtiDsD8ilgcwlveCHMWiQZ55feAKCPC9WPq7uH2UJr4x/6xAAYAPhKbP9l+yYjpsE8QojsoeaYQMVZpMNyOm35K3+v1AhWuC2KdY5MfTJCdJhut6WvbSURaz7bFyEs+Y+igAlod7/krYGmxypA7lJGQck1NBz3SRezNJiKsBROeeyiiEIrtSHC9ulA4VxgX3KFagWBrLBhsi+TRTkqcLpw0RsLQnbCw7R/qSdAW1mG4EGaeaWUd+XZacQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=GR1ePCBW; dkim-atps=neutral; spf=pass (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=ssrish@linux.ibm.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.ibm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=GR1ePCBW; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=ssrish@linux.ibm.com; receiver=lists.ozlabs.org) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4j74vP5YNFz2xg9 for ; Mon, 19 Oct 2026 04:10:57 +1100 (AEDT) Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69IFEYaI3777338; Sun, 18 Oct 2026 17:10:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=hzuJHGupnQaAjJjAh R5JEAaY4JnTKoh6264OmnsEvzE=; b=GR1ePCBWGLGba5YiG9cATo0JJPXjmDPAc JQ+NbYEHOnXWRKVCD2lJO5BG81A2QWMks1vL5OQI+AvwRkagzMKFyW1785a0NhOJ +21ERibw7GDhZV72Dj/c0SzKtlWScJJTeQPF4VSjGoHFT2vx/e+pWtSRORuwV5qv RxWHTXO7VdafHB6AW4csnpGKais9G2/49/ZFSVvm5K98A+9HyxRBCMDH7CxMG/4L Ra8Efv20Eorz5RwMGQxdtX1Lcox7HuwxRj+bYWCRZkZsx1s3/l6gsfwD281j79mT WIEqrHt81CjgBBS8m4BlpatSL2w9cYPuW8HUvH5H+5NFeWsqlllXA== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4hc0ptepyu-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sun, 18 Oct 2026 17:10:44 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 69IFKPAu2778114; Sun, 18 Oct 2026 17:10:43 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4hcmugt4fw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 18 Oct 2026 17:10:42 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 69IHAcZT54985030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 18 Oct 2026 17:10:39 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D557A2004B; Sun, 18 Oct 2026 17:10:38 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 30BCD20043; Sun, 18 Oct 2026 17:10:27 +0000 (GMT) Received: from li-fc74f8cc-3279-11b2-a85c-ef5828687581.ibm.com (unknown [9.67.125.165]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Sun, 18 Oct 2026 17:10:26 +0000 (GMT) From: Srish Srinivasan To: linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: maddy@linux.ibm.com, ritesh.list@gmail.com, sshegde@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, James.Bottomley@HansenPartnership.com, jarkko@kernel.org, zohar@linux.ibm.com, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, nayna@linux.ibm.com, rnsastry@linux.ibm.com, ssrish@linux.ibm.com Subject: [PATCH v5 9/9] pseries/plpks/wrapkey: expose PKWM wrapping key management to userspace via sysfs Date: Sun, 18 Oct 2026 22:38:44 +0530 Message-ID: <20261018170844.491252-10-ssrish@linux.ibm.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261018170844.491252-1-ssrish@linux.ibm.com> References: <20261018170844.491252-1-ssrish@linux.ibm.com> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE4MDA2NiBTYWx0ZWRfXzfaQPxtIVrRG fP3/jGVrRd0Uj/soo8uyxqMopuIup4S1Gg8jxB0kC15JWAjM6WIQSPnCCE+KE7v2IThBogSnxl9 OH4SVZ7L+gRrY1yDzQGrOh1VhWq7mUQQZTUiIrHAEO7Ezbc4n2fN6r83T8lLvwL2JfDhezL578d aNtbUKlaU9J0xsUrnxnTxQ3BnPBCtsmbVOaig/7Yn/C9vbYRKm2J2Wme9XfHw7u9AwOISv3Yrp9 svne1v8I0tjtg0DTGSHPPhvd1GpLWASl2Bp34rOWna9EfubzXTZOPT4QOS9eJrIm6+9Gz/W+vYl quAENQxAkGqM0XN+IWRrc5khMQ6enJMz89aeYdaZZEGiiujVaMRpyI8tb3rIy/W+e1jpQgQ25s5 h2u39h59EA9K380a+yunL2ILVn465plFxsBmUNiMph4b/nO+hTvM6Kh7fIny8arilOLalbpx/WD Qc6ZKipnRCw2uxHwnrg== X-Authority-Analysis: v=2.4 cv=WNvqzXsR c=1 sm=1 tr=0 ts=6ad4fd94 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=uAbxVGIbfxUO_5tXvNgY:22 a=VnNF1IyMAAAA:8 a=WJGtXZCqwsjrjzYZ0Y4A:9 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE4MDA2NiBTYWx0ZWRfX8iSf7v0ADbpi BeiIdbsE3s7OUMYpTgWBVBuA3h8elK1jaPVnRHxCOQXLp+HqIzd2mXRjJBOdR0RrppLdBHQRvL5 dVRHIgNItXsuxI0mwjhtpPP48PqjH1w= X-Proofpoint-GUID: QRFkzhSB4LYTQdFVLbxU9YtNK_HvG_8T X-Proofpoint-ORIG-GUID: _ZeKVaPBsTgTUZOHYczXmRjBHRSgCP5X X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-18_03,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 spamscore=0 impostorscore=0 phishscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610180066 The PKWM trusted source currently uses a single default wrapping key created during initialization. However, PKWM also supports user-created wrapping keys for better isolation between trusted keys. Expose wrapping key lifecycle operations through sysfs to allow users to create and manage their own wrapping keys. Create a sysfs interface at /sys/firmware/plpks/wrapkey with the following attributes: create - Create a new wrapping key with a user-provided label delete - Delete a revoked wrapping key by label revoke - Revoke a wrapping key by label unrevoke - Unrevoke a previously revoked wrapping key by label list_active - List labels of all active (non-revoked) wrapping keys list_revoked - List labels of all revoked wrapping keys User-provided labels are validated to contain only alphanumeric characters. Wrapping key lifecycle constraints: - A wrapping key must be revoked before it can be deleted - Revoked wrapping keys cannot be used for wrap operations until unrevoked - The label "default-wrapping-key" is reserved for the default wrapping key and cannot be managed through this interface The wrapping keys themselves are confidential objects stored in PLPKS. Only their labels are exposed to userspace for identification and management purposes. These user-created wrapping keys can be used in seal operations via the wrapping_key=