Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Nov 2018 14:23:23 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        John Baldwin <jhb@freebsd.org>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r340231 - head/sys/kern
Message-ID:  <F4A4E491-0792-409B-BFF9-C7BE8C8B7B87@yahoo.com>

next in thread | raw e-mail | index | archive | help
John Baldwin jhb at FreeBSD.org wrote on
Wed Nov 7 21:36:02 UTC 2018 :

> On 11/7/18 1:01 PM, Ed Schouten wrote:
> > Op wo 7 nov. 2018 om 19:32 schreef John Baldwin <jhb at =
freebsd.org>:
> >> Modified: head/sys/kern/imgact_elf.c
> >> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> >> --- head/sys/kern/imgact_elf.c  Wed Nov  7 18:29:54 2018        =
(r340230)
> >> +++ head/sys/kern/imgact_elf.c  Wed Nov  7 18:32:02 2018        =
(r340231)
> >> @@ -120,7 +120,8 @@ SYSCTL_INT(_debug, OID_AUTO, =
__elfN(legacy_coredump),
> >>
> >>  int __elfN(nxstack) =3D
> >>  #if defined(__amd64__) || defined(__powerpc64__) /* both 64 and 32 =
bit */ || \
> >> -    (defined(__arm__) && __ARM_ARCH >=3D 7) || =
defined(__aarch64__)
> >> +    (defined(__arm__) && __ARM_ARCH >=3D 7) || =
defined(__aarch64__) || \
> >> +    defined(__riscv)
> >>         1;
> >>  #else
> >>         0;
> >=20
> > Are we getting to the point that it might make sense to invert this
> > logic, i.e., just list the architectures that require executable
> > stacks?
>=20
> It's not clear.  The remaining set is i386 (should be able to use =
nxstack
> when using PAE and PG_NX is supported), MIPS (no X permission in =
PTEs),
> 32-bit powerpc (no X permissions in PTEs AFAICT), and sparc64 (no X
> permissions in PTEs AFAICT).  For architectures without X ptes, =
removing
> VM_PROT_EXECUTE from the stack permissions is a no-op and would be
> harmless, so we could perhaps just default this to always on at this
> point?


FreeBSD for 32-bit powerpc can also run on powerpc64 hardware,
something I commonly do with 32-bit powerpc FreeBSD.

So I'm not sure if some of the powerpc64 context sometimes
applies for such use or not. May be the mode of use is as-if
it was limited like 32-bit powerpc hardware for what you
propose?

I do not now if i386 or mips have the same sort of
question relative to use on 64-bit capable hardware.


=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F4A4E491-0792-409B-BFF9-C7BE8C8B7B87>