summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/intel/pmt/class.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2025-03-21 00:32:39 +0300
committerIngo Molnar <mingo@kernel.org>2025-03-21 10:34:28 +0300
commit3e57612561138d7142721a83743fb8eb2bf09ec5 (patch)
tree23dcf6a9b26479a64bc76d64d50b7be87c6eacf1 /drivers/platform/x86/intel/pmt/class.c
parent0b7eb55cb706e92d6073e4ab63ccd4d219cf2cda (diff)
downloadlinux-3e57612561138d7142721a83743fb8eb2bf09ec5.tar.xz
x86/asm: Make asm export of __ref_stack_chk_guard unconditional
Clang does not tolerate the use of non-TLS symbols for the per-CPU stack protector very well, and to work around this limitation, the symbol passed via the -mstack-protector-guard-symbol= option is never defined in C code, but only in the linker script, and it is exported from an assembly file. This is necessary because Clang will fail to generate the correct %GS based references in a compilation unit that includes a non-TLS definition of the guard symbol being used to store the stack cookie. This problem is only triggered by symbol definitions, not by declarations, but nonetheless, the declaration in <asm/asm-prototypes.h> is conditional on __GENKSYMS__ being #define'd, so that only genksyms will observe it, but for ordinary compilation, it will be invisible. This is causing problems with the genksyms alternative gendwarfksyms, which does not #define __GENKSYMS__, does not observe the symbol declaration, and therefore lacks the information it needs to version it. Adding the #define creates problems in other places, so that is not a straight-forward solution. So take the easy way out, and drop the conditional on __GENKSYMS__, as this is not really needed to begin with. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Sami Tolvanen <samitolvanen@google.com> Link: https://lore.kernel.org/r/20250320213238.4451-2-ardb@kernel.org
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions