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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 585D6C636D3 for ; Tue, 31 Jan 2023 02:54:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230207AbjAaCys (ORCPT ); Mon, 30 Jan 2023 21:54:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbjAaCyo (ORCPT ); Mon, 30 Jan 2023 21:54:44 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC15CB45C; Mon, 30 Jan 2023 18:54:42 -0800 (PST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30V2qm7v010453; Tue, 31 Jan 2023 02:54:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=2x9w1zrojCcY07Kq+MHFQCWrs4Se8Jgz6R92gGVRoHA=; b=lo9kKz9Ra5pkacDIu+ljnrMOqZ79Mlm39/2QcfzxNFXiMhyPD+/s2NFzF5XJF1ps5r4P 99Og4Kr9psSLT2I68leRsBdWFHQf1hztFL/BKKMMzuMgfop+cqUK9WKbqTPqVZGmucDU J1kpsrkipNHarGA1Jc4rfZEzJ3lnnJbrL3bRfPKiPO554yGDz7piDvra5DnEftLuGZA3 aEFFAd+JZIlVweZ0iVVo6TsbvsPuJORsn52VUYgZaqEYoAObZnpkcydQs96Y9UNJq1fO N91wLiyAWkYt+LksM24u/ib8ndrfMA7Zif2eksXkyDv0GtJymVqPAOWYy0PQlpmHCR5K Nw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3netkeg0rc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Jan 2023 02:54:31 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30V2sVxk015393; Tue, 31 Jan 2023 02:54:31 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3netkeg0r2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Jan 2023 02:54:31 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30UGh7rp024026; Tue, 31 Jan 2023 02:54:29 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma01fra.de.ibm.com (PPS) with ESMTPS id 3ncvuqt3vj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Jan 2023 02:54:29 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30V2sQeW30605570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 Jan 2023 02:54:26 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6BED2004E; Tue, 31 Jan 2023 02:54:26 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA87720040; Tue, 31 Jan 2023 02:54:25 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 31 Jan 2023 02:54:25 +0000 (GMT) Received: from [9.192.255.228] (unknown [9.192.255.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id B349C60112; Tue, 31 Jan 2023 13:54:22 +1100 (AEDT) Message-ID: <9f16d86e855f22823ee24e6a6236a16556425f29.camel@linux.ibm.com> Subject: Re: [PATCH v4 22/24] powerpc/pseries: Implement secvars for dynamic secure boot From: Andrew Donnellan To: Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, linux-integrity@vger.kernel.org Cc: sudhakar@linux.ibm.com, bgray@linux.ibm.com, erichte@linux.ibm.com, gregkh@linuxfoundation.org, nayna@linux.ibm.com, linux-kernel@vger.kernel.org, zohar@linux.ibm.com, gjoyce@linux.ibm.com, ruscur@russell.cc, gcwilson@linux.ibm.com, joel@jms.id.au Date: Tue, 31 Jan 2023 13:54:22 +1100 In-Reply-To: References: <20230120074306.1326298-1-ajd@linux.ibm.com> <20230120074306.1326298-23-ajd@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: hshNw6igQM1SdUwtgrRK-7x7reJhyg4p X-Proofpoint-ORIG-GUID: GpSv42SRHTgEBaAug9f99WmxD3IkWYQj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-30_19,2023-01-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 priorityscore=1501 spamscore=0 mlxscore=0 bulkscore=0 impostorscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301310021 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVHVlLCAyMDIzLTAxLTI0IGF0IDE1OjE3ICsxMDAwLCBOaWNob2xhcyBQaWdnaW4gd3JvdGU6 Cj4gPiArc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBwbHBrc192YXJfbmFtZXNbXSA9IHsKPiA+ ICvCoMKgwqDCoMKgwqDCoCJQSyIsCj4gPiArwqDCoMKgwqDCoMKgwqAiS0VLIiwKPiA+ICvCoMKg wqDCoMKgwqDCoCJkYiIsCj4gPiArwqDCoMKgwqDCoMKgwqAiZGJ4IiwKPiA+ICvCoMKgwqDCoMKg wqDCoCJncnViZGIiLAo+ID4gK8KgwqDCoMKgwqDCoMKgImdydWJkYngiLAo+ID4gK8KgwqDCoMKg wqDCoMKgInNiYXQiLAo+ID4gK8KgwqDCoMKgwqDCoMKgIm1vZHVsZWRiIiwKPiA+ICvCoMKgwqDC oMKgwqDCoCJ0cnVzdGVkY2FkYiIsCj4gPiArwqDCoMKgwqDCoMKgwqBOVUxMLAo+ID4gK307Cj4g Cj4gVmFyIGFuZCBrZXkgYXJlIHVzZWQgc29tZXdoYXQgaW50ZXJjaGFuZ2VhYmx5PyBUaGVzZSBh cmUga2V5cywgSQo+IHRoaW5rPwo+IEFuZCBwbHBrcyBjb3VsZCBoYXZlIG90aGVyIHZhcnMgYnV0 IHdlJ3JlIG9ubHkgaW50ZXJlc3RlZCBpbiAoYXQKPiBsZWFzdCBhCj4gc3Vic2V0IG9mKSBrZXlz IGhlcmUgaWYgSSB1bmRlcnN0b29kIHJpZ2h0Lgo+IAo+IEkgZ3Vlc3MgdGhlIHRlcm1pbm9sb2d5 IGlzIGxpa2UgdGhhdCB0aHJvdWdob3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