From: Francis Laniel <flaniel@linux.microsoft.com> To: linux-trace-devel@vger.kernel.org Cc: James Morse <james.morse@arm.com>, Daniel Kiss <daniel.kiss@arm.com>, Francis Laniel <flaniel@linux.microsoft.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Mark Brown <broonie@kernel.org>, Peter Collingbourne <pcc@google.com>, Kees Cook <keescook@chromium.org>, Mark Rutland <mark.rutland@arm.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/1] arm64: Do not forget syscall when starting a new thread. Date: Wed, 8 Jun 2022 17:24:46 +0100 [thread overview] Message-ID: <20220608162447.666494-2-flaniel@linux.microsoft.com> (raw) In-Reply-To: <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@linux.microsoft.com> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Francis Laniel <flaniel@linux.microsoft.com> To: linux-trace-devel@vger.kernel.org Cc: James Morse <james.morse@arm.com>, Daniel Kiss <daniel.kiss@arm.com>, Francis Laniel <flaniel@linux.microsoft.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Mark Brown <broonie@kernel.org>, Peter Collingbourne <pcc@google.com>, Kees Cook <keescook@chromium.org>, Mark Rutland <mark.rutland@arm.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/1] arm64: Do not forget syscall when starting a new thread. Date: Wed, 8 Jun 2022 17:24:46 +0100 [thread overview] Message-ID: <20220608162447.666494-2-flaniel@linux.microsoft.com> (raw) In-Reply-To: <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@linux.microsoft.com> --- 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-06-08 16:25 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-08 16:24 [PATCH v2 0/1] Remove forget_syscall() from start_thread_common() Francis Laniel 2022-06-08 16:24 ` Francis Laniel 2022-06-08 16:24 ` Francis Laniel 2022-06-08 16:24 ` Francis Laniel [this message] 2022-06-08 16:24 ` [PATCH v2 1/1] arm64: Do not forget syscall when starting a new thread Francis Laniel 2022-06-28 13:58 ` Will Deacon 2022-06-28 13:58 ` Will Deacon 2022-06-28 19:26 ` Francis Laniel 2022-06-28 19:26 ` Francis Laniel 2022-06-30 17:16 ` Francis Laniel 2022-06-30 17:16 ` Francis Laniel 2022-07-01 11:36 ` Will Deacon 2022-07-01 11:36 ` Will Deacon 2022-07-01 12:10 ` Francis Laniel 2022-07-01 12:10 ` Francis Laniel 2022-06-23 14:09 ` [PATCH v2 0/1] Remove forget_syscall() from start_thread_common() Francis Laniel 2022-06-23 14:09 ` Francis Laniel 2022-06-23 14:09 ` Francis Laniel 2022-07-01 15:41 ` Will Deacon 2022-07-01 15:41 ` Will Deacon 2022-07-01 15:41 ` Will Deacon 2022-07-04 8:55 ` Francis Laniel 2022-07-04 8:55 ` Francis Laniel 2022-07-04 8:55 ` Francis Laniel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220608162447.666494-2-flaniel@linux.microsoft.com \ --to=flaniel@linux.microsoft.com \ --cc=broonie@kernel.org \ --cc=catalin.marinas@arm.com \ --cc=christophe.leroy@csgroup.eu \ --cc=daniel.kiss@arm.com \ --cc=james.morse@arm.com \ --cc=keescook@chromium.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-trace-devel@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=pcc@google.com \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.