]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.18.3/xtensa-fix-kmap_prot-definition.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 3.18.3 / xtensa-fix-kmap_prot-definition.patch
1 From ff009ab6d4d4581b62fa055ab6233133aca25ab8 Mon Sep 17 00:00:00 2001
2 From: Max Filippov <jcmvbkbc@gmail.com>
3 Date: Tue, 9 Dec 2014 03:04:24 +0300
4 Subject: xtensa: fix kmap_prot definition
5
6 From: Max Filippov <jcmvbkbc@gmail.com>
7
8 commit ff009ab6d4d4581b62fa055ab6233133aca25ab8 upstream.
9
10 Replace PAGE_KERNEL with PAGE_KERNEL_EXEC to allow copy_to_user_page
11 invalidate icache for pages mapped with kmap.
12
13 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
14 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15
16 ---
17 arch/xtensa/include/asm/highmem.h | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 --- a/arch/xtensa/include/asm/highmem.h
21 +++ b/arch/xtensa/include/asm/highmem.h
22 @@ -25,7 +25,7 @@
23 #define PKMAP_NR(virt) (((virt) - PKMAP_BASE) >> PAGE_SHIFT)
24 #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
25
26 -#define kmap_prot PAGE_KERNEL
27 +#define kmap_prot PAGE_KERNEL_EXEC
28
29 #if DCACHE_WAY_SIZE > PAGE_SIZE
30 #define get_pkmap_color get_pkmap_color