WSL2-Linux-Kernel/arch/mips/lib
Kees Cook b847bd64ea MIPS: Only use current_stack_pointer on GCC
Unfortunately, Clang did not have support for "sp" as a global register
definition, and was crashing after the addition of current_stack_pointer.
This has been fixed in Clang 14, but earlier Clang versions need to
avoid this code, so add a versioned test and revert back to the
open-coded asm instances. Fixes Clang build error:

fatal error: error in backend: Invalid register name global variable

Fixes: 200ed341b8 ("mips: Implement "current_stack_pointer"")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/lkml/YikTQRql+il3HbrK@dev-arch.thelio-3990X
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Yanteng Si <siyanteng01@gmail.com>
Cc: linux-mips@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2022-03-14 15:02:53 +01:00
..
Makefile MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
bitops.c MIPS: bitops: Use BIT_WORD() & BITS_PER_LONG 2019-10-07 09:42:55 -07:00
bswapdi.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bswapsi.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
csum_partial.S MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
delay.c MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
dump_tlb.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
iomap-pci.c arch: mips: update references to current linux-mips list 2021-02-23 13:24:38 +01:00
iomap_copy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
libgcc.h MIPS: Implement __multi3 for GCC7 MIPS64r6 builds 2018-01-11 14:40:31 +01:00
memcpy.S MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
memset.S MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
mips-atomic.c MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER 2021-05-25 15:33:17 +02:00
multi3.c MIPS: lib: Provide MIPS64r6 __multi3() for GCC < 7 2018-08-21 12:14:11 -07:00
r3k_dump_tlb.c MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
strncpy_user.S MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
strnlen_user.S MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
uncached.c MIPS: Only use current_stack_pointer on GCC 2022-03-14 15:02:53 +01:00