return kuap;
}
-static inline void __kuap_assert_locked(void)
-{
- __kuap_get_and_assert_locked();
-}
-
static __always_inline void __allow_user_access(void __user *to, const void __user *from,
u32 size, unsigned long dir)
{
return amr;
}
-static inline void __kuap_assert_locked(void)
-{
- if (IS_ENABLED(CONFIG_PPC_KUAP_DEBUG))
- WARN_ON_ONCE(mfspr(SPRN_AMR) != AMR_KUAP_BLOCKED);
-}
-
/*
* We support individually allowing read or write, but we don't support nesting
* because that would require an expensive read/modify write of the AMR.
if (kuap_is_disabled())
return;
- __kuap_assert_locked();
+ if (IS_ENABLED(CONFIG_PPC_KUAP_DEBUG))
+ __kuap_get_and_assert_locked();
}
#ifdef CONFIG_PPC32
return kuap;
}
-static inline void __kuap_assert_locked(void)
-{
- if (IS_ENABLED(CONFIG_PPC_KUAP_DEBUG))
- __kuap_get_and_assert_locked();
-}
-
static inline void __allow_user_access(void __user *to, const void __user *from,
unsigned long size, unsigned long dir)
{