According to manpage the syscall nr is stored in r0
and return value in r3 for powerpc. Define it so we
can use seccomp and utrace on powerpc.
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
# else
# define ARCH_NR AUDIT_ARCH_ARMEB
# endif
+#elif defined(__PPC__)
+# define REG_SYSCALL regs.gpr[0]
+# define ARCH_NR AUDIT_ARCH_PPC
#else
# warning "Platform does not support seccomp filter yet"
# define REG_SYSCALL 0
# if defined(__ARM_EABI__)
# define reg_retval_nr _offsetof(struct user, regs.uregs[0])
# endif
+#elif defined(__PPC__)
+#define reg_syscall_nr _offsetof(struct user, regs.gpr[0])
+#define reg_retval_nr _offsetof(struct user, regs.gpr[3])
#else
#error tracing is not supported on this architecture
#endif