[patch 03/11] rseq: Rename rseq_syscall() to rseq_debug_syscall_exit()

Thomas Gleixner posted 11 patches 1 month, 3 weeks ago
There is a newer version of this series
[patch 03/11] rseq: Rename rseq_syscall() to rseq_debug_syscall_exit()
Posted by Thomas Gleixner 1 month, 3 weeks ago
rseq_syscall() is a debug function, which is invoked before the syscall
exit work is handled. Name it so it's clear what it does.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
---
 include/linux/entry-common.h |    2 +-
 include/linux/rseq.h         |    4 ++--
 kernel/rseq.c                |    5 +++--
 3 files changed, 6 insertions(+), 5 deletions(-)

--- a/include/linux/entry-common.h
+++ b/include/linux/entry-common.h
@@ -162,7 +162,7 @@ static __always_inline void syscall_exit
 			local_irq_enable();
 	}
 
-	rseq_syscall(regs);
+	rseq_debug_syscall_exit(regs);
 
 	/*
 	 * Do one-time syscall specific work. If these work items are
--- a/include/linux/rseq.h
+++ b/include/linux/rseq.h
@@ -113,9 +113,9 @@ static inline void rseq_exit_to_user_mod
 #endif  /* !CONFIG_RSEQ */
 
 #ifdef CONFIG_DEBUG_RSEQ
-void rseq_syscall(struct pt_regs *regs);
+void rseq_debug_syscall_exit(struct pt_regs *regs);
 #else /* CONFIG_DEBUG_RSEQ */
-static inline void rseq_syscall(struct pt_regs *regs) { }
+static inline void rseq_debug_syscall_exit(struct pt_regs *regs) { }
 #endif /* !CONFIG_DEBUG_RSEQ */
 
 #endif /* _LINUX_RSEQ_H */
--- a/kernel/rseq.c
+++ b/kernel/rseq.c
@@ -427,7 +427,8 @@ void __rseq_handle_notify_resume(struct
 	 * this invocation was invoked inside a critical section, then it
 	 * will either end up in this code again or a possible violation of
 	 * a syscall inside a critical region can only be detected by the
-	 * debug code in rseq_syscall() in a debug enabled kernel.
+	 * debug code in rseq_debug_syscall_exit() in a debug enabled
+	 * kernel.
 	 */
 	if (regs) {
 		/*
@@ -476,7 +477,7 @@ void __rseq_handle_notify_resume(struct
  * Terminate the process if a syscall is issued within a restartable
  * sequence.
  */
-void rseq_syscall(struct pt_regs *regs)
+void rseq_debug_syscall_exit(struct pt_regs *regs)
 {
 	unsigned long ip = instruction_pointer(regs);
 	struct task_struct *t = current;
Re: [patch 03/11] rseq: Rename rseq_syscall() to rseq_debug_syscall_exit()
Posted by Mathieu Desnoyers 1 month, 2 weeks ago
On 2025-08-13 12:29, Thomas Gleixner wrote:
> rseq_syscall() is a debug function, which is invoked before the syscall
> exit work is handled. Name it so it's clear what it does.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: "Paul E. McKenney" <paulmck@kernel.org>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> ---
>   include/linux/entry-common.h |    2 +-
>   include/linux/rseq.h         |    4 ++--
>   kernel/rseq.c                |    5 +++--
>   3 files changed, 6 insertions(+), 5 deletions(-)
> 
> --- a/include/linux/entry-common.h
> +++ b/include/linux/entry-common.h
> @@ -162,7 +162,7 @@ static __always_inline void syscall_exit
>   			local_irq_enable();
>   	}
>   
> -	rseq_syscall(regs);
> +	rseq_debug_syscall_exit(regs);
>   
>   	/*
>   	 * Do one-time syscall specific work. If these work items are
> --- a/include/linux/rseq.h
> +++ b/include/linux/rseq.h
> @@ -113,9 +113,9 @@ static inline void rseq_exit_to_user_mod
>   #endif  /* !CONFIG_RSEQ */
>   
>   #ifdef CONFIG_DEBUG_RSEQ
> -void rseq_syscall(struct pt_regs *regs);
> +void rseq_debug_syscall_exit(struct pt_regs *regs);
>   #else /* CONFIG_DEBUG_RSEQ */
> -static inline void rseq_syscall(struct pt_regs *regs) { }
> +static inline void rseq_debug_syscall_exit(struct pt_regs *regs) { }
>   #endif /* !CONFIG_DEBUG_RSEQ */
>   
>   #endif /* _LINUX_RSEQ_H */
> --- a/kernel/rseq.c
> +++ b/kernel/rseq.c
> @@ -427,7 +427,8 @@ void __rseq_handle_notify_resume(struct
>   	 * this invocation was invoked inside a critical section, then it
>   	 * will either end up in this code again or a possible violation of
>   	 * a syscall inside a critical region can only be detected by the
> -	 * debug code in rseq_syscall() in a debug enabled kernel.
> +	 * debug code in rseq_debug_syscall_exit() in a debug enabled
> +	 * kernel.
>   	 */
>   	if (regs) {
>   		/*
> @@ -476,7 +477,7 @@ void __rseq_handle_notify_resume(struct
>    * Terminate the process if a syscall is issued within a restartable
>    * sequence.
>    */
> -void rseq_syscall(struct pt_regs *regs)
> +void rseq_debug_syscall_exit(struct pt_regs *regs)
>   {
>   	unsigned long ip = instruction_pointer(regs);
>   	struct task_struct *t = current;
> 


-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com