From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.8799.1679299678779244559 for ; Mon, 20 Mar 2023 01:07:59 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lichao@loongson.cn) Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8AxUU9ZFBhkkr8OAA--.9987S3; Mon, 20 Mar 2023 16:07:54 +0800 (CST) Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxfb5WFBhkYygHAA--.19911S3; Mon, 20 Mar 2023 16:07:51 +0800 (CST) Message-ID: <91bd3071-08ad-5cc3-fc4c-d89b9f226e6c@loongson.cn> Date: Mon, 20 Mar 2023 16:07:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [edk2-devel] [PATCH] Platform/Loongson: Allow building with stack protector support To: devel@edk2.groups.io, lixianglai@loongson.cn, git@xen0n.name Cc: Bibo Mao , Leif Lindholm , Michael D Kinney References: <20230305044035.476989-1-git@xen0n.name> <6ed30673-98f7-7c16-1c16-33cc4988dfaa@loongson.cn> From: "Chao Li" In-Reply-To: <6ed30673-98f7-7c16-1c16-33cc4988dfaa@loongson.cn> X-CM-TRANSID: AQAAf8Cxfb5WFBhkYygHAA--.19911S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAQCGQW+3ULAQACst X-Coremail-Antispam: 1Uk129KBjvJXoW7Aw1UZF1UJF1rKFWDuw1ftFb_yoW8Ww1UpF 15Aa1xKr18Jr4jy398Ga4UKF4vyF98GFykJFWDGr129F9xJ3Z5X34ayrs8tr43Ca4Sqa48 Xay8Ka15ua4DWFJanT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qF5I8CrVAaz4v26cxKscIFY7kG0bIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnRJUUUP2 b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7 CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE 2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjc xK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8Jr0_Cr1UM2kK e7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI 0UMc02F40En4AKxVAvwIkv4cxYr24lYx0E2Ix0cI8IcVAFwI0_Jrv_JF1lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCjr7xvwVCIw2I0I7 xG6c02F41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE 7xkEbVWUJVW8JwCFI7km07C267AKxVWUXVWUAwC20s026c02F40E14v26r106r1rMI8I3I 0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAI cVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcV CF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIE c7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8nvttUUUUU== Content-Type: multipart/alternative; boundary="------------4Hkeu9i0t67Xc1lLxh2JAA0N" --------------4Hkeu9i0t67Xc1lLxh2JAA0N Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Xuerui, I and Xianglai have reviewed this change a few days ago, you can create a PR in the edk2-platforms repo. Thanks, Chao 在 2023/3/8 11:17, xianglai 写道: > > Reviewed-by: Xianglai Li > > On 2023/3/5 下午12:40, WANG Xuerui wrote: >> Some toolchains have stack protection enabled by default, so without the >> appropriate library included the build will fail with missing symbols >> during link. >> >> Cc: Bibo Mao >> Cc: Xianglai li >> Cc: Chao Li >> Cc: Leif Lindholm >> Cc: Michael D Kinney >> Signed-off-by: WANG Xuerui >> --- >> Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc >> index d1162519cd..465e9229a2 100644 >> --- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc >> +++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc >> @@ -95,6 +95,9 @@ >> TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf >> !endif >> >> + # For stack protector support >> + NULL | MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf >> + >> BaseLib | MdePkg/Library/BaseLib/BaseLib.inf >> SafeIntLib | MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf >> TimeBaseLib | EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf > --------------4Hkeu9i0t67Xc1lLxh2JAA0N Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi Xuerui,

I and Xianglai have reviewed this change a few days ago, you can create a PR in the edk2-platforms repo.


Thanks,
Chao
在 2023/3/8 11:17, xianglai 写道:

Reviewed-by: Xianglai Li <lixianglai@loongson.cn>

On 2023/3/5 下午12:40, WANG Xuerui wrote:
Some toolchains have stack protection enabled by default, so without the
appropriate library included the build will fail with missing symbols
during link.

Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Xianglai li <lixianglai@loongson.cn>
Cc: Chao Li <lichao@loongson.cn>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: WANG Xuerui <git@xen0n.name>
---
 Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
index d1162519cd..465e9229a2 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
+++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
@@ -95,6 +95,9 @@
   TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
 
+  # For stack protector support
+  NULL                             | MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+
   BaseLib                          | MdePkg/Library/BaseLib/BaseLib.inf
   SafeIntLib                       | MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
   TimeBaseLib                      | EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
--------------4Hkeu9i0t67Xc1lLxh2JAA0N--