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: 721865 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 B3650CA0EC3 for ; Tue, 12 Sep 2023 09:56:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233077AbjILJ4z (ORCPT ); Tue, 12 Sep 2023 05:56:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230345AbjILJ4z (ORCPT ); Tue, 12 Sep 2023 05:56:55 -0400 X-Greylist: delayed 242 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 12 Sep 2023 02:56:50 PDT Received: from out203-205-221-245.mail.qq.com (out203-205-221-245.mail.qq.com [203.205.221.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C37F01BB for ; Tue, 12 Sep 2023 02:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1694512608; bh=J8OG1iDcDUUGJihJuHEXuEHvND3G6wC1Te9rWSjo4Xs=; h=From:To:Cc:Subject:Date; b=zbENxDD8miV/BhL0wlTqUoqblfPRr8AHdP1fLb9aAzC4HvjG2+Usv54hMlnHOfgoZ jpRgAwJlKZIbGx/eez+l0u51z1sNFuyInlKVFSz/fxugmoCad+qv9q7bGcWM4XLgdF dGMBPJdPCbPflQy88rNdqGM4/APhmpkKLG8i/c98= Received: from RT-NUC.. ([39.156.73.12]) by newxmesmtplogicsvrsza10-0.qq.com (NewEsmtp) with SMTP id B15A362E; Tue, 12 Sep 2023 17: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iX4s4 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-efi@vger.kernel.org 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