lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260125164016.331257-3-qq570070308@gmail.com>
Date: Mon, 26 Jan 2026 00:40:09 +0800
From: Xie Yuanbin <qq570070308@...il.com>
To: linux@...linux.org.uk,
	johannes@...solutions.net,
	masahiroy@...nel.org,
	jgross@...e.com,
	nsc@...nel.org,
	kees@...nel.org,
	tglx@...nel.org,
	mingo@...nel.org,
	frederic@...nel.org,
	paulmck@...nel.org,
	peterz@...radead.org,
	mathieu.desnoyers@...icios.com,
	luto@...nel.org,
	edumazet@...gle.com
Cc: linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	Xie Yuanbin <qq570070308@...il.com>
Subject: [PATCH 2/9] ARM: entry: remove macros ct_user_enter() and ct_user_exit()

The macros ct_user_enter and ct_user_exit have only three calling points,
and the 'save' argument is always 0.

Expand the calling and delete the macros.

Preparing for subsequent commits, nothing changes on vmlinux.

Signed-off-by: Xie Yuanbin <qq570070308@...il.com>
---
 arch/arm/kernel/entry-armv.S   |  4 +++-
 arch/arm/kernel/entry-common.S |  8 ++++++--
 arch/arm/kernel/entry-header.S | 28 ----------------------------
 3 files changed, 9 insertions(+), 31 deletions(-)

diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index ef6a657c8d13..7f8781666a44 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -406,7 +406,9 @@ ENDPROC(__fiq_abt)
 #ifdef CONFIG_TRACE_IRQFLAGS
 	bl	trace_hardirqs_off
 #endif
-	ct_user_exit save = 0
+#ifdef CONFIG_CONTEXT_TRACKING_USER
+	bl	user_exit_callable
+#endif
 	.endif
 	.endm
 
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 88336a1292bb..f579770fab71 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -117,7 +117,9 @@ ENTRY(ret_to_user_from_irq)
 no_work_pending:
 	asm_trace_hardirqs_on save = 0
 
-	ct_user_enter save = 0
+#ifdef CONFIG_CONTEXT_TRACKING_USER
+	bl	user_enter_callable
+#endif
 
 #ifdef CONFIG_KSTACK_ERASE
 	bl	stackleak_erase_on_task_stack
@@ -190,7 +192,9 @@ ENTRY(vector_swi)
 	alignment_trap r10, ip, cr_alignment
 	asm_trace_hardirqs_on save=0
 	enable_irq_notrace
-	ct_user_exit save=0
+#ifdef CONFIG_CONTEXT_TRACKING_USER
+	bl	user_exit_callable
+#endif
 
 	/*
 	 * Get the system call number.
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index 99411fa91350..fd62112e1e6e 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -361,34 +361,6 @@ ALT_UP_B(.L1_\@)
 #endif	/* !CONFIG_THUMB2_KERNEL */
 	.endm
 
-/*
- * Context tracking subsystem.  Used to instrument transitions
- * between user and kernel mode.
- */
-	.macro ct_user_exit, save = 1
-#ifdef CONFIG_CONTEXT_TRACKING_USER
-	.if	\save
-	stmdb   sp!, {r0-r3, ip, lr}
-	bl	user_exit_callable
-	ldmia	sp!, {r0-r3, ip, lr}
-	.else
-	bl	user_exit_callable
-	.endif
-#endif
-	.endm
-
-	.macro ct_user_enter, save = 1
-#ifdef CONFIG_CONTEXT_TRACKING_USER
-	.if	\save
-	stmdb   sp!, {r0-r3, ip, lr}
-	bl	user_enter_callable
-	ldmia	sp!, {r0-r3, ip, lr}
-	.else
-	bl	user_enter_callable
-	.endif
-#endif
-	.endm
-
 	.macro	invoke_syscall, table, nr, tmp, ret, reload=0
 #ifdef CONFIG_CPU_SPECTRE
 	mov	\tmp, \nr
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ