WSL2-Linux-Kernel/arch/x86/boot/compressed
Nick Desaulniers a554e740b6 x86/boot/compressed: Enable -Wundef
A discussion around -Wundef showed that there were still a few boolean
Kconfigs where #if was used rather than #ifdef to guard different code.
Kconfig doesn't define boolean configs, which can result in -Wundef
warnings.

arch/x86/boot/compressed/Makefile resets the CFLAGS used for this
directory, and doesn't re-enable -Wundef as the top level Makefile does.
If re-added, with RANDOMIZE_BASE and X86_NEED_RELOCS disabled, the
following warnings are visible.

  arch/x86/boot/compressed/misc.h:82:5: warning: 'CONFIG_RANDOMIZE_BASE'
  is not defined, evaluates to 0 [-Wundef]
      ^
  arch/x86/boot/compressed/misc.c:175:5: warning: 'CONFIG_X86_NEED_RELOCS'
  is not defined, evaluates to 0 [-Wundef]
      ^

Simply fix these and re-enable this warning for this directory.

Suggested-by: Nathan Chancellor <nathan@kernel.org>
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20210422190450.3903999-1-ndesaulniers@google.com
2021-05-12 21:39:56 +02:00
..
.gitignore
Makefile x86/boot/compressed: Enable -Wundef 2021-05-12 21:39:56 +02:00
acpi.c x86/boot: Fix -Wint-to-pointer-cast build warning 2020-05-04 15:22:16 +02:00
cmdline.c
cpuflags.c x86/sev-es: Check required CPU features for SEV-ES 2020-09-10 21:49:25 +02:00
early_serial_console.c
efi_thunk_64.S x86: Fix various typos in comments, take #2 2021-03-21 23:50:28 +01:00
error.c
error.h
head_32.S x86/boot: Remove run-time relocations from head_{32,64}.S 2020-08-14 12:52:35 +02:00
head_64.S Trivial cleanups and fixes all over the place. 2021-04-26 09:25:47 -07:00
ident_map_64.c - Remove all uses of TIF_IA32 and TIF_X32 and reclaim the two bits in the end 2020-12-14 13:45:26 -08:00
idt_64.c x86/boot/compressed/64: Cleanup exception handling before booting kernel 2021-03-18 16:44:36 +01:00
idt_handlers_64.S x86/boot/compressed/64: Setup a GHCB-based VC Exception handler 2020-09-07 19:45:25 +02:00
kaslr.c x86/kaslr: Return boolean values from a function returning bool 2021-03-19 13:25:07 +01:00
kernel_info.S
mem_encrypt.S x86/boot/compressed/64: Add CPUID sanity check to 32-bit boot-path 2021-03-18 23:04:12 +01:00
misc.c x86/boot/compressed: Enable -Wundef 2021-05-12 21:39:56 +02:00
misc.h x86/boot/compressed: Enable -Wundef 2021-05-12 21:39:56 +02:00
mkpiggy.c x86/boot: Remove run-time relocations from head_{32,64}.S 2020-08-14 12:52:35 +02:00
pgtable.h
pgtable_64.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
sev.c x86/sev-es: Rename sev-es.{ch} to sev.{ch} 2021-05-10 07:40:27 +02:00
string.c
vmlinux.lds.S x86/boot/compressed: Add missing debugging sections to output 2020-09-01 10:03:18 +02:00