From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: zhichao.gao@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Wed, 10 Apr 2019 00:03:27 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 00:03:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="147987318" Received: from gaozhic-mobl.ccr.corp.intel.com ([10.239.196.194]) by FMSMGA003.fm.intel.com with ESMTP; 10 Apr 2019 00:03:24 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jiewen Yao , Chao Zhang , Jian J Wang , Ray Ni , Star Zeng , Liming Gao , Sean Brogan , Michael Turner , Bret Barkelew Subject: [PATCH 0/5] Make some DebugLib instance runtime safe Date: Wed, 10 Apr 2019 15:03:08 +0800 Message-Id: <20190410070313.15092-1-zhichao.gao@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Some pointer will be invalid after ExitBootServices, such as protocol pointer, gST, gBS and so on. Disable the functions which used that pointer. Remove SMM support of UefiDebugLibDebugPortProtocol, UefidebugLibConOut and UefiDebugLibStdErr. Before removing, should change the SMM instance in the dsc file which use them as SMM instance. And null version is safe. Cc: Jiewen Yao Cc: Chao Zhang Cc: Jian J Wang Cc: Ray Ni Cc: Star Zeng Cc: Liming Gao Cc: Sean Brogan Cc: Michael Turner Cc: Bret Barkelew Aaron Antone (3): MdeModulePkg/UefiDebugLibDebugPortProtocol: Make it runtime safe MdeModulePkg/UefidebugLibConOut: Make it runtime safe MdeModule/UefiDebugLibStdErr: Make it runtime safe Zhichao Gao (2): MdeModulePkg: Change the SMM debug lib instance SignedCapsulePkg: Change the SMM debug lib instance MdeModulePkg/MdeModulePkg.dsc | 2 +- MdePkg/Library/UefiDebugLibConOut/DebugLib.c | 116 +++++++------- .../UefiDebugLibConOut/DebugLibConstructor.c | 72 +++++++++ .../UefiDebugLibConOut/UefiDebugLibConOut.inf | 12 +- .../UefiDebugLibDebugPortProtocol/DebugLib.c | 146 +++++++++--------- .../DebugLibConstructor.c | 72 +++++++++ .../UefiDebugLibDebugPortProtocol.inf | 12 +- MdePkg/Library/UefiDebugLibStdErr/DebugLib.c | 113 +++++++------- .../UefiDebugLibStdErr/DebugLibConstructor.c | 72 +++++++++ .../UefiDebugLibStdErr/UefiDebugLibStdErr.inf | 12 +- SignedCapsulePkg/SignedCapsulePkg.dsc | 4 +- 11 files changed, 443 insertions(+), 190 deletions(-) create mode 100644 MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c create mode 100644 MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c create mode 100644 MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c -- 2.21.0.windows.1