Changes in 4.9.245 powerpc/64s: Define MASKABLE_RELON_EXCEPTION_PSERIES_OOL powerpc/64s: move some exception handlers out of line powerpc/64s: flush L1D on kernel entry powerpc: Add a framework for user access tracking powerpc: Implement user_access_begin and friends powerpc: Fix __clear_user() with KUAP enabled powerpc/uaccess: Evaluate macro arguments once, before user access is allowed powerpc/64s: flush L1D after user accesses i2c: imx: use clk notifier for rate changes i2c: imx: Fix external abort on interrupt in exit paths i2c: mux: pca954x: Add missing pca9546 definition to chip_desc powerpc/8xx: Always fault when _PAGE_ACCESSED is not set Input: sunkbd - avoid use-after-free in teardown paths mac80211: always wind down STA state KVM: x86: clflushopt should be treated as a no-op by emulation ACPI: GED: fix -Wformat Linux 4.9.245 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I688b066e99eeb16270414e0c4cb4dc3bb244486c
41 lines
1.0 KiB
C
41 lines
1.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_POWERPC_KUP_H_
|
|
#define _ASM_POWERPC_KUP_H_
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <asm/pgtable.h>
|
|
|
|
#ifdef CONFIG_PPC_BOOK3S_64
|
|
#include <asm/book3s/64/kup-radix.h>
|
|
#else
|
|
static inline void allow_user_access(void __user *to, const void __user *from,
|
|
unsigned long size) { }
|
|
static inline void prevent_user_access(void __user *to, const void __user *from,
|
|
unsigned long size) { }
|
|
#endif /* CONFIG_PPC_BOOK3S_64 */
|
|
|
|
static inline void allow_read_from_user(const void __user *from, unsigned long size)
|
|
{
|
|
allow_user_access(NULL, from, size);
|
|
}
|
|
|
|
static inline void allow_write_to_user(void __user *to, unsigned long size)
|
|
{
|
|
allow_user_access(to, NULL, size);
|
|
}
|
|
|
|
static inline void prevent_read_from_user(const void __user *from, unsigned long size)
|
|
{
|
|
prevent_user_access(NULL, from, size);
|
|
}
|
|
|
|
static inline void prevent_write_to_user(void __user *to, unsigned long size)
|
|
{
|
|
prevent_user_access(to, NULL, size);
|
|
}
|
|
|
|
#endif /* !__ASSEMBLY__ */
|
|
|
|
#endif /* _ASM_POWERPC_KUP_H_ */
|