public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: "'xueshengfeng'" <xueshengfeng@byosoft.com.cn>, <devel@edk2.groups.io>
Cc: <edhaya.chandran@arm.com>, <samer.el-haj-mahmoud@arm.com>,
	<sunny.wang@arm.com>, "'Lijun10x'" <junx1.li@intel.com>
Subject: 回复: [PATCH] MdeModulePkg/Variable: SCT run AuthVar_conf is failed
Date: Tue, 5 Jul 2022 08:54:12 +0800	[thread overview]
Message-ID: <005701d89009$be294230$3a7bc690$@byosoft.com.cn> (raw)
In-Reply-To: <7d6c057e3c99869d75dd11d3a77671a3ec33ef2e.1656642493.git.junx1.li@intel.com>

Jun:
  I agree this change. You can add my reviewed-by. 

Thanks
Liming
> -----邮件原件-----
> 发件人: xueshengfeng <xueshengfeng@byosoft.com.cn>
> 发送时间: 2022年7月4日 18:00
> 收件人: devel@edk2.groups.io
> 抄送: gaoliming@byosoft.com.cn; edhaya.chandran@arm.com;
> samer.el-haj-mahmoud@arm.com; sunny.wang@arm.com; Lijun10x
> <junx1.li@intel.com>
> 主题: [PATCH] MdeModulePkg/Variable: SCT run AuthVar_conf is failed
> 
> From: Lijun10x <junx1.li@intel.com>
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3969
> 
> Attr are
> EFI_VARIABLE_NON_VOLATILE|VARIABLE_AUTHENTICATED_WRITE_ACCESS
> ,
> will return EFI_INVALID_PARAMETER.
> Added one case, only when one attribute is EFI_VARIABLE_NON_VOLATILE
> will EFI_INVALID_PARAMETER be returned.
> If attr are
> EFI_VARIABLE_NON_VOLATILE|VARIABLE_AUTHENTICATED_WRITE_ACCESS
> will return EFI_UNSUPPORTED.
> In the UEFI2.7 spec, there is a description as below:
> EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should
> not be
> used. Platforms should return EFI_UNSUPPORTED if a caller to
> SetVariable() specifies this attribute.
> 
> Signed-off-by: JunX1 Li <junx1.li@intel.com>
> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> Reviewed-by: G Edhaya Chandran <edhaya.chandran@arm.com>
> Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
> ---
>  MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> index 6c1a3440ac..14c176887a 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> @@ -2676,7 +2676,11 @@ VariableServiceSetVariable (
>      //
>      // Only EFI_VARIABLE_NON_VOLATILE attribute is invalid
>      //
> -    return EFI_INVALID_PARAMETER;
> +    if ((Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0)
> {
> +      return EFI_UNSUPPORTED;
> +    } else {
> +      return EFI_INVALID_PARAMETER;
> +    }
>    } else if ((Attributes & VARIABLE_ATTRIBUTE_AT_AW) != 0) {
>      if (!mVariableModuleGlobal->VariableGlobal.AuthSupport) {
>        //
> --
> 2.26.2.windows.1




  reply	other threads:[~2022-07-05  0:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04  9:59 [PATCH] MdeModulePkg/Variable: SCT run AuthVar_conf is failed xueshengfeng
2022-07-05  0:54 ` gaoliming [this message]
2022-07-14 14:59 ` Sunny Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='005701d89009$be294230$3a7bc690$@byosoft.com.cn' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox