kup.h (d008f8f8a0c3efe4fe1008a797f9497ea5965e27) | kup.h (cb2f1fb205cc20695fcaef84baf80d9d3e54c88b) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_POWERPC_BOOK3S_32_KUP_H 3#define _ASM_POWERPC_BOOK3S_32_KUP_H 4 5#include <asm/bug.h> 6#include <asm/book3s/32/mmu-hash.h> 7 8#ifndef __ASSEMBLY__ --- 139 unchanged lines hidden (view full) --- 148 149 if (!(dir & KUAP_WRITE)) 150 return; 151 152 current->thread.kuap = (__force u32)to; 153 kuap_unlock_one((__force u32)to); 154} 155 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_POWERPC_BOOK3S_32_KUP_H 3#define _ASM_POWERPC_BOOK3S_32_KUP_H 4 5#include <asm/bug.h> 6#include <asm/book3s/32/mmu-hash.h> 7 8#ifndef __ASSEMBLY__ --- 139 unchanged lines hidden (view full) --- 148 149 if (!(dir & KUAP_WRITE)) 150 return; 151 152 current->thread.kuap = (__force u32)to; 153 kuap_unlock_one((__force u32)to); 154} 155 |
156static __always_inline void prevent_user_access(void __user *to, const void __user *from, 157 u32 size, unsigned long dir) | 156static __always_inline void prevent_user_access(unsigned long dir) |
158{ 159 u32 kuap = current->thread.kuap; 160 161 if (kuap_is_disabled()) 162 return; 163 164 BUILD_BUG_ON(!__builtin_constant_p(dir)); 165 --- 58 unchanged lines hidden --- | 157{ 158 u32 kuap = current->thread.kuap; 159 160 if (kuap_is_disabled()) 161 return; 162 163 BUILD_BUG_ON(!__builtin_constant_p(dir)); 164 --- 58 unchanged lines hidden --- |