sudo-project/sudo

EM_ARM undeclared

navinagaraj opened this issue · 6 comments

./exec_ptrace.c: In function 'set_exec_filter':
./exec_ptrace.h:102:29: error: 'EM_ARM' undeclared (first use in this function)

# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARM

./exec_ptrace.c:1180:38: note: in expansion of macro 'SECCOMP_AUDIT_ARCH'
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SECCOMP_AUDIT_ARCH, 0, 6),

./exec_ptrace.h:102:29: note: each undeclared identifier is reported only once for each function it appears in

# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARM

./exec_ptrace.c:1180:38: note: in expansion of macro 'SECCOMP_AUDIT_ARCH'
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SECCOMP_AUDIT_ARCH, 0, 6),

This should be addressed by 8215034, can you check whether changing the include of elf.h in src/exec_ptrace.h to linux/elf.h fixes the problem?

Hi yes i have changed those src/exec_ptrace.h to linux/elf.h but still i am facing the issue

EM_ARM should be defined by /usr/include/linux/elf-em.h which is included by /usr/include/linux/elf.h

Hi i am using 3.10 kernel version https://github.com/torvalds/linux/blob/v3.10/include/uapi/linux/elf-em.h .That's why I am getting this error: "EM_ARM undeclared ". I manually declared the macro in exec_ptrace.h. The error got suppressed. Is that any other way to clear the error ?

Is EM_ARM defined by /usr/include/libaudit.h on your system? If so, we can use that.

It would also be nice to know if /usr/include/elf.h on your system defines EM_ARM.