All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.14 01/12] arm64: Do not forget syscall when starting a new thread.
@ 2022-08-08  1:39 ` Sasha Levin
  0 siblings, 0 replies; 17+ messages in thread
From: Sasha Levin @ 2022-08-08  1:39 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Francis Laniel, Will Deacon, Sasha Levin, catalin.marinas,
	broonie, keescook, rmk+kernel, mark.rutland, christophe.leroy,
	linux-arm-kernel

From: Francis Laniel <flaniel@linux.microsoft.com>

[ 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>
---
 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 9eb95ab19924..8767f9d4ebc6 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -143,8 +143,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;
 }
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-08-08  2:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-08  1:39 [PATCH AUTOSEL 4.14 01/12] arm64: Do not forget syscall when starting a new thread Sasha Levin
2022-08-08  1:39 ` Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 02/12] arm64: fix oops in concurrently setting insn_emulation sysctls Sasha Levin
2022-08-08  1:39   ` Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 03/12] ext2: Add more validity checks for inode counts Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 04/12] genirq: GENERIC_IRQ_IPI depends on SMP Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 05/12] ARM: dts: imx6ul: add missing properties for sram Sasha Levin
2022-08-08  1:39   ` Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 06/12] ARM: dts: imx6ul: fix qspi node compatible Sasha Levin
2022-08-08  1:39   ` Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 07/12] ARM: OMAP2+: display: Fix refcount leak bug Sasha Levin
2022-08-08  1:39   ` Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 08/12] ACPI: PM: save NVS memory for Lenovo G40-45 Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 09/12] ACPI: LPSS: Fix missing check in register_device_clock() Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 10/12] hwmon: (sht15) Fix wrong assumptions in device remove callback Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 11/12] PM: hibernate: defer device probing when resuming from hibernation Sasha Levin
2022-08-08  1:39 ` [PATCH AUTOSEL 4.14 12/12] selinux: Add boundary check in put_entry() Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.