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: <20190710085814.vgwdnj4b3s3zjmco@shell.armlinux.org.uk>
Date:   Wed, 10 Jul 2019 09:58:14 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] ARM: mtd-xip: work around clang/llvm bug

On Wed, Jul 10, 2019 at 10:33:31AM +0200, Arnd Bergmann wrote:
> On Wed, Jul 10, 2019 at 12:25 AM Russell King - ARM Linux admin
> <linux@...linux.org.uk> wrote:
> >
> > On Tue, Jul 09, 2019 at 08:40:51PM +0200, Arnd Bergmann wrote:
> > > On Tue, Jul 9, 2019 at 8:08 PM 'Nick Desaulniers' via Clang Built
> > > Linux <clang-built-linux@...glegroups.com> wrote:
> > > > On Tue, Jul 9, 2019 at 1:41 AM Linus Walleij <linus.walleij@...aro.org> wrote:
> > > >
> > > > > I guess this brings up the old question whether the compiler should
> > > > > be worked around or just considered immature, but as it happens this
> > > >
> > > > Definitely a balancing act; we prioritize work based on what's
> > > > feasible to work around vs must be implemented.  A lot of my time is
> > > > going into validation of asm goto right now, but others are ramping up
> > > > on the integrated assembler (clang itself can be invoked as a
> > > > substitute for GNU AS; but there's not enough support to do `make
> > > > AS=clang` for the kernel just yet).
> > >
> > > Note that this bug is the same with both gas and AS=clang, which also
> > > indicates that clang implemented the undocumented .rep directive
> > > for compatibility.
> > >
> > > Overall I think we are at the point where building the kernel with clang-8
> > > is mature enough that we should work around bugs like this where it is
> > > easy enough rather than waiting for clang-9.
> >
> > While both assemblers seem to support both .rept and .rep, might it
> > be an idea to check what the clang-8 situation is with .rept ?
> 
> Good idea. I tried this patch now:
> 
> --- a/arch/arm/include/asm/mtd-xip.h
> +++ b/arch/arm/include/asm/mtd-xip.h
> @@ -15,6 +15,6 @@
>  #include <mach/mtd-xip.h>
> 
>  /* fill instruction prefetch */
> -#define xip_iprefetch()        do { asm volatile (".rep 8; nop;
> .endr"); } while (0)
> +#define xip_iprefetch()        do { asm volatile (".rept 8; nop;
> .endr"); } while (0)
> 
>  #endif /* __ARM_MTD_XIP_H__ */
> 
> Unfortunately that has no effect, clang treats them both the same way.

In any case, good to know.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ