}
#define __kuap_get_and_assert_locked __kuap_get_and_assert_locked
-static __always_inline void allow_user_access(void __user *to, const void __user *from,
- u32 size, unsigned long dir)
+static __always_inline void allow_user_access(void __user *to, unsigned long dir)
{
BUILD_BUG_ON(!__builtin_constant_p(dir));
return (regs->amr & AMR_KUAP_BLOCK_READ) == AMR_KUAP_BLOCK_READ;
}
-static __always_inline void allow_user_access(void __user *to, const void __user *from,
- unsigned long size, unsigned long dir)
+static __always_inline void allow_user_access(void __user *to, unsigned long dir)
{
unsigned long thread_amr = 0;
static __always_inline void set_kuap(unsigned long value) { }
-static __always_inline void allow_user_access(void __user *to, const void __user *from,
- unsigned long size, unsigned long dir)
+static __always_inline void allow_user_access(void __user *to, unsigned long dir)
{ }
#endif /* !CONFIG_PPC_KUAP */
* platforms.
*/
#ifndef CONFIG_PPC_BOOK3S_64
-static __always_inline void allow_user_access(void __user *to, const void __user *from,
- unsigned long size, unsigned long dir) { }
+static __always_inline void allow_user_access(void __user *to, unsigned long dir) { }
static __always_inline void prevent_user_access(unsigned long dir) { }
static __always_inline unsigned long prevent_user_access_return(void) { return 0UL; }
static __always_inline void restore_user_access(unsigned long flags) { }
static __always_inline void allow_read_from_user(const void __user *from, unsigned long size)
{
- allow_user_access(NULL, from, size, KUAP_READ);
+ allow_user_access(NULL, KUAP_READ);
}
static __always_inline void allow_write_to_user(void __user *to, unsigned long size)
{
- allow_user_access(to, NULL, size, KUAP_WRITE);
+ allow_user_access(to, KUAP_WRITE);
}
static __always_inline void allow_read_write_user(void __user *to, const void __user *from,
unsigned long size)
{
- allow_user_access(to, from, size, KUAP_READ_WRITE);
+ allow_user_access(to, KUAP_READ_WRITE);
}
static __always_inline void prevent_read_from_user(const void __user *from, unsigned long size)
"i"(SPRN_MD_AP), "r"(MD_APG_KUAP), "i"(MMU_FTR_KUAP) : "memory");
}
-static __always_inline void allow_user_access(void __user *to, const void __user *from,
- unsigned long size, unsigned long dir)
+static __always_inline void allow_user_access(void __user *to, unsigned long dir)
{
uaccess_begin_8xx(MD_APG_INIT);
}
"i"(SPRN_PID), "r"(0), "i"(MMU_FTR_KUAP) : "memory");
}
-static __always_inline void allow_user_access(void __user *to, const void __user *from,
- unsigned long size, unsigned long dir)
+static __always_inline void allow_user_access(void __user *to, unsigned long dir)
{
uaccess_begin_booke(current->thread.pid);
}