lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 15 Mar 2022 11:09:51 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Marc Zyngier <maz@...nel.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Yanteng Si <siyanteng01@...il.com>, linux-mips@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Mark Rutland <mark.rutland@....com>,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] MIPS: Only use current_stack_pointer on GCC

On Mon, Mar 14, 2022 at 03:52:15PM +0100, Thomas Bogendoerfer wrote:
> 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@...nel.org>
> > Reviewed-by: Nathan Chancellor <nathan@...nel.org>
> > Link: https://lore.kernel.org/lkml/YikTQRql+il3HbrK@dev-arch.thelio-3990X
> > Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
> > Cc: Marc Zyngier <maz@...nel.org>
> > Cc: Guenter Roeck <linux@...ck-us.net>
> > Cc: Yanteng Si <siyanteng01@...il.com>
> > Cc: linux-mips@...r.kernel.org
> > Signed-off-by: Kees Cook <keescook@...omium.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.

Excellent; thanks very much!

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists