]> sourceware.org Git - glibc.git/commit
aarch64: Respect p_flags when protecting code with PROT_BTI
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 13 Jul 2020 10:28:18 +0000 (11:28 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 24 Jul 2020 07:52:22 +0000 (08:52 +0100)
commit7ebd114211dcd290efd54e610bbde0765bd7764c
tree1f8e6257683da8693818aceccaf8b67de776ebff
parent04726be814c6fd6d9cf974e15d684dd3ac1a180e
aarch64: Respect p_flags when protecting code with PROT_BTI

Use PROT_READ and PROT_WRITE according to the load segment p_flags
when adding PROT_BTI.

This is before processing relocations which may drop PROT_BTI in
case of textrels.  Executable stacks are not protected via PROT_BTI
either.  PROT_BTI is hardening in case memory corruption happened,
it's value is reduced if there is writable and executable memory
available so missing it on such memory is fine, but we should
respect the p_flags and should not drop PROT_WRITE.
sysdeps/aarch64/dl-bti.c
This page took 0.040335 seconds and 5 git commands to generate.