Skip to content

efi/libstub: Build the x86 stub from KBUILD_CFLAGS

Kees Cook linux-efi linux-hardening lkml llvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3efi/libstub: Declare the x86 stub's assembly entry pointsdrivers/firmware/efi/libstub/x86-stub.h+9 -00 replies
2/3efi/libstub: Build the x86 stub from KBUILD_CFLAGSdrivers/firmware/efi/libstub/Makefile+14 -101 reply
3/3efi/libstub: Disable kernel stack erasing in the common flagsdrivers/firmware/efi/libstub/Makefile+7 -101 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchNathan Chancellor
1/3
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/3] efi/libstub: Build the x86 stub from KBUILD_CFLAGS

Hi!

The x86 EFI stub builds from its own short list of compiler flags instead of KBUILD_CFLAGS, so options added kernel-wide reach it only when someone remembers to add them there too (e.g. for -fms-extensions). Swap it around to remove unwanted options instead, as we do for all the other architectures.

This will let Clang's -fexperimental-late-parse-attributes reach the stub build so that __counted_by() will get parsed without error[1].

Thanks!

-Kees

Kees Cook (3):
efi/libstub: Declare the x86 stub's assembly entry points efi/libstub: Build the x86 stub from KBUILD_CFLAGS efi/libstub: Disable kernel stack erasing in the common flags

 drivers/firmware/efi/libstub/Makefile   | 41 +++++++++++++------------
 drivers/firmware/efi/libstub/x86-stub.h |  9 ++++++
 2 files changed, 30 insertions(+), 20 deletions(-)
Signature · 1 line
2.55.0