ptrace test fails to build on ARM, struct pt_regs undefined
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
AppArmor |
New
|
Undecided
|
Unassigned |
Bug Description
The ptrace regression test uses struct pt_regs on ARM (and PowerPC), but doesn't appear to include the necessary headers to define that struct:
$ gcc -o ptrace ptrace.c
ptrace.c: In function ‘read_ptrace_
ptrace.c:58:19: error: storage size of ‘regs’ isn’t known
ARCH_REGS_STRUCT regs;
On ARM, the right one appears to be <asm/ptrace.h>, unless you know better. With the attached patch, it works.
The code path where struct pt_regs is used is if "defined(__arm__) || defined(
Build-tested on Debian armhf, powerpc, ppc64.