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: <ZDuzlNOmIT0Gd7fF@1wt.eu>
Date:   Sun, 16 Apr 2023 10:36:36 +0200
From:   Willy Tarreau <w@....eu>
To:     Borislav Petkov <bp@...en8.de>
Cc:     Jingbo Xu <jefflexu@...ux.alibaba.com>, tglx@...utronix.de,
        mingo@...hat.com, dave.hansen@...ux.intel.com, x86@...nel.org,
        hpa@...or.com,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [BUG REPORT] arch/x86/include/asm/uaccess_64.h:119: Error: junk
 at end of line

Hi Boris,

On Sat, Apr 15, 2023 at 08:56:47PM +0200, Borislav Petkov wrote:
> On April 15, 2023 7:56:01 PM GMT+02:00, Willy Tarreau <w@....eu> wrote:
> >May I send you a cleaner patch for this ?
> 
> Can you pls first send a minimal reproducer so that we can show it to gcc folks?

Oh it's not even gcc, it's really just a matter of compatibility with
binutils. Documentation/Changes says binutils minimum is 2.25. This
toolchain I'm using in distcc was made against 2.27, I'm reproducing
the error with it:

  $ cat repro.s
  .4byte (1U)
  .4byte (1UL)

  $ /f/tc/x86_64-gcc75_glibc228-linux-gnu/bin/x86_64-gcc75_glibc228-linux-gnu-ld -v     
  GNU ld (crosstool-NG 1.24.0.500_645889f) 2.27
  $ /f/tc/x86_64-gcc75_glibc228-linux-gnu/bin/x86_64-gcc75_glibc228-linux-gnu-as repro.s
  repro.s: Assembler messages:
  repro.s:2: Error: found 'L', expected: ')'
  repro.s:2: Error: junk at end of line, first unrecognized character is `L'

This other one relying on 2.26 fails both on 1U and 1UL:

  $ ld -v
  GNU ld version 2.26.20160125
  $ as repro.s
  repro.s: Assembler messages:
  repro.s:1: Error: missing ')'
  repro.s:1: Error: junk at end of line, first unrecognized character is `U'
  repro.s:2: Error: missing ')'
  repro.s:2: Error: junk at end of line, first unrecognized character is `U'

And this one based on 2.29 works for both:

  $ /dev/shm/gcc-5.5.0-nolibc/x86_64-linux/bin/x86_64-linux-ld -v
  GNU ld (GNU Binutils) 2.29.1.20170915
  $ /dev/shm/gcc-5.5.0-nolibc/x86_64-linux/bin/x86_64-linux-as repro.s

So it just means that the support for the "U" suffix on numbers was
added in binutils 2.27 and the "L" suffix on numbers was added somewhere
between 2.27 and 2.29.

And given that there's a single occurrence of all this in the whole tree,
that's why I'm proposing to just get back to the good old (1 << 0) instead
of BIT(0).

Thanks!
Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ