From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::141; helo=mail-it1-x141.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x141.google.com (mail-it1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 70ACC21962301 for ; Fri, 18 Jan 2019 03:13:25 -0800 (PST) Received: by mail-it1-x141.google.com with SMTP id m62so6152653ith.5 for ; Fri, 18 Jan 2019 03:13:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C7h5THXqeGn6sh/D/ujpEyN6jvv2OX3ZnadIiFC9voA=; b=B4Inq/vtkbQnGDO+tiO8EDeZ+iDwg743h19zoVhtNFQ73ELTte8S9BcGcBSPatTbKO +xzmj+lepu/m8p+sVQ/eTf4Ul+EV52ydPwcBi7doRt8+Lx1tvQvbJmr/sJnSp8weNV7T EJI076jjIaKupmf8iEWScF0Dovag0J/gBF6N8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C7h5THXqeGn6sh/D/ujpEyN6jvv2OX3ZnadIiFC9voA=; b=HwVdkGcj2eldNIWi4+KzUlHB9wNJeexE67nKSOJkEx6Rf/hBc0k7U0ZcHYE8sHRlIP SMMiqUyC7maim49Ub0XrAJUeyEjEOm1G46+aGZR4m9W5v/IZsc98zfRxVqA11DbIAHvp Pkftpr3kHgr6OGmCZ7XdcozWFy4z/Q9HQDNCu1S7sC6bI7/DUCJHn2ogCUVOFsHwKcRr yktshqXBOXWnwCMSbE0pSEChPUcEcJwvWma+ILkVCMRKFNUsjwngTzSAy6qZReBJmGai nWvy6wlF59YuKmiF17rWC6m9e7qcPSZ9WudkZzsfJJaf/bOMbMrXV+LaEo0h4WXN4BVd OxCg== X-Gm-Message-State: AJcUukd1yRh4iQP8ObX6ArDxUa6Vtid1m3dHXmT4txFDia8Zd09NHpWR kI4Qm+Qei+58BVr/z0rZgvWpuHIlm1oghK/HBtstfw== X-Google-Smtp-Source: ALg8bN5jBZOru3dpnE8FSNn5PGU1iKLx9vC8f7s8snDdAVT3m5R7CLmWKATpORKLZqoQQCLpLwoyYiRHrjYEmJ1cR24= X-Received: by 2002:a05:660c:4b:: with SMTP id p11mr11060844itk.71.1547810004574; Fri, 18 Jan 2019 03:13:24 -0800 (PST) MIME-Version: 1.0 References: <20190116212221.7460-1-ard.biesheuvel@linaro.org> <20190116212221.7460-3-ard.biesheuvel@linaro.org> In-Reply-To: From: Ard Biesheuvel Date: Fri, 18 Jan 2019 12:13:13 +0100 Message-ID: To: "Wang, Jian J" Cc: "edk2-devel@lists.01.org" , "Kinney, Michael D" , "Gao, Liming" , "Ye, Ting" , "Wei, Gang" , "Zhang, Chao B" , "Yao, Jiewen" , "Wu, Hao A" , "Zeng, Star" , Achin Gupta , Jagadeesh Ujja Subject: Re: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by MM_STANDALONE modules X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 11:13:25 -0000 Content-Type: text/plain; charset="UTF-8" On Fri, 18 Jan 2019 at 08:06, Wang, Jian J wrote: > > > > Reviewed-by: Jian J Wang > Chao, Jiewen, do you have any objections to this patch? > > > -----Original Message----- > > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > > Sent: Thursday, January 17, 2019 5:22 AM > > To: edk2-devel@lists.01.org > > Cc: Ard Biesheuvel ; Kinney, Michael D > > ; Gao, Liming ; Ye, Ting > > ; Wei, Gang ; Wang, Jian J > > ; Zhang, Chao B ; Yao, > > Jiewen ; Wu, Hao A ; Zeng, Star > > ; Achin Gupta ; Jagadeesh Ujja > > > > Subject: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by > > MM_STANDALONE modules > > > > Add MM_STANDALONE to the list of module types that are permitted to > > link to this library. Also, since the constructor prototype is > > different between MM_STANDALONE and DXE_DRIVER type libraries, > > convert the library into BASE type. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Ard Biesheuvel > > --- > > SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c | 9 +++++- > > --- > > SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf | 4 ++-- > > 2 files changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > index 0c6ded22f3e6..b2493a029393 100644 > > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY > > KIND, EITHER EXPRESS OR IMPLIED. > > > > **/ > > > > +#include > > + > > BOOLEAN mUserPhysicalPresence = FALSE; > > > > /** > > @@ -53,15 +55,14 @@ UserPhysicalPresent ( > > @retval EFI_SUCCESS PcdUserPhysicalPresence is got successfully. > > > > **/ > > -EFI_STATUS > > +RETURN_STATUS > > EFIAPI > > PlatformSecureLibNullConstructor ( > > - IN EFI_HANDLE ImageHandle, > > - IN EFI_SYSTEM_TABLE *SystemTable > > + VOID > > ) > > { > > > > mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence); > > > > - return EFI_SUCCESS; > > + return RETURN_SUCCESS; > > } > > diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > index 979a33705de0..70051a27a0a9 100644 > > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > @@ -21,9 +21,9 @@ [Defines] > > BASE_NAME = PlatformSecureLibNull > > MODULE_UNI_FILE = PlatformSecureLibNull.uni > > FILE_GUID = 7FA68D82-10A4-4e71-9524-D3D9500D3CDF > > - MODULE_TYPE = DXE_DRIVER > > + MODULE_TYPE = BASE > > VERSION_STRING = 1.0 > > - LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER > > DXE_SMM_DRIVER DXE_DRIVER > > + LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER > > DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE > > CONSTRUCTOR = PlatformSecureLibNullConstructor > > > > # > > -- > > 2.17.1 >