Re: [PATCH 10/11] x86/purgatory: Compile purgatory.c with -D__NO_FORTIFY

From: Borislav Petkov

Date: Tue Sep 15 2026 - 22:27:50 EST


On Tue, Aug 18, 2026 at 10:53:53AM +0200, Thomas Huth wrote:
> @@ -37,6 +37,7 @@ PURGATORY_CFLAGS := -mcmodel=small -ffreestanding
> -fno-zero-initialized-in-bss -
> PURGATORY_CFLAGS += -fpic -fvisibility=hidden
> PURGATORY_CFLAGS += $(DISABLE_KSTACK_ERASE) -DDISABLE_BRANCH_PROFILING
> PURGATORY_CFLAGS += -fno-stack-protector
> +PURGATORY_CFLAGS += -D__NO_FORTIFY
>
> # Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
> # in turn leaves some undefined symbols like __fentry__ in purgatory and not
>
> WDYT?

I guess... I probably don't care too much about string checks in the
purgatory thing...

But please explain in more detail in the commit message what "compilation
problems" are avoided by disabling those additional string checks.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette