This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4] Mips support for PT_GNU_STACK
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Dragan Mladjenovic <dmladjenovic at wavecomp dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Carlos O'Donell <carlos at redhat dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, "Maciej W . Rozycki" <macro at linux-mips dot org>, Faraz Shahbazker <fshahbazker at wavecomp dot com>
- Date: Tue, 20 Aug 2019 15:07:58 +0000
- Subject: Re: [PATCH v4] Mips support for PT_GNU_STACK
- Ironport-sdr: LVGk6iZxn97ZzYGa2fmud1p6xa24DFqmXa+bQINhEgeCRXr6/LQP5PKQoSaIRNNX26r6WsO/pu pL15R53rEwW8QJvZlwftUJe6RgAGyFsCUuGuO+tm8j6OI8PQPMZEoup6XUJNPFOrugTgWbShM/ L9BKkPmLykR8FO1OEw4mix8LdEbp1mpHaBwuei4EfM9yV9T7jBE0bbtIebpZB+cCfLv4Ol8B9K G/PCBKi01IFuQBVQhkmqDWKcd6B0VpLFbC2sVzvqX8dBqrSY5b93GevsCu+HloZ+mbf0PVIlTv wrQ=
- Ironport-sdr: jY7qWhu4fPukZIzm2JrbLe6oByIvS/t8ImLWtAiaT9UXeqL5nXtkoH6JrBfNcgQFT6GIQTpIP3 pZgx2cUGYc08tDgyWEKuX/vQass6UYm/vFgh/kjM0hXxW5s8ud+Q1ZdZICPrU2/W//Ho4SaIxf 8AZPy4VYSLcd5OlTJNrBT85dOiYo+7j+t2aO+2/47pcwY3ML30dYrPfHZ6ucCNkIjnhC0C/PcE Kq8JHoRCORUuKCtyFeMR+J/wIL30Lw8geNnirRexm2+KewKLirSElrggP+S+rhiDprtapu5hh5 8no=
- References: <1566299534-11595-1-git-send-email-dmladjenovic@wavecomp.com>
On Tue, 20 Aug 2019, Dragan Mladjenovic wrote:
> diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac
> index bcbdaff..f0f89ae 100644
> --- a/sysdeps/mips/configure.ac
> +++ b/sysdeps/mips/configure.ac
> @@ -13,3 +13,31 @@ yes
> if test x$libc_cv_mips_nan2008 = xyes; then
> AC_DEFINE(HAVE_MIPS_NAN2008)
> fi
> +
> +# Moved here to allow linux configure fragment to set minimum_kernel
> +# beforehand.
So you have an ordering problem between
sysdeps/unix/sysv/linux/configure.ac and
sysdeps/unix/sysv/linux/mips/configure.ac. But the Linux-specific code
> +AC_CACHE_CHECK([checking whether the compiler must use executable stack],
> + libc_cv_mips_force_execstack, [dnl
> +libc_cv_mips_force_execstack=no
> +case $os in linux*)
> + if test x"$libc_mips_float" = xhard -a -n "$minimum_kernel"; then
> + changequote(,)
> + min_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
> + changequote([,])
> + if test $min_version -lt 264192; then
doesn't seem appropriate for sysdeps/mips/configure.ac at all; I think the
ordering issue should be addressed another way. I think that would be
simply making sysdeps/unix/sysv/linux/mips/configure.ac handle the case of
empty minimum_kernel as meaning an old kernel, with a comment saying that
once the minimum kernel globally is 4.8 or later, all the code relating to
forcing executable stacks can be removed. (At that point, the person
increasing the minimum kernel version will be updating
sysdeps/unix/sysv/linux/mips/configure.ac anyway to remove the
arch_minimum_kernel=4.5.0 setting for NaN2008.)
(With all the configure changes in sysdeps/unix/sysv/linux/mips/, I'd
expect all the Makefile changes to be there as well.)
--
Joseph S. Myers
joseph@codesourcery.com