mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
powerpc/kuap: Fold kuep_is_disabled() into its only user
kuep_is_disabled() was introduced by commit91bb30822a
("powerpc/32s: Refactor update of user segment registers") but then all users but one were removed by commit526d4a4c77
("powerpc/32s: Do kuep_lock() and kuep_unlock() in assembly"). Fold kuep_is_disabled() into init_new_context() which is its only user. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/b2247147c0a8c830ac82966451647850df4a64da.1689091022.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
1bec4adcd5
commit
38bb171b95
@ -13,11 +13,6 @@
|
||||
|
||||
extern struct static_key_false disable_kuap_key;
|
||||
|
||||
static __always_inline bool kuep_is_disabled(void)
|
||||
{
|
||||
return !IS_ENABLED(CONFIG_PPC_KUEP);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_KUAP
|
||||
|
||||
#include <linux/sched.h>
|
||||
|
@ -71,7 +71,7 @@ int init_new_context(struct task_struct *t, struct mm_struct *mm)
|
||||
mm->context.id = __init_new_context();
|
||||
mm->context.sr0 = CTX_TO_VSID(mm->context.id, 0);
|
||||
|
||||
if (!kuep_is_disabled())
|
||||
if (IS_ENABLED(CONFIG_PPC_KUEP))
|
||||
mm->context.sr0 |= SR_NX;
|
||||
if (!kuap_is_disabled())
|
||||
mm->context.sr0 |= SR_KS;
|
||||
|
Loading…
Reference in New Issue
Block a user