This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 0/3] Mips support for PT_GNU_STACK
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Dragan Mladjenovic <dmladjenovic at wavecomp dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, Carlos O'Donell <carlos at redhat dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Joseph Myers <joseph at codesourcery dot com>, Faraz Shahbazker <fshahbazker at wavecomp dot com>
- Date: Fri, 5 Jul 2019 17:16:47 +0100 (BST)
- Subject: Re: [PATCH 0/3] Mips support for PT_GNU_STACK
- References: <1561672142-5907-1-git-send-email-dmladjenovic@wavecomp.com> <87lfxmp0q1.fsf@oldenburg2.str.redhat.com>,<DM5PR22MB06836199BF24B646E7BF5B85D0FC0@DM5PR22MB0683.namprd22.prod.outlook.com> <MWHPR22MB0126DC5A7CADD00478863EDDB3F50@MWHPR22MB0126.namprd22.prod.outlook.com>
On Fri, 5 Jul 2019, Dragan Mladjenovic wrote:
> >>> The form of detection the patch proposes is not yet provided by the
> >>> kernel. Instead, this version of the patch does kernel version check
> >>> at runtime and provides compatible behavior if it cannot detect the
> >>> 4.8 kernel or newer.
> >>
> >> People patch their kernels to lie about the version, so I don't think
> >> this is correct.
It is their problem then, I don't think it's a valid excuse. We have
previous art in this area; cf. commit d5f2798a0ac9 ("MIPS: Set the
required Linux kernel version to 4.5.0 for 2008 NaN") and I reckon there
have been more cases like this.
> > Could a possible compromise be to forego the run-time check and instead make
> > the non-exec stack override trigger statically for MIPs when building glibc
> > with 4.8 or later kernel headers? In that case, the potential gap between glibc's
> > expectation and an old kernel masquerading as a newer version is exactly what it
> > would be for the usual minimum kernel version check.
> >
> > We'd lose the ability to build against older kernel headers and work seamlessly
> > with newer kernels. This is not ideal, but it is more important to get a
> > working non-executable stack solution out in user space.
>
> I'm interested if proposed compromise is acceptable for the community to be done in this release cycle?
> If not what else can we do to move this issue forward?
Submitting stuff late in the cycle never helps, so I think the best
compromise might be to target 2.31 instead. And I think a kernel version
check is the right approach.
Maciej