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: <20230103035704.GA1207672@roeck-us.net>
Date:   Mon, 2 Jan 2023 19:57:04 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     "Jason A. Donenfeld" <Jason@...c4.com>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Rich Felker <dalias@...c.org>, Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Palmer Dabbelt <palmer@...osinc.com>,
        Ard Biesheuvel <ardb@...nel.org>
Subject: Re: Linux 6.2-rc2

On Mon, Jan 02, 2023 at 06:13:09PM -0800, Linus Torvalds wrote:
> On Mon, Jan 2, 2023 at 5:45 PM Guenter Roeck <linux@...ck-us.net> wrote:
> >
> > ... and reverting commit 99cb0d917ff indeed fixes the problem.
> 
> Hmm. My gut feel is that this just exposes some bug in binutils.
> 
May well be, but it would be an architecture specific bug. The problem
is not seen when building an x86 image with binutils 2.32. Of course it
might affect other architectures.

> That said, maybe that commit should not have added its own /DISCARDS/
> thing, and instead just added that "*(.note.GNU-stack)" to the general
> /DISCARDS/ thing that is defined by the
> 
>   #define DISCARDS  ..
> 
> a little bit later, so that we only end up with one single DISCARD
> list. Something like this (broken patch on purpose):
> 
>   --- a/include/asm-generic/vmlinux.lds.h
>   +++ b/include/asm-generic/vmlinux.lds.h
>   @@ -897,5 +897,4 @@
>     */
>    #define NOTES                                        \
>   -     /DISCARD/ : { *(.note.GNU-stack) }              \
>         .notes : AT(ADDR(.notes) - LOAD_OFFSET) {       \
>                 BOUNDED_SECTION_BY(.note.*, _notes)     \
>   @@ -1016,4 +1015,5 @@
>    #define DISCARDS                                     \
>         /DISCARD/ : {                                   \
>   +     *(.note.GNU-stack)                              \
>         EXIT_DISCARDS                                   \
>         EXIT_CALL                                       \
> 

I don't know if and how it affects arm64 and riscv, but the above fixes
the problem for sh.

> But maybe that DISCARDS macrop ends up being used too late?
> 

DISCARDS is the very first entry in SECTIONS. NOTES is part of RO_DATA
and comes much later.

> It really shouldn't matter, but here we are, with a build problem with
> some random old binutils on an odd platform..

The one we know of. I could try to compile all architectures with
binutils 2.32, but I don't really want to do that if I can avoid it.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ