diff options
author | Francis Laniel <flaniel@linux.microsoft.com> | 2022-06-08 17:24:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-25 11:14:57 +0200 |
commit | 09fbf70660c1939fc17bfe3e816b20ca94d64d97 (patch) | |
tree | 81d5c32cb60b774847a179c4cc321804352fd937 /arch/arm64 | |
parent | d3f409c375490a86d342eae1d0f6271d12dc19d0 (diff) | |
download | linux-stable-09fbf70660c1939fc17bfe3e816b20ca94d64d97.tar.gz linux-stable-09fbf70660c1939fc17bfe3e816b20ca94d64d97.tar.bz2 linux-stable-09fbf70660c1939fc17bfe3e816b20ca94d64d97.zip |
arm64: Do not forget syscall when starting a new thread.
[ Upstream commit de6921856f99c11d3986c6702d851e1328d4f7f6 ]
Enable tracing of the execve*() system calls with the
syscalls:sys_exit_execve tracepoint by removing the call to
forget_syscall() when starting a new thread and preserving the value of
regs->syscallno across exec.
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
Link: https://lore.kernel.org/r/20220608162447.666494-2-flaniel@linux.microsoft.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/include/asm/processor.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 773ea8e0e442..f81074c68ff3 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -172,8 +172,9 @@ void tls_preserve_current_state(void); static inline void start_thread_common(struct pt_regs *regs, unsigned long pc) { + s32 previous_syscall = regs->syscallno; memset(regs, 0, sizeof(*regs)); - forget_syscall(regs); + regs->syscallno = previous_syscall; regs->pc = pc; } |