Ed Maste 7cafe89f9c sanitizers: Improve FreeBSD ASLR detection
The kern.elf64.aslr.pie_enable and kern.elf32.aslr.pie_enable sysctls
control the default setting for PIE binary address randomization, but
it is possible to enable or disable ASLR on a per-process basis.  Use
procctl(2) to query whether ASLR is enabled.

(Note that with ASLR enabled but sysctl kern.elf64.aslr.pie_enable=0
a PIE binary will in effect have randomization disabled, and be
functional with msan.  This is not intended as as a user-facing control
though.  The user can use proccontrol(1) to disable aslr for the
process.)

Approved by:	dim
Obtained from:	LLVM 64de0064f315f57044294879d9ff4eacb454d45b
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33933
2022-01-19 13:07:40 -05:00
..
2021-12-18 10:09:14 -08:00
2022-01-18 08:10:33 -08:00
2021-12-06 16:36:44 -05:00
2021-03-01 16:01:44 +01:00
2021-09-22 11:10:58 +02:00
2022-01-03 22:03:39 -08:00
2021-07-17 22:20:44 -07:00
2021-01-13 23:56:18 -06:00
2021-11-15 16:58:58 +01:00
2021-12-06 16:36:44 -05:00
2021-11-06 16:24:36 -06:00
2021-02-23 17:47:07 +00:00
2021-01-12 00:56:35 +02:00
2021-11-05 09:39:56 +01:00
2021-05-20 00:12:27 +03:00
2021-01-02 21:03:28 +02:00
2022-01-18 08:10:33 -08:00
2022-01-18 08:17:08 -08:00