Skip to content

Commit 74799ae

Browse files
adrianreberavagin
authored andcommitted
aarch64: fix build with missing NT_ARM_PAC_ENABLED_KEYS
On a RHEL 8 based system building CRIU fails with: criu/arch/aarch64/crtools.c: In function 'save_pac_keys': criu/arch/aarch64/crtools.c:73:39: error: 'NT_ARM_PAC_ENABLED_KEYS' undeclared (first use in this function); did you mean 'NT_ARM_PACA_KEYS'? ret = ptrace(PTRACE_GETREGSET, pid, NT_ARM_PAC_ENABLED_KEYS, &iov); ^~~~~~~~~~~~~~~~~~~~~~~ NT_ARM_PACA_KEYS criu/arch/aarch64/crtools.c:73:39: note: each undeclared identifier is reported only once for each function it appears in criu/arch/aarch64/crtools.c: In function 'arch_ptrace_restore': criu/arch/aarch64/crtools.c:261:44: error: 'NT_ARM_PAC_ENABLED_KEYS' undeclared (first use in this function); did you mean 'NT_ARM_PACA_KEYS'? if ((ret = ptrace(PTRACE_SETREGSET, pid, NT_ARM_PAC_ENABLED_KEYS, &iov))) { ^~~~~~~~~~~~~~~~~~~~~~~ NT_ARM_PACA_KEYS This adds the missing define if it is undefined. Signed-off-by: Adrian Reber <areber@redhat.com>
1 parent 6805841 commit 74799ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

criu/arch/aarch64/crtools.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
#include "compel/infect.h"
2424
#include "pstree.h"
2525

26+
#ifndef NT_ARM_PAC_ENABLED_KEYS
27+
#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* AArch64 pointer authentication enabled keys. */
28+
#endif
29+
2630
extern unsigned long getauxval(unsigned long type);
2731

2832
#define assign_reg(dst, src, e) dst->e = (__typeof__(dst->e))(src)->e

0 commit comments

Comments
 (0)