Gentoo Archives: gentoo-commits

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