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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200218183011.GA7516@ubuntu-m2-xlarge-x86>
Date:   Tue, 18 Feb 2020 11:30:11 -0700
From:   Nathan Chancellor <natechancellor@...il.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Ralf Baechle <ralf@...ux-mips.org>,
        Paul Burton <paulburton@...nel.org>,
        linux-mips@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] MIPS: vdso: Wrap -mexplicit-relocs in cc-option

On Tue, Feb 18, 2020 at 10:28:15AM -0800, Nick Desaulniers wrote:
> On Mon, Feb 17, 2020 at 1:11 PM Nathan Chancellor
> <natechancellor@...il.com> wrote:
> >
> > Clang does not support this option and errors out:
> >
> > clang-11: error: unknown argument: '-mexplicit-relocs'
> >
> > Clang does not appear to need this flag like GCC does because the jalr
> > check that was added in commit 976c23af3ee5 ("mips: vdso: add build
> > time check that no 'jalr t9' calls left") passes just fine with
> >
> > $ make ARCH=mips CC=clang CROSS_COMPILE=mipsel-linux-gnu- malta_defconfig arch/mips/vdso/
> >
> > even before commit d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in
> > vdso code").
> >
> > -mrelax-pic-calls has been supported since clang 9, which is the
> > earliest version that could build a working MIPS kernel, and it is the
> > default for clang so just leave it be.
> >
> > Fixes: d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in vdso code")
> > Link: https://github.com/ClangBuiltLinux/linux/issues/890
> > Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> 
> Thanks for the patch, and detailed context.
> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
> 
> With this patch applied:
> $ make ARCH=mips CC=clang CROSS_COMPILE=mipsel-linux-gnu-
> malta_defconfig arch/mips/vdso/
> $ lvm-objdump --disassemble arch/mips/vdso/vdso.so.dbg.raw | egrep -h "jarl.*t9"
> $ llvm-objdump --disassemble arch/mips/vdso/vdso.so.dbg.raw | grep jarl
> So jarl instructions aren't emitted.
> 
> Tested-by: Nick Desaulniers <ndesaulniers@...gle.com>

Thank you for double checking and the review!

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ