mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
make: Disable branch-protection for PIE code on ARM64
Branch protection uses PAC. It cryptographically "signs" a function's return address before it is stored on the stack. Upon return, the address is authenticated using a secret key. If the signature is invalid, the program will fault. The PIE code is used for the parasite and the restorer. In both cases, it runs in a foreign process. The case of the restorer is even trickier because it needs to restore the original PAC keys, which invalidates all previously "signed" pointers within the restorer itself. Fixes #2709 Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
parent
98f2bd525a
commit
dcee5bd6ff
1 changed files with 2 additions and 0 deletions
2
Makefile
2
Makefile
|
|
@ -64,6 +64,8 @@ endif
|
|||
|
||||
ifeq ($(ARCH),aarch64)
|
||||
DEFINES := -DCONFIG_AARCH64
|
||||
CC_MBRANCH_PROT := $(shell $(CC) -c -x c /dev/null -mbranch-protection=none -o /dev/null >/dev/null 2>&1 && echo "-mbranch-protection=none")
|
||||
CFLAGS_PIE := $(CC_MBRANCH_PROT)
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),ppc64)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue