John David Anglin <dave.anglin@xxxxxxxx> writes: > On 2023-11-10 3:38 p.m., Helge Deller wrote: >> On 11/10/23 21:12, John David Anglin wrote: >>> On 2023-11-10 3:01 p.m., Helge Deller wrote: >>>>>> On HPPA, we still need executable stacks, so this option doesn't work >>>>>> and leads to a segfault on boot. >>>> >>>> For kernel we don't need it any longer. >>>> But there might be dependencies on glibc version and/or combination. >>>> So, I've currently lost overview if we still need executable stacks... >>> FWIW, I recently changed gcc-14 to enable GNU stack notes and fixed a bug in the >>> 32-bit PA 2.0 trampoline template. All execute stack tests in glibc now pass with gcc-14. >> >> Yes, I saw your commits. >> So, any code compiled with >= gcc-14 should be fine with non-writeable stacks? > Not exactly. An executable stack is still needed for nested functions. They are still called > via a stack trampoline. The GNU stack note indicates whether an object needs an executable > stack or not. These notes are collected by linker. The glibc loader determines whether to setup > an executable stack or not. >> It would be easier if it would be a glibc dependency (for distribution maintainers)... > I'm not aware of any glibc dependency... > > I think once gcc-14 becomes the default compiler, we will have to enable GNU stack notes in > previous gcc versions. We will still have executable stacks until everything is rebuilt. We will need to update that default in Binutils too, I think. That configure arg is working OK for me, but I did not try systemd yet. > > Dave