kup.h (c441bfb5f2866de71e092c1b9d866a65978dfe1a) | kup.h (cb2f1fb205cc20695fcaef84baf80d9d3e54c88b) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_POWERPC_BOOK3S_64_KUP_H 3#define _ASM_POWERPC_BOOK3S_64_KUP_H 4 5#include <linux/const.h> 6#include <asm/reg.h> 7 8#define AMR_KUAP_BLOCK_READ UL(0x5455555555555555) --- 384 unchanged lines hidden (view full) --- 393static inline void set_kuap(unsigned long value) { } 394 395static __always_inline void allow_user_access(void __user *to, const void __user *from, 396 unsigned long size, unsigned long dir) 397{ } 398 399#endif /* !CONFIG_PPC_KUAP */ 400 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_POWERPC_BOOK3S_64_KUP_H 3#define _ASM_POWERPC_BOOK3S_64_KUP_H 4 5#include <linux/const.h> 6#include <asm/reg.h> 7 8#define AMR_KUAP_BLOCK_READ UL(0x5455555555555555) --- 384 unchanged lines hidden (view full) --- 393static inline void set_kuap(unsigned long value) { } 394 395static __always_inline void allow_user_access(void __user *to, const void __user *from, 396 unsigned long size, unsigned long dir) 397{ } 398 399#endif /* !CONFIG_PPC_KUAP */ 400 |
401static inline void prevent_user_access(void __user *to, const void __user *from, 402 unsigned long size, unsigned long dir) | 401static inline void prevent_user_access(unsigned long dir) |
403{ 404 set_kuap(AMR_KUAP_BLOCKED); 405 if (static_branch_unlikely(&uaccess_flush_key)) 406 do_uaccess_flush(); 407} 408 409static inline unsigned long prevent_user_access_return(void) 410{ --- 18 unchanged lines hidden --- | 402{ 403 set_kuap(AMR_KUAP_BLOCKED); 404 if (static_branch_unlikely(&uaccess_flush_key)) 405 do_uaccess_flush(); 406} 407 408static inline unsigned long prevent_user_access_return(void) 409{ --- 18 unchanged lines hidden --- |