From patchwork Tue Sep 12 09:44:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rong Tao X-Patchwork-Id: 138281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp510110vqx; Tue, 12 Sep 2023 09:03:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4zhbvbcqn3qxkQGNu2VTty/WZi8Ro67BhThDyw63N0ZIMS2ErDpud3i3MtaBoCcDqRUTN X-Received: by 2002:a17:903:1245:b0:1bb:9506:d47c with SMTP id u5-20020a170903124500b001bb9506d47cmr241313plh.19.1694534613355; Tue, 12 Sep 2023 09:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694534613; cv=none; d=google.com; s=arc-20160816; b=lWsUd+NqhrPmNsLGeTMlF6Bi73tvpCjqpbJGxZ5qeFKJz7XF7LWyQLJdC27ybgRc3P rYnx2sz23THrpRJUA/zEGjMHTIUSsPyLipyLBc2E5HUYM2dxXroFxbVxoMtn4NBeWoQR dhlX4OFbkBcR1yMwCUNpGpLxzmGiOUJjlc+NEJrMDcb+yQ6to8a0W8nG8Mwn3ld6/eZe 5g5Fpq51s012trcJYh2b3CVyKFEp0DinFfV8Fqfla8Q/MGnckVX+bwjc/zMqtKSJVpdF 3hLnl2G2tXvjOdJWFJNR7lfkFf9bPIVum2QaVoh+rJPgViriX03XpolwnAd73O8lF+vu Jiaw== 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:date :subject:cc:to:from:message-id:dkim-signature; bh=J8OG1iDcDUUGJihJuHEXuEHvND3G6wC1Te9rWSjo4Xs=; fh=ayXkY1ULEskAJRazdQpnzDxXsBhGnlHHzabjheE8gM0=; b=m7qV97qdDvRlTwIa2uvXWBnL/fUZzLRNuzX54t6xRpCg3QLwOoRU0iC+L1BVSTKA8v CJTf6/C9Dr6xfntitvBvkNmtSzpT/pJY8yxVSkqpUkmwt4+WVDkt602InNwUgXOQpKhF Uj1VEFMCSyG4jVjQ/Cj7CLV/cA760Y0XI0Wv0i5ZoAhTySbXqW5RuyMbEj48GZbWUPOG KvAW8GvPa1cUxzrM7XVPM5ncZHIuJqcYIc6BsGxK5Lok0sEdxhsYLflrLVGX62CkvBcn ZPKX5lX/74A9icS89TNkbeIRhfO4kNaQj3p87OyAirWtNNs9rglOuDto3ws042mel/R5 s7vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=YeleF8j5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id kh11-20020a170903064b00b001b53b6b029csi7946540plb.124.2023.09.12.09.03.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 09:03:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=YeleF8j5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 79FE883F533C; Tue, 12 Sep 2023 02:50:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233087AbjILJux (ORCPT + 37 others); Tue, 12 Sep 2023 05:50:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233345AbjILJul (ORCPT ); Tue, 12 Sep 2023 05:50:41 -0400 Received: from out203-205-251-36.mail.qq.com (out203-205-251-36.mail.qq.com [203.205.251.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 654DBCC3 for ; Tue, 12 Sep 2023 02:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1694512233; bh=J8OG1iDcDUUGJihJuHEXuEHvND3G6wC1Te9rWSjo4Xs=; h=From:To:Cc:Subject:Date; b=YeleF8j5SUPfynJnnTIjL0ZtVHKTiYPD6IBAhJ3Pq742Rm1WJFHRQeWA+aXxQOmN0 whg0Z5VXl5zchk8ayo0gU2y77IPHhomrGbZT2EKPfuaoFGG5EsbvVDa6cXnGaVneWG LHFWvoAVRxL3X3etIJWRXlcMgt+Ke2mdRvu5wmEY= Received: from RT-NUC.. ([39.156.73.12]) by newxmesmtplogicsvrsza10-0.qq.com (NewEsmtp) with SMTP id B15A362E; Tue, 12 Sep 2023 17:44:21 +0800 X-QQ-mid: xmsmtpt1694511861txywrzvke Message-ID: X-QQ-XMAILINFO: N7h1OCCDntuj3Jw3MGR/HNLy16DTxTk1+HhzVP8aw736QxVaYN1b97gQvnSr+o X1giU9NshOBTkctUKKnOlm1Gvge0CSwzap3JggcW0rwBNkzyY+FSRSu/gehsH3QwI+Pk2HFCZry8 n/SVI2K583clUnm1Hx60M6p2CRyiJmvE5Eg0tgTWSMIE/i5jAIgIC4NbubsJPj07FdKJRtlkp30E KKiNu62ZbYiKeOhQ7BTq6FyVfTckMTHK7twCIxOpoQL454JtzntWwahO1HSioKySVIRZeVFPZNGi 34GYQ9pTpdBfVbzcsBVPvixN3Hc+io1gwjJlzaqxutFNrGXRTy34w2ecUHn6qVkcoDaxy1BljZTK qTpCGRR15VXlj+pA/5fDR4aJnogCetHhM4b2j08ThMV+pfLTWj21cjm9hywPAxcUGCq/u2TXolXC xCVP0Ks6SDvz5Kmad7syBsvj9IhrhZSLcQItRHpviqXwXWD54PyQwUF9VbCBDmQ1ERMOxNkYEkEJ 8gBUFzLNRejHP6yoPfgHQclBB0hEh1ZhdEcVKojSzHg5iatWQzQ1awMgZrptjo8WTbTKr65Aa1Ep W8CEm4pH4HXCdJyYo8VZpFoprR55tPk+NVGmoEIoyjzky/h8NIEmONM6Nbv4/pDUACJ6RK4OW9p5 ynRUZfgJdT65FgnSA6usScm8r22+Staev6lMxxybfmznkrNG1N4X9CK5PusVCzPzcvhretr2KXk1 bG5gQJkeUkXZv5KZNpFS+xmGQHYKmKO2GJWQPCkG1O8TDXgRQ/0YL6QffkU7mC5TXvR3xuVn9zAl bJhVXW9074RguYYrCqgw93P92iENMFm/Vs7QGfiAE1XrofFWnhxkrhSGPRNDFeusL3EvQr7SLOxN gkwY/oRUoaRYZOXCLQJqIazdYRavrDXGlliRZ8SiegdTS46KIQWg+Rp5i5PT1QJr32SKOyesmZ7x JUIpulD1/ku8XKkwTlk7F2XoTfiqYMhUZzbllD+jIDB8xId2ygpsaDad1iX4s4 X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= From: Rong Tao To: ardb@kernel.org, rongtao@cestc.cn, rtoax@foxmail.com Cc: linux-efi@vger.kernel.org (open list:EXTENSIBLE FIRMWARE INTERFACE (EFI)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] efi: Add new variable attributes Date: Tue, 12 Sep 2023 17:44:20 +0800 X-OQ-MSGID: <20230912094420.135737-1-rtoax@foxmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 02:50:57 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776848326516838878 X-GMAIL-MSGID: 1776848326516838878 From: Rong Tao More recent versions of the UEFI spec have added a new attribute for variables [0]. Add it. [0] https://uefi.org/specs/UEFI/2.10/08_Services_Runtime_Services.html#getvariable Signed-off-by: Rong Tao --- include/linux/efi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/efi.h b/include/linux/efi.h index 80b21d1c6eaf..f15835873b31 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -928,6 +928,7 @@ extern int efi_status_to_err(efi_status_t status); #define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x0000000000000010 #define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x0000000000000020 #define EFI_VARIABLE_APPEND_WRITE 0x0000000000000040 +#define EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS 0x0000000000000080 #define EFI_VARIABLE_MASK (EFI_VARIABLE_NON_VOLATILE | \ EFI_VARIABLE_BOOTSERVICE_ACCESS | \ @@ -935,7 +936,8 @@ extern int efi_status_to_err(efi_status_t status); EFI_VARIABLE_HARDWARE_ERROR_RECORD | \ EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \ EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | \ - EFI_VARIABLE_APPEND_WRITE) + EFI_VARIABLE_APPEND_WRITE | \ + EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS) /* * Length of a GUID string (strlen("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")) * not including trailing NUL