[PATCH 0/2] ARM: set thread_info->syscall just before sys_* execution
From: Roman Pen
Date: Sun Jan 11 2015 - 09:33:21 EST
Hello.
It turned out to be that on ARM 'syscall_get_nr' call and
corresponding userspace proc access '/proc/*/syscall' always
return 0 instead of correct syscall number:
# cat /proc/*/syscall
0 0xffffffff 0x0 0x0 0x0 0x0 0x0 0xbea33cc0 0xb6f32f2c
0 0x5 0x16e99a8 0x0 0x0 0x0 0xbeec03b4 0xbeec02a0 0xb6cc85e0
0 0x3 0xbeee5d44 0xbeee5d40 0xbeee5d40 0x0 0x0 0xbeee5d3c 0xb6ef40ac
0 0xffffffff 0xbed757f8 0x2 0x0 0x2 0xbed757f8 0xbed757e0 0xb6e4af2c
[snip]
Where first digit should be not 0, but correct syscall number.
The first patch fixes this and the second one does minor tweaks.
Roman Pen (2):
ARM: entry-common: fix forgotten set of thread_info->syscall
ARM: entry-common,ptrace: do not pass scno to syscall_trace_enter
arch/arm/kernel/asm-offsets.c | 1 +
arch/arm/kernel/entry-common.S | 2 +-
arch/arm/kernel/ptrace.c | 6 ++++--
3 files changed, 6 insertions(+), 3 deletions(-)
Signed-off-by: Roman Pen <r.peniaev@xxxxxxxxx>
Cc: Russell King <linux@xxxxxxxxxxxxxxxx>
Cc: Christoffer Dall <christoffer.dall@xxxxxxxxxx>
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Cc: Sekhar Nori <nsekhar@xxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Cc: Eric Paris <eparis@xxxxxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: Marc Zyngier <marc.zyngier@xxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/