From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by mx.groups.io with SMTP id smtpd.web10.20762.1628502715979023842 for ; Mon, 09 Aug 2021 02:51:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@posteo.de header.s=2017 header.b=Ri0/FOSu; spf=pass (domain: posteo.de, ip: 185.67.36.65, mailfrom: mhaeuser@posteo.de) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id B4D4D240029 for ; Mon, 9 Aug 2021 11:51:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1628502712; bh=iqvBi/ROlgYUXxmwDj06b14Up9nG+OML+D6AWKbBMvs=; h=From:To:Cc:Subject:Date:From; b=Ri0/FOSuXqYr2SqvIYt1GR2152U1Etpd6+Oe/jvbzi7heJ/MbEzU980wXn4tkxIMH 1K4Ktx7r3xq7hPzAmGquwUSZZqkBdSw4kYBPBgFKEsc6govHKHyUG3FcZwGE2BF78p x2C/K3O6Zftd7p0uttbVaEzdYNWD5Zb9rbs7Wp3bJ/lfylo15utS8lz6KlTP4xtHne G6s9JDgURLwWjhSzhNXjkn2wPkz+zFPxs87ClgKs6EDWdOgvgUrMuXbeIJhBPth0lu P5lLX1heTbyhWWgX2XLCiM6eHAgbYWs6W1ZzSKnNJcBqxyVLts/Lsr5JUKFh/5cJYv iW5ZtjNr21aTQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Gjrvr1qK8z6tmL; Mon, 9 Aug 2021 11:51:52 +0200 (CEST) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar , Vitaly Cheptsov Subject: [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name Date: Mon, 9 Aug 2021 09:51:27 +0000 Message-Id: <34c8c87e673ce08bef460179c5cb7b3ea9271208.1628502434.git.mhaeuser@posteo.de> In-Reply-To: <252525969122e83d9fb9b83edc95c4f6dfd233b4.1628502434.git.mhaeuser@posteo.de> References: <252525969122e83d9fb9b83edc95c4f6dfd233b4.1628502434.git.mhaeuser@posteo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3318 Correctly define the read-only data sections with the toolchain-specific section name. This hardens image permission security and may save image space. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Vitaly Cheptsov Signed-off-by: Marvin H=C3=A4user --- UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm | 2 +- UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm b/Ue= fiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm index 5e27cc325012..cfb8bf4a5ae0 100644 --- a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm @@ -6,7 +6,7 @@ ;*=0D ;-------------------------------------------------------------------------= -----=0D =0D - SECTION .rodata=0D + SECTION RODATA_SECTION_NAME=0D =0D ;=0D ; Float control word initial value:=0D diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm b/Uef= iCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm index 8485b4713548..3c976a21e391 100644 --- a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm @@ -6,7 +6,7 @@ ;*=0D ;-------------------------------------------------------------------------= -----=0D =0D - SECTION .rodata=0D + SECTION RODATA_SECTION_NAME=0D ;=0D ; Float control word initial value:=0D ; all exceptions masked, double-extended-precision, round-to-nearest=0D --=20 2.31.1