[PATCH] powerpc/audit: Avoid unneccessary #ifdef in syscall_get_arguments()

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE1811d LANDED

Landed in mainline as 898a1ef06ad4 on 2021-08-20.

2 messages, 2 authors, 2021-08-27 · open the first message on its own page

[PATCH] powerpc/audit: Avoid unneccessary #ifdef in syscall_get_arguments()

From: Christophe Leroy <hidden>
Date: 2021-08-20 09:28:24

Use is_32bit_task() which already handles CONFIG_COMPAT.

Signed-off-by: Christophe Leroy <redacted>
---
 arch/powerpc/include/asm/syscall.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h
index ac766037e8a1..c60ebd04b2ed 100644
--- a/arch/powerpc/include/asm/syscall.h
+++ b/arch/powerpc/include/asm/syscall.h
@@ -90,10 +90,9 @@ static inline void syscall_get_arguments(struct task_struct *task,
 	unsigned long val, mask = -1UL;
 	unsigned int n = 6;
 
-#ifdef CONFIG_COMPAT
-	if (test_tsk_thread_flag(task, TIF_32BIT))
+	if (is_32bit_task())
 		mask = 0xffffffff;
-#endif
+
 	while (n--) {
 		if (n == 0)
 			val = regs->orig_gpr3;
-- 
2.25.0

Re: [PATCH] powerpc/audit: Avoid unneccessary #ifdef in syscall_get_arguments()

From: Michael Ellerman <hidden>
Date: 2021-08-27 13:22:48

On Fri, 20 Aug 2021 09:28:19 +0000 (UTC), Christophe Leroy wrote:
Use is_32bit_task() which already handles CONFIG_COMPAT.


Applied to powerpc/next.

[1/1] powerpc/audit: Avoid unneccessary #ifdef in syscall_get_arguments()
      https://git.kernel.org/powerpc/c/898a1ef06ad4a2a8e3c9490ce62624fcd1a7b1f8

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help