]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Correct __NR_compat_syscalls for bpf
authorMark Rutland <mark.rutland@arm.com>
Mon, 5 Jan 2015 12:24:47 +0000 (12:24 +0000)
committerWill Deacon <will.deacon@arm.com>
Wed, 7 Jan 2015 11:40:58 +0000 (11:40 +0000)
commit84d7ba90901107edae1479e48b712f2cf22918fe
tree11209f8c56edbfe614da3bf0b8a95c90e5cfc7d9
parent981369db3df4f6e821d3554bc0046723423683ef
arm64: Correct __NR_compat_syscalls for bpf

Commit b0d596b791c082a3 (arm64: compat: Enable bpf syscall) made the
usual mistake of forgetting to update __NR_compat_syscalls. Due to this,
when el0_sync_compat calls el0_svc_naked, the test against sc_nr
(__NR_compat_syscalls) will fail, and we'll call ni_sys, returning
-ENOSYS to userspace.

This patch bumps __NR_compat_syscalls appropriately, enabling the use of
the bpf syscall from compat tasks.

Due to the reorganisation of unistd{,32}.h as part of commit
aeb9493faa19af44 (arm64: Add __NR_* definitions for compat syscalls) it
is not currently possible to include both headers and sanity-check the
value of __NR_compat_syscalls at build-time to prevent this from
happening again. Additional rework is required to make such niceties a
possibility.

Cc: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/unistd.h