Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240404202641.GS4163@brightrain.aerifal.cx>
Date: Thu, 4 Apr 2024 16:26:41 -0400
From: Rich Felker <dalias@...c.org>
To: Thorsten Glaser <tg@...bsd.de>
Cc: musl@...ts.openwall.com, 1068350@...s.debian.org
Subject: Re: Re: Bug#1068350: musl: miscompiles (runtime problems) on
 riscv64 and s390x with static-pie

On Thu, Apr 04, 2024 at 07:50:40PM +0000, Thorsten Glaser wrote:
> Szabolcs Nagy dixit:
> 
> >the next culprit is gcc (each target can have their own
> 
> gcc-13_13.2.0-23
> 
> >static pie specs) or the way you invoked gcc (not visible
> 
> As I wrote earlier, though with more flags. Dropping all the -D…
> and -W… and -I… and other irrelevant ones:
> 
> musl-gcc -Os -g -fPIE -fno-lto -fno-asynchronous-unwind-tables
>     -fno-strict-aliasing -fstack-protector-strong -fwrapv -c …
> musl-gcc -Os -g -fPIE -fno-lto -fno-asynchronous-unwind-tables
>     -fno-strict-aliasing -fstack-protector-strong -fwrapv
>     -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -static -static-pie
>     -fno-lto -o mksh  *.o
> 
> Same for both. You can see the full log by activating the
> [64]Installed and [71]Installed links respectively on
> https://buildd.debian.org/status/package.php?p=mksh and
> skipping to 'compilation of mksh in static-musl' to get to
> the beginning of the configure phase for that.
> 
> >are you sure static pie works on these targets?
> 
> No ;-) That’s why I reported this issue. I had just
> enabled it for the musl builds, as the security people
> like that more than normal static.

I seem to recall the musl-gcc wrapper does not handle static-pie
right. A real cross toolchain should. If there's an easy fix for the
wrapper I'd be happy to merge it.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.