Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EM_ARM undeclared #232

Closed
navinagaraj opened this issue Jan 18, 2023 · 6 comments
Closed

EM_ARM undeclared #232

navinagaraj opened this issue Jan 18, 2023 · 6 comments

Comments

@navinagaraj
Copy link

navinagaraj commented Jan 18, 2023

./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),

@millert
Copy link
Collaborator

millert commented Jan 18, 2023

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?

@navinagaraj
Copy link
Author

navinagaraj commented Jan 18, 2023

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

@millert
Copy link
Collaborator

millert commented Jan 18, 2023

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

@navinagaraj
Copy link
Author

navinagaraj commented Jan 19, 2023

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 ?

@millert
Copy link
Collaborator

millert commented Jan 19, 2023

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

@millert
Copy link
Collaborator

millert commented Jan 23, 2023

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

millert added a commit that referenced this issue Jan 24, 2023
Older kernel headers are missing the definition of EM_ARM in linux/elf.h.
GitHub issue #232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants