Message ID | 20230210080401.345462-7-ajd@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp820724wrn; Fri, 10 Feb 2023 00:06:19 -0800 (PST) X-Google-Smtp-Source: AK7set/vNdZf47Tytz3gk6Nifm+BAJlTOvjj5o9hr3QK4896DdK90mdqRv6lPp7UZgOSZnhUV6lH X-Received: by 2002:a17:906:380d:b0:879:2a5:dc3c with SMTP id v13-20020a170906380d00b0087902a5dc3cmr14511696ejc.40.1676016379183; Fri, 10 Feb 2023 00:06:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676016379; cv=none; d=google.com; s=arc-20160816; b=TVM/Vi4ELXmYR81n1R5Up7YxyEEesc6l/dn7LDflqxkTmYWI1RQS7Rx2Oa6WycZJPW jcNg0UbufEBozFIjw41dm0h+cMTpteWFPGEIDoHRWebqwitllb3AyuI1+m9A4C/QHGLr uw/bI1uJnlrv1o4yEcO9K0AQg7+amtTG1eKv5hLuKVkAvkLwNLWOhMSYNOA2KTM/Bi7f kMfTw92SEyf0fxX1oTqwzUkSCdPTOqIPkLLXh/XcG42Szp1g+4Bmo2xW6DWVovIIefNE LioiyeppAfNHcsL6igN9BHk0fQuPkm3puJHGYuSXH7PWqioOW+jdUtsa+AD1IpC/eVrz Xn6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SH2UbH2B3c2icAgR9z8QB14k/xdDG7GU+NiJiqoJMLw=; b=htYGsGgcQ+C2bKXQweXYKhTj/FbQdOuuTvSmZdys8GVJCIPhXR6rppreGBIp58gNFT i5exk5r1JCmPRdEuF44zAuoGv5kl+QArljEHC7U0GHs2+YxhiTOfj4s4/hOb0UyEE2Gn 7ny8ki7eTKQq2CBUmb4pcC2cg7goAToP9zynqNG9mujyN78nyEw1sOZH9zRhKQZz6PDy 4pRQdPMcOZb/8koyzL1B8PrkJXG7aMx8kyFj+kmlWFieX0h0/9DBMxmsA+VP797rSJB7 UXea1toMeaAVAuE0XolJgckhoneqC72n9e6qABfbfsX7oEmU93REU0wYCyUhyFt5/76H CQcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UizX3jIM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu17-20020a1709068a9100b0089f801f770csi3990137ejc.585.2023.02.10.00.05.55; Fri, 10 Feb 2023 00:06:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UizX3jIM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231405AbjBJIEm (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Fri, 10 Feb 2023 03:04:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231524AbjBJIEj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Feb 2023 03:04:39 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4BF580744; Fri, 10 Feb 2023 00:04:34 -0800 (PST) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31A7g6Z2032537; Fri, 10 Feb 2023 08:04:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=SH2UbH2B3c2icAgR9z8QB14k/xdDG7GU+NiJiqoJMLw=; b=UizX3jIMjSc5TdqjtyPNzIE8YRiM9/MwJS+WccISaqUPuLcY1ocG+vefrbpkdVsph2LK 1WgyZsCMIEfoHvWxm66GRBB0SiTtXZlVAwygCvPDTOsue9vxyNYRSa32U2zmS67yzs20 QTOSqu6ScbbTxRqSTjnu1ofjBwvQbVctg9WY/2CRQCFHQ5NhmKfnm5DRAAbQAWrDVlLS sMzaiFuMxzPXzqU9242kThE2TaWszWpftWZaEySeIE/rX5425zFxe40/GcVsuXVrNvfC MVVa5OJ/B0sL35kzMeETH1Ep5imnTzDJxs+jcW6yJ3BReYTVOmbM1k2TZwpHXaENI4nD lA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nnhrurjhf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Feb 2023 08:04:26 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 31A7h2WB002304; Fri, 10 Feb 2023 08:04:25 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nnhrurjfn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Feb 2023 08:04:25 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 31A7MeAH021050; Fri, 10 Feb 2023 08:04:23 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3nhemfq6ca-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Feb 2023 08:04:23 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 31A84KFi22610270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 08:04:20 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A94E82004B; Fri, 10 Feb 2023 08:04:20 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2632C20040; Fri, 10 Feb 2023 08:04:20 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 10 Feb 2023 08:04:20 +0000 (GMT) Received: from jarvis-ozlabs-ibm-com.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (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 DEE0E60805; Fri, 10 Feb 2023 19:04:14 +1100 (AEDT) From: Andrew Donnellan <ajd@linux.ibm.com> To: linuxppc-dev@lists.ozlabs.org, linux-integrity@vger.kernel.org Cc: ruscur@russell.cc, bgray@linux.ibm.com, nayna@linux.ibm.com, gcwilson@linux.ibm.com, gjoyce@linux.ibm.com, brking@linux.ibm.com, stefanb@linux.ibm.com, sudhakar@linux.ibm.com, erichte@linux.ibm.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, zohar@linux.ibm.com, joel@jms.id.au, npiggin@gmail.com Subject: [PATCH v6 06/26] powerpc/secvar: Use sysfs_emit() instead of sprintf() Date: Fri, 10 Feb 2023 19:03:41 +1100 Message-Id: <20230210080401.345462-7-ajd@linux.ibm.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210080401.345462-1-ajd@linux.ibm.com> References: <20230210080401.345462-1-ajd@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: tdmQBz2FKtsx8QTdA6_EOMd18dFRwJtP X-Proofpoint-GUID: ST64kUr2XXAFKFESfCwjMSFrrr1U-_05 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-10_03,2023-02-09_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100070 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757430550747956548?= X-GMAIL-MSGID: =?utf-8?q?1757430550747956548?= |
Series |
pSeries dynamic secure boot secvar interface + platform keyring loading
|
|
Commit Message
Andrew Donnellan
Feb. 10, 2023, 8:03 a.m. UTC
From: Russell Currey <ruscur@russell.cc> The secvar format string and object size sysfs files are both ASCII text, and should use sysfs_emit(). No functional change. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> --- v2: New patch (gregkh) --- arch/powerpc/kernel/secvar-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/secvar-sysfs.c b/arch/powerpc/kernel/secvar-sysfs.c index 702044edf14d..b786d1005027 100644 --- a/arch/powerpc/kernel/secvar-sysfs.c +++ b/arch/powerpc/kernel/secvar-sysfs.c @@ -35,7 +35,7 @@ static ssize_t format_show(struct kobject *kobj, struct kobj_attribute *attr, if (rc) goto out; - rc = sprintf(buf, "%s\n", format); + rc = sysfs_emit(buf, "%s\n", format); out: of_node_put(node); @@ -57,7 +57,7 @@ static ssize_t size_show(struct kobject *kobj, struct kobj_attribute *attr, return rc; } - return sprintf(buf, "%llu\n", dsize); + return sysfs_emit(buf, "%llu\n", dsize); } static ssize_t data_read(struct file *filep, struct kobject *kobj,