From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) Received: from mga04.intel.com (mga04.intel.com []) by groups.io with SMTP; Sun, 21 Jul 2019 21:52:54 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jul 2019 21:52:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,293,1559545200"; d="scan'208";a="188527056" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 21 Jul 2019 21:52:52 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Jian J Wang , Hao A Wu , Ray Ni , Star Zeng , Liming gao , Sean Brogan , Michael Turner Subject: [PATCH 3/5] MdeModulePkg/SecurityLockAuditLibNull: Add null version lib Date: Mon, 22 Jul 2019 12:02:02 +0800 Message-Id: <20190722040204.33108-4-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190722040204.33108-1-zhichao.gao@intel.com> References: <20190722040204.33108-1-zhichao.gao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2006 Add a null version library instance of SecurityLockAuditLib. It provides the new API SecurityLockReportEvent without any function. Cc: Jian J Wang Cc: Hao A Wu Cc: Ray Ni Cc: Star Zeng Cc: Liming gao Cc: Sean Brogan Cc: Michael Turner Cc: Bret Barkelew Signed-off-by: Zhichao Gao --- .../SecurityLockAuditLibNull.c | 32 +++++++++++++++++++ .../SecurityLockAuditLibNull.inf | 27 ++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.c create mode 100644 MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.inf diff --git a/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.c b/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.c new file mode 100644 index 0000000000..47a26684d3 --- /dev/null +++ b/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.c @@ -0,0 +1,32 @@ +/** @file + + Null library for security lock logging that does nothing but meet compile requirements + + Copyright (c) 2018, Microsoft Corporation + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +/** + Null function for security Lock event logging and reporting + + @param[in] Module GUID of calling module + @param[in] Function Name of calling function + @param[in] LockEventText Event text explaining what is locked + @param[in] LockType Enumerated lock type for differentiation + +**/ +VOID +EFIAPI +SecurityLockReportEvent ( + IN GUID *Module, + IN CONST CHAR8 *Function, + IN CONST CHAR8 *LockEventText, + IN LOCK_TYPE LockType + ) +{ +} diff --git a/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.inf b/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.inf new file mode 100644 index 0000000000..bf3f9fc0b0 --- /dev/null +++ b/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.inf @@ -0,0 +1,27 @@ +## @file +# +# Null library for security lock logging that does nothing but meet compile requirements +# +# +# Copyright (c) 2018, Microsoft Corporation +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = SecurityLockAuditLibNull + FILE_GUID = 1d333a6a-90a7-45cb-9897-0a172ee35066 + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = SecurityLockAuditLib + +[Sources.common] + SecurityLockAuditLibNull.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + BaseLib -- 2.21.0.windows.1