Fix MIPS seccomp definitions for PRIMARY and SECONDARY arch

Set correct values for PRIMARY and SECONDARY arch definitions
to match LE MIPS architectures.
This change is resolving boot problem for mips32 arch with 3.18 kernel.
This also fixes mips64 issue related to PRIMARY_ARCH definition,
but in order to boot to home screen it needs additional syscalls whitelisted
which will be introduced in separate patch.

Tested on emulator:
emulator -kernel prebuilts/qemu-kernel/mips/3.18/kernel-qemu2

Change-Id: I68dfd136c22141933a8a8c5336db01a02f00b0df
This commit is contained in:
Lazar Trsic 2017-05-05 14:29:34 +02:00
parent 86b3494e3b
commit 22b4351d5e

View file

@ -51,10 +51,10 @@ static const size_t secondary_filter_size = x86_filter_size;
#elif defined __mips__ || defined __mips64__
#define DUAL_ARCH
#define PRIMARY_ARCH AUDIT_ARCH_MIPS64
#define PRIMARY_ARCH AUDIT_ARCH_MIPSEL64
static const struct sock_filter* primary_filter = mips64_filter;
static const size_t primary_filter_size = mips64_filter_size;
#define SECONDARY_ARCH AUDIT_ARCH_MIPS
#define SECONDARY_ARCH AUDIT_ARCH_MIPSEL
static const struct sock_filter* secondary_filter = mips_filter;
static const size_t secondary_filter_size = mips_filter_size;