alpha: fix syscall entry in !AUDUT_SYSCALL case
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Sep 2021 22:18:48 +0000 (18:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jan 2023 11:07:13 +0000 (12:07 +0100)
[ Upstream commit f7b2431a6d22f7a91c567708e071dfcd6d66db14 ]

We only want to take the slow path if SYSCALL_TRACE or SYSCALL_AUDIT is
set; on !AUDIT_SYSCALL configs the current tree hits it whenever _any_
thread flag (including NEED_RESCHED, NOTIFY_SIGNAL, etc.) happens to
be set.

Fixes: a9302e843944 "alpha: Enable system-call auditing support"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/alpha/kernel/entry.S

index 98703d99b565af7a10cc44322d3ae1ec1230cf64..d752ccc53b244bef2b0180396607c77c66aceb8a 100644 (file)
@@ -468,8 +468,10 @@ entSys:
 #ifdef CONFIG_AUDITSYSCALL
        lda     $6, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
        and     $3, $6, $3
-#endif
        bne     $3, strace
+#else
+       blbs    $3, strace              /* check for SYSCALL_TRACE in disguise */
+#endif
        beq     $4, 1f
        ldq     $27, 0($5)
 1:     jsr     $26, ($27), alpha_ni_syscall