Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.19 commit in: /
Date: Fri, 16 Aug 2019 12:26:54
Message-Id: 1565958369.80f421e5d9b1bc12165608319f3b2dd4e977a3a0.mpagano@gentoo
1 commit: 80f421e5d9b1bc12165608319f3b2dd4e977a3a0
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 16 12:26:09 2019 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 16 12:26:09 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=80f421e5
7
8 Removed redundant patch (vmalloc)
9
10 1800_vmalloc-sync-unmappings-fix.patch
11 mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()
12
13 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
14
15 0000_README | 4 ---
16 1800_vmalloc-sync-unmappings-fix.patch | 58 ----------------------------------
17 2 files changed, 62 deletions(-)
18
19 diff --git a/0000_README b/0000_README
20 index 142096b..3ef7886 100644
21 --- a/0000_README
22 +++ b/0000_README
23 @@ -319,10 +319,6 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch
24 From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/
25 Desc: Enable link security restrictions by default.
26
27 -Patch: 1800_vmalloc-sync-unmappings-fix.patch
28 -From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=3f8fd02b1bf1d7ba964485a56f2f4b53ae88c167
29 -Desc: mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()
30 -
31 Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
32 From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@××××××××.org/raw
33 Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758
34
35 diff --git a/1800_vmalloc-sync-unmappings-fix.patch b/1800_vmalloc-sync-unmappings-fix.patch
36 deleted file mode 100644
37 index 7e56e51..0000000
38 --- a/1800_vmalloc-sync-unmappings-fix.patch
39 +++ /dev/null
40 @@ -1,58 +0,0 @@
41 -From 3f8fd02b1bf1d7ba964485a56f2f4b53ae88c167 Mon Sep 17 00:00:00 2001
42 -From: Joerg Roedel <jroedel@××××.de>
43 -Date: Fri, 19 Jul 2019 20:46:52 +0200
44 -Subject: mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()
45 -
46 -On x86-32 with PTI enabled, parts of the kernel page-tables are not shared
47 -between processes. This can cause mappings in the vmalloc/ioremap area to
48 -persist in some page-tables after the region is unmapped and released.
49 -
50 -When the region is re-used the processes with the old mappings do not fault
51 -in the new mappings but still access the old ones.
52 -
53 -This causes undefined behavior, in reality often data corruption, kernel
54 -oopses and panics and even spontaneous reboots.
55 -
56 -Fix this problem by activly syncing unmaps in the vmalloc/ioremap area to
57 -all page-tables in the system before the regions can be re-used.
58 -
59 -References: https://bugzilla.suse.com/show_bug.cgi?id=1118689
60 -Fixes: 5d72b4fba40ef ('x86, mm: support huge I/O mapping capability I/F')
61 -Signed-off-by: Joerg Roedel <jroedel@××××.de>
62 -Signed-off-by: Thomas Gleixner <tglx@××××××××××.de>
63 -Reviewed-by: Dave Hansen <dave.hansen@×××××××××××.com>
64 -Link: https://lkml.kernel.org/r/20190719184652.11391-4-joro@××××××.org
65 ----
66 - mm/vmalloc.c | 9 +++++++++
67 - 1 file changed, 9 insertions(+)
68 -
69 -diff --git a/mm/vmalloc.c b/mm/vmalloc.c
70 -index 4fa8d84599b0..e0fc963acc41 100644
71 ---- a/mm/vmalloc.c
72 -+++ b/mm/vmalloc.c
73 -@@ -1258,6 +1258,12 @@ static bool __purge_vmap_area_lazy(unsigned long start, unsigned long end)
74 - if (unlikely(valist == NULL))
75 - return false;
76 -
77 -+ /*
78 -+ * First make sure the mappings are removed from all page-tables
79 -+ * before they are freed.
80 -+ */
81 -+ vmalloc_sync_all();
82 -+
83 - /*
84 - * TODO: to calculate a flush range without looping.
85 - * The list can be up to lazy_max_pages() elements.
86 -@@ -3038,6 +3044,9 @@ EXPORT_SYMBOL(remap_vmalloc_range);
87 - /*
88 - * Implement a stub for vmalloc_sync_all() if the architecture chose not to
89 - * have one.
90 -+ *
91 -+ * The purpose of this function is to make sure the vmalloc area
92 -+ * mappings are identical in all page-tables in the system.
93 - */
94 - void __weak vmalloc_sync_all(void)
95 - {
96 ---
97 -cgit 1.2-0.3.lf.el7
98 -