freebsd-dev/contrib/llvm-project
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
..
clang Revert clang change that breaks CTF on aarch64 2021-12-12 21:11:40 +01:00
compiler-rt sanitizers: Improve FreeBSD ASLR detection 2022-01-19 13:07:40 -05:00
libcxx Merge llvm-project release/13.x llvmorg-13.0.0-rc2-43-gf56129fe78d5 2021-11-13 21:45:49 +01:00
libunwind Merge llvm-project release/13.x llvmorg-13.0.0-rc2-43-gf56129fe78d5 2021-11-13 21:45:49 +01:00
lld Merge llvm-project 13.0.0 release 2021-11-13 21:49:29 +01:00
lldb Merge llvm-project release/13.x llvmorg-13.0.0-rc3-8-g08642a395f23 2021-11-13 21:46:08 +01:00
llvm Apply clang fix for crash or assertion failure compiling part of llvm 2021-12-24 12:46:00 +01:00
openmp Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a 2021-11-13 21:42:03 +01:00
FREEBSD-Xlist Belatedly update contrib/llvm-project/FREEBSD-Xlist for llvm 13 2021-11-20 18:06:36 +01:00