Skip to content

Commit 7401670

Browse files
chleroympe
authored andcommitted
powerpc/32s: Fix another build failure with CONFIG_PPC_KUAP_DEBUG
'thread' doesn't exist in kuap_check() macro. Use 'current' instead. Fixes: a68c31f ("powerpc/32s: Implement Kernel Userspace Access Protection") Cc: [email protected] Reported-by: kbuild test robot <[email protected]> Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/b459e1600b969047a74e34251a84a3d6fdf1f312.1590858925.git.christophe.leroy@csgroup.eu
1 parent bd55e79 commit 7401670

File tree

1 file changed

+2
-1
lines changed
  • arch/powerpc/include/asm/book3s/32

1 file changed

+2
-1
lines changed

arch/powerpc/include/asm/book3s/32/kup.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#ifndef _ASM_POWERPC_BOOK3S_32_KUP_H
33
#define _ASM_POWERPC_BOOK3S_32_KUP_H
44

5+
#include <asm/bug.h>
56
#include <asm/book3s/32/mmu-hash.h>
67

78
#ifdef __ASSEMBLY__
@@ -75,7 +76,7 @@
7576

7677
.macro kuap_check current, gpr
7778
#ifdef CONFIG_PPC_KUAP_DEBUG
78-
lwz \gpr, KUAP(thread)
79+
lwz \gpr, THREAD + KUAP(\current)
7980
999: twnei \gpr, 0
8081
EMIT_BUG_ENTRY 999b, __FILE__, __LINE__, (BUGFLAG_WARNING | BUGFLAG_ONCE)
8182
#endif

0 commit comments

Comments
 (0)