Message ID | 1579713216-8450-1-git-send-email-dmladjenovic@wavecomp.com |
---|---|
State | New |
Headers | show |
Series | Add NEWS entry about the change in handling of PT_GNU_STACK on MIPS | expand |
On 22/01/20 10:44 pm, Dragan Mladjenovic wrote: > From: "Dragan Mladjenovic" <dmladjenovic@wavecomp.com> > > The change was introduced in: > > commit 33bc9efd91de1b14354291fc8ebd5bce96379f12 > Author: Dragan Mladjenovic <dmladjenovic@wavecomp.com> > Date: Fri Aug 23 16:38:04 2019 +0000 > > mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels > > and probably requires a small explanation. > --- > NEWS | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/NEWS b/NEWS > index 44065d9..1e5dcf3 100644 > --- a/NEWS > +++ b/NEWS > @@ -112,6 +112,18 @@ Deprecated and removed features, and other changes affecting compatibility: > captured in a dlerror message. In general, this is unsafe because > resetting the stack in an arbitrary function call is not possible. > > +* For the MIPS hard-float ABIs, the glibc will no longer honor RW PT_GNU_STACK > + and will run on executable stack unless explicitly configured at build time > + to require minimum kernel version 4.8 or newer. On Linux kernels prior to > + 4.8 executing floating-point branches on non-executable stack can > + lead to application crashes for some MIPS configurations. While currently > + the PT_GNU_STACK is not widely used on MIPS, the future releases of GCC are > + expected to enable RW PT_GNU_STACK by default thus likely to trigger the > + crash on older kernels. > + > + The glibc can be built with --enable-kernel=4.8.0 in order to honor > + RW PT_GNU_STACK while dropping support for older kernels. > + Thanks, I've reworded this a bit before committing; just cleanups that should retain the meaning as is: * For MIPS hard-float ABIs, the GNU C Library will be configured to need an executable stack unless explicitly configured at build time to require minimum kernel version 4.8 or newer. This is because executing floating-point branches on a non-executable stack on Linux kernels prior to 4.8 can lead to application crashes for some MIPS configurations. While currently PT_GNU_STACK is not widely used on MIPS, future releases of GCC are expected to enable non-executable stack by default with PT_GNU_STACK by default and is thus likely to trigger a crash on older kernels. The GNU C Library can be built with --enable-kernel=4.8.0 in order to keep a non-executable stack while dropping support for older kernels. Siddhesh
diff --git a/NEWS b/NEWS index 44065d9..1e5dcf3 100644 --- a/NEWS +++ b/NEWS @@ -112,6 +112,18 @@ Deprecated and removed features, and other changes affecting compatibility: captured in a dlerror message. In general, this is unsafe because resetting the stack in an arbitrary function call is not possible. +* For the MIPS hard-float ABIs, the glibc will no longer honor RW PT_GNU_STACK + and will run on executable stack unless explicitly configured at build time + to require minimum kernel version 4.8 or newer. On Linux kernels prior to + 4.8 executing floating-point branches on non-executable stack can + lead to application crashes for some MIPS configurations. While currently + the PT_GNU_STACK is not widely used on MIPS, the future releases of GCC are + expected to enable RW PT_GNU_STACK by default thus likely to trigger the + crash on older kernels. + + The glibc can be built with --enable-kernel=4.8.0 in order to honor + RW PT_GNU_STACK while dropping support for older kernels. + Changes to build and runtime requirements: * It is no longer necessary to have recent Linux kernel headers to build
From: "Dragan Mladjenovic" <dmladjenovic@wavecomp.com> The change was introduced in: commit 33bc9efd91de1b14354291fc8ebd5bce96379f12 Author: Dragan Mladjenovic <dmladjenovic@wavecomp.com> Date: Fri Aug 23 16:38:04 2019 +0000 mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels and probably requires a small explanation. --- NEWS | 12 ++++++++++++ 1 file changed, 12 insertions(+)