[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250107-arm-generic-entry-v3-12-4e5f3c15db2d@linaro.org>
Date: Tue, 07 Jan 2025 10:41:28 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Dmitry Vyukov <dvyukov@...gle.com>, Oleg Nesterov <oleg@...hat.com>,
Russell King <linux@...linux.org.uk>, Kees Cook <kees@...nel.org>,
Andy Lutomirski <luto@...capital.net>, Will Drewry <wad@...omium.org>,
Frederic Weisbecker <frederic@...nel.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Jinjie Ruan <ruanjinjie@...wei.com>, Arnd Bergmann <arnd@...db.de>,
Ard Biesheuvel <ardb@...nel.org>, Al Viro <viro@...iv.linux.org.uk>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH RFC v3 12/30] ARM: entry: Rename syscall invocation
Now that we do not have a separate trace syscall invocation
path, rename the invocation functions to be generic.
This can be squashed into the previous patch, it is just done
here for the previous patch to be easier to get a cleaner
diff and be easier to read.
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
arch/arm/include/asm/syscall.h | 2 +-
arch/arm/kernel/entry-common.S | 10 +++++-----
arch/arm/kernel/syscall.c | 8 ++++----
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h
index 9c664d8c5718f58034f442c20a030b59faf65dd9..b94fd7ce17f82f0baf06b74800245112e1f13002 100644
--- a/arch/arm/include/asm/syscall.h
+++ b/arch/arm/include/asm/syscall.h
@@ -19,7 +19,7 @@
extern const unsigned long sys_call_table[];
-int invoke_syscall_trace(void *table, struct pt_regs *regs, int scno);
+int invoke_syscall(void *table, struct pt_regs *regs, int scno);
static inline int syscall_get_nr(struct task_struct *task,
struct pt_regs *regs)
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index f0f1f8723965313b287158fb2a238908db72fcd2..f1e48002bd3075ea67b5883178583127fa0055c6 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -260,7 +260,7 @@ ENTRY(vector_swi)
stmdb sp!, {r4, r5} @ push fifth and sixth args
mov r0, tbl
mov r2, scno @ syscall number from r7
- bl invoke_syscall_trace
+ bl invoke_syscall
cmp r0, #0
beq ret_fast_syscall
/* This path taken when tracing */
@@ -390,7 +390,7 @@ ENDPROC(sys_mmap2)
* r1: regs
* r2: syscall number
*/
-SYM_TYPED_FUNC_START(invoke_syscall_trace_asm)
+SYM_TYPED_FUNC_START(invoke_syscall_asm)
#ifdef CONFIG_CPU_SPECTRE
csdb
#endif
@@ -400,17 +400,17 @@ SYM_TYPED_FUNC_START(invoke_syscall_trace_asm)
/* Make space to copy the two syscall stack arguments */
sub sp, sp, #S_OFF
mov scno, r2
- badr lr, __invoke_syscall_trace_ret @ return right here
+ badr lr, __invoke_syscall_ret @ return right here
ldmia r1, {r0 - r6} @ reload r0-r6 from regs
stmia sp, {r4, r5} @ copy stack arguments
ldr pc, [tbl, scno, lsl #2] @ call sys_* routine
-__invoke_syscall_trace_ret:
+__invoke_syscall_ret:
/* Drop the copied stack arguments */
add sp, sp, #S_OFF
pop {r4 - r10, lr}
ARM( mov pc, lr )
THUMB( bx lr )
-SYM_FUNC_END(invoke_syscall_trace_asm)
+SYM_FUNC_END(invoke_syscall_asm)
#ifdef CONFIG_OABI_COMPAT
diff --git a/arch/arm/kernel/syscall.c b/arch/arm/kernel/syscall.c
index 36330023b5484399a4ca2fdb5727b410e2c74b6f..6f518ec3870fb36a64d1b671b20f96d63a52bf78 100644
--- a/arch/arm/kernel/syscall.c
+++ b/arch/arm/kernel/syscall.c
@@ -8,10 +8,10 @@ static inline bool has_syscall_work(unsigned long flags)
return unlikely(flags & _TIF_SYSCALL_WORK);
}
-int invoke_syscall_trace_asm(void *table, struct pt_regs *regs, int scno);
-__ADDRESSABLE(invoke_syscall_trace_asm);
+int invoke_syscall_asm(void *table, struct pt_regs *regs, int scno);
+__ADDRESSABLE(invoke_syscall_asm);
-__visible int invoke_syscall_trace(void *table, struct pt_regs *regs, int scno)
+__visible int invoke_syscall(void *table, struct pt_regs *regs, int scno)
{
unsigned long flags = read_thread_flags();
int ret;
@@ -23,7 +23,7 @@ __visible int invoke_syscall_trace(void *table, struct pt_regs *regs, int scno)
}
if (scno < NR_syscalls) {
- ret = invoke_syscall_trace_asm(table, regs, scno);
+ ret = invoke_syscall_asm(table, regs, scno);
goto exit_save;
}
--
2.47.1
Powered by blists - more mailing lists