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] [day] [month] [year] [list]
Message-ID: <CAK7LNATD3696a0BRCB_jKCMdG_PDWUSnuQwWj1+n1okpe+UD7g@mail.gmail.com>
Date:   Wed, 13 Nov 2019 19:36:26 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Will Deacon <will@...nel.org>
Cc:     Ilie Halip <ilie.halip@...il.com>,
        Peter Collingbourne <pcc@...gle.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] scripts/tools-support-relr.sh: un-quote variables

On Wed, Nov 13, 2019 at 7:31 PM Will Deacon <will@...nel.org> wrote:
>
> On Tue, Nov 12, 2019 at 03:45:20PM +0200, Ilie Halip wrote:
> > When the CC variable contains quotes, e.g. when using
> > ccache (make CC="ccache <compiler>"), this script always
> > fails, so CONFIG_RELR is never enabled, even when the
> > toolchain supports this feature. Removing the /dev/null
> > redirect and invoking the script manually shows the issue:
> >
> >     $ CC='/usr/bin/ccache clang' ./scripts/tools-support-relr.sh
> >     ./scripts/tools-support-relr.sh: 7: ./scripts/tools-support-relr.sh: /usr/bin/ccache clang: not found
> >
> > Fix this by un-quoting the variables.
> >
> > Before:
> >     $ make ARCH=arm64 CC='/usr/bin/ccache clang' LD=ld.lld \
> >         NM=llvm-nm OBJCOPY=llvm-objcopy defconfig
> >     $ grep RELR .config
> >     CONFIG_ARCH_HAS_RELR=y
> >
> > With this change:
> >     $ make ARCH=arm64 CC='/usr/bin/ccache clang' LD=ld.lld \
> >         NM=llvm-nm OBJCOPY=llvm-objcopy defconfig
> >     $ grep RELR .config
> >     CONFIG_TOOLS_SUPPORT_RELR=y
> >     CONFIG_ARCH_HAS_RELR=y
> >     CONFIG_RELR=y
> >
> > Fixes: 5cf896fb6be3 ("arm64: Add support for relocating the kernel with RELR relocations")
> > Reported-by: Dmitry Golovin <dima@...ovin.in>
> > Link: https://github.com/ClangBuiltLinux/linux/issues/769
> > Cc: Peter Collingbourne <pcc@...gle.com>
> > Signed-off-by: Ilie Halip <ilie.halip@...il.com>
> > ---
> >  scripts/tools-support-relr.sh | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
>
> Thanks, I'll queue this as a fix.
>
> Will

Reviewed-by: Masahiro Yamada <yamada.masahiro@...ionext.com>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ