platform_bionic/libc
Tamas Petz 8d55d1872a Enable BTI in bionic linker
This patch adds support to load BTI-enabled objects.

According to the ABI, BTI is recorded in the .note.gnu.property section.
The new parser evaluates the property section, if exists.
It searches for .note section with NT_GNU_PROPERTY_TYPE_0.
Once found it tries to find GNU_PROPERTY_AARCH64_FEATURE_1_AND.
The results are cached.

The main change in linker is when protection of loaded ranges gets
applied. When BTI is requested and the platform also supports it
the prot flags have to be amended with PROT_BTI for executable ranges.
Failing to add PROT_BTI flag would disable BTI protection.
Moreover, adding the new PROT flag for shared objects without BTI
compatibility would break applications.

Kernel does not add PROT_BTI to a loaded ELF which has interpreter.
Linker handles this case too.

Test: 1. Flame boots
      2. Tested on FVP with BTI enabled

Change-Id: Iafdf223b74c6e75d9f17ca90500e6fe42c4c1218
2020-09-23 17:53:28 -07:00
..
arch-arm More cleanup for #inclusivefixit. 2020-07-31 10:35:03 -07:00
arch-arm64 Adopt remaining MTE string routines. 2020-06-11 08:52:26 -07:00
arch-common/bionic Stop using the __ANDROID_API_x__ constants. 2019-12-20 13:26:14 -08:00
arch-x86 Changes for #inclusivefixit. 2020-07-21 16:34:58 -07:00
arch-x86_64 Track whether a thread is currently vforked. 2020-05-07 19:44:27 -07:00
async_safe async_safe: don't call libc's socket. 2020-08-21 14:23:57 -07:00
bionic Expose a function to reset the stack protector for the zygote. 2020-09-11 08:56:58 -07:00
dns android_getaddrinfo_proxy: fix memory leak on failure. 2019-11-05 12:42:14 -08:00
include Enable BTI in bionic linker 2020-09-23 17:53:28 -07:00
kernel Update to v5.8 kernel headers. 2020-08-04 13:50:49 -07:00
malloc_debug Fix deadlock/timeout in thread unwinding. 2020-05-20 18:18:54 -07:00
malloc_hooks malloc_hooks README.md: fix example compilation failures 2020-04-25 00:46:45 +00:00
platform Merge "Dump the per-thread TAGGED_ADDR_CTRL value if available." 2020-09-18 22:00:53 +00:00
private Adding system property tracing 2020-08-19 12:47:01 +08:00
seccomp Use more inclusive language for seccomp filter 2020-06-15 10:12:17 -07:00
stdio Various coverage improvements. 2020-08-12 15:52:14 -07:00
system_properties Add benchmark for property mapping 2020-09-02 16:12:21 +00:00
tools More cleanup for #inclusivefixit. 2020-07-31 10:35:03 -07:00
tzcode Incorporate upstream's strptime %Z/%z support. 2020-09-01 19:11:28 -07:00
upstream-freebsd Fully disable clang format where needed. 2020-01-30 08:10:17 -08:00
upstream-netbsd Reimplement our no-op utmp.h functions more simply. 2020-08-07 17:07:31 -07:00
upstream-openbsd Switch to musl memmem (via OpenBSD). 2020-08-06 14:33:48 -07:00
versioner-dependencies Stop generating unused headers. 2020-02-03 17:56:06 -08:00
Android.bp Explicitly add the include path for android_filesystem_config.h 2020-09-21 10:09:25 -07:00
fs_config_generator.py Revert "Revert "move android_ids into bionic"" 2016-12-13 23:47:25 +00:00
libc.map.txt Expose a function to reset the stack protector for the zygote. 2020-09-11 08:56:58 -07:00
libstdc++.map.txt Remove dead code. 2020-02-13 22:25:02 -08:00
MODULE_LICENSE_BSD
NOTICE Add benchmark for property mapping 2020-09-02 16:12:21 +00:00
SECCOMP_ALLOWLIST_APP.TXT Use more inclusive language for seccomp filter 2020-06-15 10:12:17 -07:00
SECCOMP_ALLOWLIST_COMMON.TXT Use more inclusive language for seccomp filter 2020-06-15 10:12:17 -07:00
SECCOMP_ALLOWLIST_SYSTEM.TXT Use more inclusive language for seccomp filter 2020-06-15 10:12:17 -07:00
SECCOMP_BLOCKLIST_APP.TXT Use more inclusive language for seccomp filter 2020-06-15 10:12:17 -07:00
SECCOMP_BLOCKLIST_COMMON.TXT Revert "Disallow vmsplice(2) for all zygote-spawned processes." 2020-06-23 17:53:35 +00:00
SECCOMP_PRIORITY.TXT Use more inclusive language for seccomp filter 2020-06-15 10:12:17 -07:00
SYSCALLS.TXT fdtrack: add wrapper for socketpair. 2020-04-29 17:21:16 -07:00
version_script.txt