summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/mips_ksyms.c
diff options
context:
space:
mode:
authorJames Hogan2015-08-05 17:41:39 +0200
committerRalf Baechle2015-12-22 11:58:43 +0100
commitd6a428fb583738ad685c91a684748cdee7b2a05f (patch)
treea0c987da5c8d66400b4cb40628921a775bc99ae8 /arch/mips/kernel/mips_ksyms.c
parentMIPS: uaccess: Take EVA into account in __copy_from_user() (diff)
downloadkernel-qcow2-linux-d6a428fb583738ad685c91a684748cdee7b2a05f.tar.gz
kernel-qcow2-linux-d6a428fb583738ad685c91a684748cdee7b2a05f.tar.xz
kernel-qcow2-linux-d6a428fb583738ad685c91a684748cdee7b2a05f.zip
MIPS: uaccess: Take EVA into account in [__]clear_user
__clear_user() (and clear_user() which uses it), always access the user mode address space, which results in EVA store instructions when EVA is enabled even if the current user address limit is KERNEL_DS. Fix this by adding a new symbol __bzero_kernel for the normal kernel address space bzero in EVA mode, and call that from __clear_user() if eva_kernel_access(). Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10844/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/mips_ksyms.c')
-rw-r--r--arch/mips/kernel/mips_ksyms.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c
index 291af0b5c482..e2b6ab74643d 100644
--- a/arch/mips/kernel/mips_ksyms.c
+++ b/arch/mips/kernel/mips_ksyms.c
@@ -17,6 +17,7 @@
#include <asm/fpu.h>
#include <asm/msa.h>
+extern void *__bzero_kernel(void *__s, size_t __count);
extern void *__bzero(void *__s, size_t __count);
extern long __strncpy_from_kernel_nocheck_asm(char *__to,
const char *__from, long __len);
@@ -64,6 +65,7 @@ EXPORT_SYMBOL(__copy_from_user_eva);
EXPORT_SYMBOL(__copy_in_user_eva);
EXPORT_SYMBOL(__copy_to_user_eva);
EXPORT_SYMBOL(__copy_user_inatomic_eva);
+EXPORT_SYMBOL(__bzero_kernel);
#endif
EXPORT_SYMBOL(__bzero);
EXPORT_SYMBOL(__strncpy_from_kernel_nocheck_asm);