(update Rebecca's email)

On Mon, 27 Mar 2023 at 13:43, Leif Lindholm <quic_llind...@quicinc.com> wrote:
>
> On Mon, Mar 27, 2023 at 13:00:55 +0200, Ard Biesheuvel wrote:
> > Implement version 2 of the memory attributes table, which now contains a
> > flag informing the OS whether or not code regions may be mapped with CFI
> > mitigations such as IBT or BTI enabled.
> >
> > This series covers roughly the following parts:
> >
> > - (AARCH64) Annotate ELF objects generated from asm as BTI compatible
> >   when BTI codegen is enabled
> > - Update the BaseTools to emit the appropriate PE/COFF annotation when a
> >   BTI/IBT compatible ELF executable is converted to PE/COFF
> > - Take this PE/COFF annotation into account when populating the memory
> >   attributes table in the DXE core
> >
> > TODO:
> > - X64 changes to make the code IBT compatible and emit the ELF note
> > - Figure out how to generate such executables with native PE toolchains
> > - Implement BTI/IBT enforcement at boot time - this is something I
> >   intend to look into next.
> >
> > Can be tested with the CLANG38 toolchain (both Clang compiler and LLD
> > linker, version 3.8 or newer) with the following build options.
> >
> > [BuildOptions]
> >   GCC:*_*_AARCH64_PP_FLAGS = -mbranch-protection=bti
> >   GCC:*_*_AARCH64_CC_FLAGS = -mbranch-protection=bti
>
> I know you point out to use CLANG38, but the set is also tagged PATCH
> rather than RFC.
> I believe this option was added to GCC in version 9, meaning this is a
> breaking change for GCC8. Now, GCC8 is ancient, but I expect it's
> still what's available in RHEL8 for example. So it's worth mentioning.
>

Indeed.

So when and where to enable this (by default or not) is an open question.

I thought we might enable this by default for CLANGDWARF once we add
AArch64 support to it (which Rebecca is working on), and retire the
CLANG3x toolchains entirely.

Then, it is up to individual platforms to decide what they want to
enable or disable - it also depends on any asm code the platforms are
carrying. (This does not really matter for this series which only
covers runtime DXE executables running under the OS, but i'd like to
find ways to enable this at boot time as well)


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101951): https://edk2.groups.io/g/devel/message/101951
Mute This Topic: https://groups.io/mt/97879281/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to