This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 0/3] Mips support for PT_GNU_STACK
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: Dragan Mladjenovic <dmladjenovic at wavecomp dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Joseph Myers <joseph at codesourcery dot com>, Carlos O'Donell <carlos at redhat dot com>, Faraz Shahbazker <fshahbazker at wavecomp dot com>
- Date: Thu, 18 Jul 2019 15:50:46 +0100 (BST)
- Subject: Re: [PATCH v2 0/3] Mips support for PT_GNU_STACK
- References: <1563214941-16203-1-git-send-email-dmladjenovic@wavecomp.com> <a21dabcc-4f24-8d74-08c6-3ee57b3df2bb@linaro.org>
On Wed, 17 Jul 2019, Adhemerval Zanella 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.
>
> I think checking the kernel version is the wrong approach, it prevents a
> distribution to backport the kernel fix without also applying a
> out-of-tree patch to fix it on glibc as well.
Good point!
> IMHO the proper way would be to make kernel advertise it through hwcap,
> as other architectures do for similar kernel features and not tie it to
> any specific version.
As other people have pointed out to use AT_HWCAP* for a plain software
feature might not be the most fortunate choice and we could use AT_FLAGS
or even define AT_LINUX_FEATURES (or AT_MIPS_FEATURES), but that is
secondary; it's not like we're going to run out of auxiliary vector's
space.
FWIW,
Maciej