From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web11.206.1587382307147123183 for ; Mon, 20 Apr 2020 04:31:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YQHpfwek; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587382306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3Jtv2BCOEEHASpUgAxymXHLSakIhD7Xl1eZtrLZahc0=; b=YQHpfwek0eBXQO++2Dfd9OakboNpbBY3x9S7NAjooF5LAp+xuj6E6IA0V4DydV03OnaeL7 uD+5U7LI4HajXvdvQE9AblkjqDJG5CeT9NazY6ogXnK/9j3S1Mo9++TdkeNFDbWUkRQVqY AnP+LKnMHgYbwLLWrx0vhadvig6X4ps= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-424-fCf_NsY0MhqywfDLpMDs9Q-1; Mon, 20 Apr 2020 07:31:44 -0400 X-MC-Unique: fCf_NsY0MhqywfDLpMDs9Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2DBE7107ACCC; Mon, 20 Apr 2020 11:31:43 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-228.ams2.redhat.com [10.36.114.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id C441C1001DD8; Mon, 20 Apr 2020 11:31:41 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 4/6] MdeModulePkg/SecurityManagementLib: Mark the File parameter as OPTIONAL To: devel@edk2.groups.io, guomin.jiang@intel.com Cc: Jian J Wang , Hao A Wu , Dandan Bi , Liming Gao References: <20200416073354.2232-1-guomin.jiang@intel.com> <20200416073354.2232-5-guomin.jiang@intel.com> From: "Laszlo Ersek" Message-ID: <6998ac5f-08a4-ed35-89d1-5ebb7ed5be94@redhat.com> Date: Mon, 20 Apr 2020 13:31:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200416073354.2232-5-guomin.jiang@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 04/16/20 09:33, Guomin Jiang wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2652 > > According to the File description, the File is optional and can be NULL. > > Signed-off-by: Guomin Jiang > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Dandan Bi > Cc: Liming Gao > --- > MdeModulePkg/Include/Library/SecurityManagementLib.h | 2 +- > .../Library/DxeSecurityManagementLib/DxeSecurityManagementLib.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Include/Library/SecurityManagementLib.h b/MdeModulePkg/Include/Library/SecurityManagementLib.h > index c6ef8c38b9..9bb29121af 100644 > --- a/MdeModulePkg/Include/Library/SecurityManagementLib.h > +++ b/MdeModulePkg/Include/Library/SecurityManagementLib.h > @@ -261,7 +261,7 @@ EFIAPI > ExecuteSecurity2Handlers ( > IN UINT32 AuthenticationOperation, > IN UINT32 AuthenticationStatus, > - IN CONST EFI_DEVICE_PATH_PROTOCOL *File, > + IN CONST EFI_DEVICE_PATH_PROTOCOL *File, OPTIONAL > IN VOID *FileBuffer, > IN UINTN FileSize, > IN BOOLEAN BootPolicy > diff --git a/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.c b/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.c > index b541dbab3c..de1eb53183 100644 > --- a/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.c > +++ b/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.c > @@ -473,7 +473,7 @@ EFIAPI > ExecuteSecurity2Handlers ( > IN UINT32 AuthenticationOperation, > IN UINT32 AuthenticationStatus, > - IN CONST EFI_DEVICE_PATH_PROTOCOL *File, > + IN CONST EFI_DEVICE_PATH_PROTOCOL *File, OPTIONAL > IN VOID *FileBuffer, > IN UINTN FileSize, > IN BOOLEAN BootPolicy > The documentation of the ExecuteSecurity2Handlers() function again mixes "File" and "DevicePath". All of those should be in sync. Laszlo