[PATCH v2 1/1] arm64: Do not forget syscall when starting a new thread.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: [PATCH v2 1/1] arm64: Do not forget syscall when starting a new thread.
- From: Francis Laniel <flaniel@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 8 Jun 2022 17:24:46 +0100
- Cc: James Morse <james.morse@xxxxxxx>, Daniel Kiss <daniel.kiss@xxxxxxx>, Francis Laniel <flaniel@xxxxxxxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Peter Collingbourne <pcc@xxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- In-reply-to: <20220608162447.666494-1-flaniel@linux.microsoft.com>
- References: <20220608162447.666494-1-flaniel@linux.microsoft.com>
This patch enables exeve*() to be traced with syscalls:sys_exit_execve
tracepoint.
Previous to it, by calling forget_syscall(), this tracepoint would not
print its information as syscall is -1.
So, this patch removes call to forget_syscall() and set regs->syscallno
to its previous value.
Signed-off-by: Francis Laniel <flaniel@xxxxxxxxxxxxxxxxxxx>
---
arch/arm64/include/asm/processor.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index 9e58749db21d..86eb0bfe3b38 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -272,8 +272,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;
if (system_uses_irq_prio_masking())
--
2.25.1
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]