lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] MIPS: Only use current_stack_pointer on GCC
On Wed, Mar 09, 2022 at 02:09:39PM -0800, Kees Cook wrote:
> 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 15, 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: 200ed341b864 ("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>
> ---
> v1: https://lore.kernel.org/lkml/20220309204537.390428-1-keescook@chromium.org
> v2: - adjust Clang version (Nathan)
> ---
> arch/mips/Kconfig | 2 +-
> arch/mips/include/asm/thread_info.h | 2 ++
> arch/mips/kernel/irq.c | 3 ++-
> arch/mips/lib/uncached.c | 4 +++-
> 4 files changed, 8 insertions(+), 3 deletions(-)

applied to mips-next with the Clang version in the decscription fixed.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]

\
 
 \ /
  Last update: 2022-03-14 15:54    [W:0.052 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site