Re: [PATCH 4.9] x86/pti/efi: broken conversion from efi to kernel page table

2018-01-12 Thread Pavel Tatashin
Hi Ingo, https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/log/?h=linux-4.9.y&ofs=50 4.9 PTI backport is in 4.9.75. Thank you, Pavel On Fri, Jan 12, 2018 at 8:58 AM, Ingo Molnar wrote: > > * Pavel Tatashin wrote: > >> The page table order must b

[PATCH v1] mm: initialize pages on demand during boot

2018-01-12 Thread Pavel Tatashin
path (deferred_init_memmap). The on-demand code is permanently disabled using static branching once deferred pages are initialized. After the static branch is changed to false, the overhead is up-to two branch-always instructions if the zone watermark check fails or if rmqueue fails. Signed-off-by:

[PATCH 4.4 v2] x86/pti/efi: broken conversion from efi to kernel page table

2018-01-12 Thread Pavel Tatashin
fix alignment, here the trampoline binary is later copied into dynamically allocated memory in reserve_real_mode(), so we need to fix that place as well. Fixes: 8a43ddfb93a0 ("KAISER: Kernel Address Isolation") Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare --- arch/x86/in

Re: [4.4] broken conversion from efi to kernel page table

2018-01-13 Thread Pavel Tatashin
5PM -0500, Pavel Tatashin wrote: >> This fixes boot panics, hangs which I reported in this thread: >> >> http://lkml.iu.edu/hypermail/linux/kernel/1801.1/00951.html >> >> I have not yet verified if similar issue is applicable to newer >> kernels. >> >>

Re: [PATCH 4.9] x86/pti/efi: broken conversion from efi to kernel page table

2018-01-13 Thread Pavel Tatashin
Hi Greg, Yeah, the one in pgtable.c needs to be removed, I wonder how it compiled... I will submit a new patch for 4.9 sometime later. Thank you, Pavel On Sat, Jan 13, 2018 at 12:12 PM, Greg KH wrote: > On Thu, Jan 11, 2018 at 04:58:20PM -0500, Pavel Tatashin wrote: >> The page ta

Re: Memory hotplug not increasing the total RAM

2018-01-30 Thread Pavel Tatashin
Hi Michal, Thank you for taking care of the problem. The patch may introduce a small performance regression during normal boot, as we add a branch into a hot initialization path. But, it fixes a current problem, so: Reviewed-by: Pavel Tatashin However, I think we should change the hotplug code

Re: Memory hotplug not increasing the total RAM

2018-01-30 Thread Pavel Tatashin
> You might be very well correct but the hotplug code is quite subtle and > we do depend on PageReserved at some unexpected places so it is not that > easy I am afraid. My TODO list in the hotplug is quite long. If you feel > like you want to work on that I would be more than happy. You are correc

[PATCH v1] mm: optimize memory hotplug

2018-01-30 Thread Pavel Tatashin
thus enables future improvements, such as multi-threading the initialization of struct pages in order to improve the hotplug performance even further on larger machines. Signed-off-by: Pavel Tatashin --- drivers/base/memory.c | 36 include/linux

Re: [PATCH] mm, meminit: Serially initialise deferred memory if trace_buf_size is specified

2018-01-31 Thread Pavel Tatashin
;>>-Original Message- >>>From: Mel Gorman [mailto:mgor...@techsingularity.net] >>>Sent: Wednesday, December 06, 2017 5:50 AM >>>To: Pavel Tatashin >>>Cc: Michal Hocko ; YASUAKI ISHIMATSU >>>; Andrew Morton ; >>>Linux Memory Management

Re: [PATCH v1] mm: optimize memory hotplug

2018-01-31 Thread Pavel Tatashin
Hi Michal, > So how do we check that there is no page_to_nid() user before we online > the page? The poisoning helps to catch these now, and will in the future. Because we are setting "struct page" to all 1s, we get nid that is bigger than supported, and thus panic due to NULL pointer dereference

[PATCH v2 0/2] optimize memory hotplug

2018-01-31 Thread Pavel Tatashin
Changelog: v1 - v2 Added struct page poisoning checking in order to verify that struct pages are never accessed until initialized during memory hotplug Pavel Tatashin (2): mm: uninitialized struct page poisoning sanity checking mm, memory_hotplug: optimize

[PATCH v2 2/2] mm, memory_hotplug: optimize memory hotplug

2018-01-31 Thread Pavel Tatashin
thus enables future improvements, such as multi-threading the initialization of struct pages in order to improve the hotplug performance even further on larger machines. Signed-off-by: Pavel Tatashin --- drivers/base/memory.c | 38 +- drivers/base

[PATCH v2 1/2] mm: uninitialized struct page poisoning sanity checking

2018-01-31 Thread Pavel Tatashin
pattern is all ones. Since, node id is also stored in struct page, and may be accessed quiet early we add the enforcement into page_to_nid() function as well. Signed-off-by: Pavel Tatashin --- include/linux/mm.h | 4 +++- include/linux/page-flags.h | 22 +- mm/memblock.c

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-04 Thread Pavel Tatashin
I am getting the following panic when trying to boot 4.4.110rc1 on Intel(R) Xeon(R) CPU E5-2630: [5.923489] BUG: unable to handle kernel NULL pointer dereference at 000d [5.932259] IP: [] dyntick_save_progress_counter+0x12/0x50 [5.940142] PGD 0 [5.942400] Oops: 0002 [#1

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-04 Thread Pavel Tatashin
> Hm, so I'm guessing 4.15-rc6 also works? I have not test 4.15 > Odd that 4.9.75-rc1 fails. 4.9.75-rc1 does NOT fail, it boots fine. config for 4.4.110rc1 panic is attached. Thank you, Pasha config_linux-4.4.110rc1.gz Description: GNU Zip compressed data

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-04 Thread Pavel Tatashin
I tried cherry picking 435086b36f62 x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy on top of 4.4.110-rc1, (needed to resolve a small 5level table to 4level page table conflict). Unfortunately, this does not solve the panic/hanging problem I reported. For some reason I do no

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-04 Thread Pavel Tatashin
:37 PM, Hugh Dickins wrote: > On Thu, Jan 4, 2018 at 1:23 PM, Pavel Tatashin > wrote: >> I tried cherry picking >> 435086b36f62 x86/vsyscall/64: Explicitly set _PAGE_USER in the >> pagetable hierarchy >> >> on top of 4.4.110-rc1, (needed to resolve a small

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Pavel Tatashin
Hi Greg, Just tested on my machine: [0.00] Initializing cgroup subsys cpuset [0.00] Initializing cgroup subsys cpu [0.00] Initializing cgroup subsys cpuacct [0.00] Linux version 4.4.110_pt_linux-v4.4.110 (ptatashi@ca-ostest441) (gcc version 4.8.5 20150623 (R

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Pavel Tatashin
> > Crap. > > And 4.9.75 works for you just fine? Same with 4.15-rc6? 4.15-rc6 -> Rebooted twice no issues. 4.9.75 -> Rebooted twice no issues 4.4.110 -> hangs/reboots on every single reboot. > > I'm wondering if this is some crazy gcc thing, given the ancient age of > what you are using (gcc 4

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Pavel Tatashin
Hi Andy, This is bare metal, not VM, read my other email in this thread about the machine on which I am testing. Sometime hang happens a little later: [5.088948] microcode: CPU36 sig=0x406f1, pf=0x1, revision=0xb1d [5.096076] microcode: CPU37 sig=0x406f1, pf=0x1, revision=0xb1d [

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Pavel Tatashin
Boots successfully with "noefi" kernel parameter :) On Fri, Jan 5, 2018 at 12:43 PM, Andy Lutomirski wrote: > >> On Jan 5, 2018, at 9:14 AM, Pavel Tatashin wrote: >> >> Hi Andy, >> >> This is bare metal, not VM, read my other email in this thread

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Pavel Tatashin
> Pavel, can you send your /proc/cpuinfo on a noefi boot? (Just the > first CPU worth is fine.) With noefi option: [root@ca-ostest441 ~]# more /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 79 model name : Intel(R) Xeon(R) CPU E5-2630

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Pavel Tatashin
: 01aa2000 CR4: 003606 On Fri, Jan 5, 2018 at 1:21 PM, Pavel Tatashin wrote: >> Pavel, can you send your /proc/cpuinfo on a noefi boot? (Just the >> first CPU worth is fine.) > > With noefi option: > > [root@ca-ostest441 ~]# more /proc/cpuinfo > proc

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Pavel Tatashin
Actually it helps, if before 4.4.110 never booted on my machine, not i was able to boot on a second try. On Fri, Jan 5, 2018 at 2:14 PM, Pavel Tatashin wrote: > I hoped, this patch would fix the efi issue: > https://lkml.org/lkml/2018/1/5/534 > > But, unfortunatly it does not. I g

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Pavel Tatashin
. Pasha On 01/05/2018 03:45 PM, Greg Kroah-Hartman wrote: On Fri, Jan 05, 2018 at 02:18:32PM -0500, Pavel Tatashin wrote: Actually it helps, if before 4.4.110 never booted on my machine, not i was able to boot on a second try. Wait, what? This has never booted on 4.4.x before? Did 4.4.108 work

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-05 Thread Pavel Tatashin
: On Fri, Jan 5, 2018 at 1:03 PM, Pavel Tatashin wrote: The hardware works :) I meant that before the patch linked in https://lkml.org/lkml/2018/1/5/534, I was never able to boot 4.4.110. But with that patch applied, I was able to boot it at least once, but it could be accidental. The hang/panic

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-07 Thread Pavel Tatashin
with 4.1 + kaiser patches taken from 4.4.110. Thank you, Pavel On Sun, Jan 7, 2018 at 5:45 AM, Greg Kroah-Hartman wrote: > On Fri, Jan 05, 2018 at 04:03:54PM -0500, Pavel Tatashin wrote: >> The hardware works :) I meant that before the patch linked in >> https://lkml.org/lkml/2018

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-07 Thread Pavel Tatashin
Hi Greg, I reverted suse12 back to: 13dae54cb229d078635f159dd8afe16ae683980b x86/kaiser: Move feature detection up (bsc#1068032). And, still do not see the problem. So, whatever fixes the issue comes before kaiser. Pavel On Sun, Jan 7, 2018 at 9:17 AM, Pavel Tatashin wrote: > Hi Greg, &g

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-08 Thread Pavel Tatashin
Hi Greg, On Mon, Jan 8, 2018 at 2:46 AM, Greg Kroah-Hartman wrote: > On Sun, Jan 07, 2018 at 10:06:59AM -0500, Pavel Tatashin wrote: >> Hi Greg, >> >> I reverted suse12 back to: >> 13dae54cb229d078635f159dd8afe16ae683980b >> x86/kaiser: Move feature detection u

Re: [PATCH 4.4 00/37] 4.4.110-stable review

2018-01-08 Thread Pavel Tatashin
01 75 d4 <0f> 0b 0f 1f 40 00 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 [6.812429] RIP [] kfree+0x14a/0x150 [6.818273] RSP [6.822177] ---[ end trace 4ce44d21c6d68eed ]--- On Mon, Jan 8, 2018 at 3:38 PM, Pavel Tatashin wrote: > Hi Greg, > > > > On Mon, Jan 8,

[PATCH 4.9 v2] x86/pti/efi: broken conversion from efi to kernel page table

2018-01-15 Thread Pavel Tatashin
-by: Pavel Tatashin Reviewed-by: Steven Sistare Acked-by: Jiri Kosina --- arch/x86/include/asm/pgalloc.h | 11 +++ arch/x86/mm/pgtable.c | 7 --- arch/x86/platform/efi/efi_64.c | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) Changelog: v1 - v2: Fixed

[v5 2/2] mm: initialize pages on demand during boot

2018-03-09 Thread Pavel Tatashin
atsky noticed that while deferred pages currently make sense only on NUMA machines (we start one thread per latency node), CONFIG_NUMA is not a requirement for CONFIG_DEFERRED_STRUCT_PAGE_INIT, so that is also must be addressed in the patch. Signed-off-by: Pavel Tatashin Reviewed-by: Daniel Jordan Rev

[v5 0/2] initialize pages on demand during boot

2018-03-09 Thread Pavel Tatashin
3. On demand initialization of reserved pages guarantees that we will initialize only as many pages early in boot using only one thread as needed, the rest are going to be efficiently initialized in parallel. [1] https://www.spinics.net/lists/linux-mm/msg139087.html Pavel Tatashin (2): mm:

[v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-09 Thread Pavel Tatashin
interrupts disabled. Signed-off-by: Pavel Tatashin --- include/linux/memory_hotplug.h | 73 +++--- include/linux/mmzone.h | 5 +-- mm/page_alloc.c| 22 ++--- 3 files changed, 62 insertions(+), 38 deletions(-) diff --git a/include

[PATCH 4.1 00/65] page table isolation for stable 4.1

2018-03-05 Thread Pavel Tatashin
old_memmap Kees Cook (1): KPTI: Rename to PAGE_TABLE_ISOLATION Konrad Rzeszutek Wilk (1): kpti: Disable when running under Xen PV Pavel Tatashin (3): x86/mm, sched/core: Uninline switch_mm() pti: Rename X86_FEATURE_KAISER to X86_FEATURE_PTI x86/pti/efi: broken conversion from efi to

[PATCH 4.1 12/65] x86/irq: Do not substract irq_tlb_count from irq_call_count

2018-03-05 Thread Pavel Tatashin
Ying Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tomoki Sekiyama Link: http://lkml.kernel.org/r/20160811074430.ga18...@aaronlu.sh.intel.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 3b9d9ec0d8261bb9b12f858e66f0c8

[PATCH 4.1 40/65] kaiser: delete KAISER_REAL_SWITCH option

2018-03-05 Thread Pavel Tatashin
help text - and a "depends on KAISER", so that all those without KAISER are not asked the question.) Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit b9d2ccc54e17b5aa50dd0c036d3f4fb4e5248d54) Signed-off-by: Pavel Tatashin

[PATCH 4.1 64/65] pti: Rename X86_FEATURE_KAISER to X86_FEATURE_PTI

2018-03-05 Thread Pavel Tatashin
cat /proc/cpuinfo still shows kaiser feature, and want only pti to be visible to users. Therefore, rename this macro to get correct user visible output. Signed-off-by: Pavel Tatashin Signed-off-by: Brian Maly --- arch/x86/include/asm/cpufeature.h | 2 +- arch/x86/include/asm/kaiser.h | 6

[PATCH 4.1 65/65] x86/pti/efi: broken conversion from efi to kernel page table

2018-03-05 Thread Pavel Tatashin
fix alignment, here the trampoline binary is later copied into dynamically allocated memory in reserve_real_mode(), so we need to fix that place as well. Fixes: 8a43ddfb93a0 ("KAISER: Kernel Address Isolation") Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare S

[PATCH 4.1 59/65] x86/kaiser: Move feature detection up

2018-03-05 Thread Pavel Tatashin
) RIP:e033:[] (XEN) RFLAGS: 0286 EM: 1 CONTEXT: pv guest (d0v0) Signed-off-by: Borislav Petkov Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 7f79599df9c4a36130f7a4f6778b334a97632477) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/kernel/setup.c

[PATCH 4.1 60/65] KPTI: Rename to PAGE_TABLE_ISOLATION

2018-03-05 Thread Pavel Tatashin
From: Kees Cook This renames CONFIG_KAISER to CONFIG_PAGE_TABLE_ISOLATION. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 3e1457d6bf26d9ec300781f84cd0057e44deb45d) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/entry/entry_64.S (not in this

[PATCH 4.1 58/65] x86/kaiser: Reenable PARAVIRT

2018-03-05 Thread Pavel Tatashin
From: Borislav Petkov Now that the required bits have been addressed, reenable PARAVIRT. Signed-off-by: Borislav Petkov Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 750fb627d764eb66430c36961b94ab0002694c02) Signed-off-by: Pavel Tatashin --- security/Kconfig | 2 +- 1 file

[PATCH 4.1 63/65] kpti: Disable when running under Xen PV

2018-03-05 Thread Pavel Tatashin
From: Konrad Rzeszutek Wilk Very very partial backport from aa8c6248f8c75 where there is a check to see if this is an Xen PV guest - and if so disable it. The reason is that the PV ABI would require a major overhaul to be Meltdown resistent. Instead there are mitigations (PV in HVM) which are f

[PATCH 4.1 54/65] kaiser: drop is_atomic arg to kaiser_pagetable_walk()

2018-03-05 Thread Pavel Tatashin
ely source of trouble: so just delete the walk's is_atomic arg and might_sleep(). Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 28c6de5441740f868a5b371804a0e8dde03757fb) Signed-off-by: Pavel Tatashin Conflicts: arch/

[PATCH 4.1 53/65] kaiser: use ALTERNATIVE instead of x86_cr3_pcid_noflush

2018-03-05 Thread Pavel Tatashin
RNEL_CR3_NO_STACK at entry_SYSCALL_64, and it does a good job. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 2dff99eb0335f9e0817410696a180dba25ca7371) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/entry/entry_64

[PATCH 4.1 61/65] x86/ldt: fix crash in ldt freeing.

2018-03-05 Thread Pavel Tatashin
-off-by: Pavel Tatashin --- arch/x86/kernel/ldt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index 5797d437710d..5de9fbc4ab50 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c @@ -39,7 +39,7 @@ static void

[PATCH 4.1 62/65] PTI: unbreak EFI old_memmap

2018-03-05 Thread Pavel Tatashin
). _PAGE_NX will be automatically reintroduced in efi_call_phys_epilog(), as _set_pgd() will again notice that this is _PAGE_USER, and set _PAGE_NX on it. Signed-off-by: Jiri Kosina Signed-off-by: Pavel Tatashin --- arch/x86/platform/efi/efi_64.c | 6 ++ 1 file changed, 6 insertions(+) d

[PATCH 4.1 57/65] x86/paravirt: Dont patch flush_tlb_single

2018-03-05 Thread Pavel Tatashin
: https://lkml.kernel.org/r/20171204150606.828111...@linutronix.de Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 3e809caffdd7beeac731feb16788873c3bdb811e) Signed-off-by: Pavel Tatashin --- arch/x86/kernel/paravirt_patch_64.c | 2

[PATCH 4.1 55/65] kaiser: asm/tlbflush.h handle noPGE at lower level

2018-03-05 Thread Pavel Tatashin
rom commit 0651b3ad99dd59269e2ec883338ab8fba617e203) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/tlbflush.h | 27 +++ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h index b376095a1fd9..6fdc8c399

[PATCH 4.1 56/65] kaiser: kaiser_flush_tlb_on_return_to_user() check PCID

2018-03-05 Thread Pavel Tatashin
by a BUILD_BUG_ON() in load_new_mm_cr3(), in case something changes. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 8eaca4c7d9f167209a9cc568ff028c0a3b0deb2d) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/tlbflush.

[PATCH 4.1 51/65] x86/kaiser: Rename and simplify X86_FEATURE_KAISER handling

2018-03-05 Thread Pavel Tatashin
From: Borislav Petkov Concentrate it in arch/x86/mm/kaiser.c and use the upstream string "nopti". Signed-off-by: Borislav Petkov Signed-off-by: Greg Kroah-Hartman (cherry picked from commit dea9aa9ffae11c91285335cc3215b4f0e48e8139) Signed-off-by: Pavel Tatashin --- Documentat

[PATCH 4.1 50/65] kaiser: add "nokaiser" boot option, using ALTERNATIVE

2018-03-05 Thread Pavel Tatashin
BSP alone was adding PSE, in probe_page_size_mask(). Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit e345dcc9481543edf4a0a5df4c4c2f9597b0a997) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/entry/entry_64.S (not in this

[PATCH 4.1 52/65] x86/kaiser: Check boottime cmdline params

2018-03-05 Thread Pavel Tatashin
rom commit e405a064bd7d6eca88935342ddb71057a9d6ceab) Signed-off-by: Pavel Tatashin --- Documentation/kernel-parameters.txt | 6 arch/x86/mm/kaiser.c| 59 ++--- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/Documentation/kernel-paramet

[PATCH 4.1 41/65] kaiser: vmstat show NR_KAISERTABLE as nr_overhead

2018-03-05 Thread Pavel Tatashin
may tell a different story: keep an eye on this number, and bring back lighter freeing if it gets out of control (maybe a shrinker). Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 3e3d38fd9832e82a8cb1a5b1154acfa43ac08d15) Signed-of

[PATCH 4.1 49/65] kaiser: add "nokaiser" boot option, using ALTERNATIVE

2018-03-05 Thread Pavel Tatashin
BSP alone was adding PSE, in probe_page_size_mask(). Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit e345dcc9481543edf4a0a5df4c4c2f9597b0a997) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/entry/entry_64.S (not in this

[PATCH 4.1 47/65] kaiser: _pgd_alloc() without __GFP_REPEAT to avoid stalls

2018-03-05 Thread Pavel Tatashin
te to omit it from Kaiser or non-Kaiser pgd. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit d41f46f778951b0ea851ca52b88b2549c6336b47) Signed-off-by: Pavel Tatashin --- arch/x86/mm/pgtable.c | 6 -- 1 file changed, 4 insertions

[PATCH 4.1 34/65] kaiser: ENOMEM if kaiser_pagetable_walk() NULL

2018-03-05 Thread Pavel Tatashin
407c3ff6a24c7cb418b77a124d17e282f9622037) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/mm/kaiser.c --- arch/x86/mm/kaiser.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index df7f6591d5aa..058d0886086b 100644 --- a/arch

[PATCH 4.1 48/65] kaiser: fix unlikely error in alloc_ldt_struct()

2018-03-05 Thread Pavel Tatashin
rry picked from commit 500943e57db8d3e298e98f595f835c5b613e843b) Signed-off-by: Pavel Tatashin --- arch/x86/kernel/ldt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index c388247e0353..5797d437710d 100644 --- a/arch/x86/kernel/ld

[PATCH 4.1 46/65] kaiser: paranoid_entry pass cr3 need to paranoid_exit

2018-03-05 Thread Pavel Tatashin
art of the series, and ought to be moved earlier, if you decided to make a release of Kaiser-without-PCIDs. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit fc8334e6b3e5d28afd4eec8a74493933f73b2784) Signed-off-by: Pavel Tatashin Conflicts

[PATCH 4.1 30/65] kaiser: fix build and FIXME in alloc_ldt_struct()

2018-03-05 Thread Pavel Tatashin
9b94cf97f42ca30fe9b5010900fa6e1d6855a9f6) Signed-off-by: Pavel Tatashin --- arch/x86/kernel/ldt.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index 9c6ebaf0a83b..c388247e0353 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch

[PATCH 4.1 44/65] kaiser: PCID 0 for kernel and 128 for user

2018-03-05 Thread Pavel Tatashin
om commit 3b4ce0e1a17228eec71815d7997e49e403ebf2a7) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/kaiser.h| 19 --- arch/x86/include/asm/pgtable_types.h | 7 --- arch/x86/mm/tlb.c| 3 +++ 3 files changed, 19 insertions(+), 10 deletions(-) dif

[PATCH 4.1 45/65] kaiser: x86_cr3_pcid_noflush and x86_cr3_pcid_user

2018-03-05 Thread Pavel Tatashin
Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 20268a10ffecd9fcc04880b21fc99a9192394599) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/entry/entry_64.S (not in this tree) arch/x86/kernel/entry_64.S (patched

[PATCH 4.1 27/65] kaiser: merged update

2018-03-05 Thread Pavel Tatashin
From: Dave Hansen Merged fixes and cleanups, rebased to 4.4.89 tree (no 5-level paging). Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit bed9bb7f3e6d4045013d2bb9e4004896de57f02b) Signed-off-by: Pavel Tatashin Conflicts

[PATCH 4.1 39/65] kaiser: name that 0x1000 KAISER_SHADOW_PGD_OFFSET

2018-03-05 Thread Pavel Tatashin
From: Hugh Dickins There's a 0x1000 in various places, which looks better with a name. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit aeda21d77e22fb382c51fd3f6bbb18df69bc032f) Signed-off-by: Pavel Tatashin Conf

[PATCH 4.1 37/65] kaiser: kaiser_remove_mapping() move along the pgd

2018-03-05 Thread Pavel Tatashin
icked from commit f127705d26b34c053e59b47aef84b3ea564dd743) Signed-off-by: Pavel Tatashin --- arch/x86/mm/kaiser.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index 190371071a02..8996f3292596 100644 --- a/arch/x86/mm/kai

[PATCH 4.1 42/65] kaiser: enhanced by kernel and user PCIDs

2018-03-05 Thread Pavel Tatashin
eb82151d0b1df53d1ad8d060ecd554ca12eb552a) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/entry/entry_64.S (not in this tree) arch/x86/kernel/entry_64.S (patched instead of that) arch/x86/entry/entry_64_compat.S (not in this tree) arch/x86/ia32/ia32entry.S (patched instead of that) arch

[PATCH 4.1 43/65] kaiser: load_new_mm_cr3() let SWITCH_USER_CR3 flush user

2018-03-05 Thread Pavel Tatashin
not end well... Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 0731188fc74cc2237975a2b5bedd36e2463ef10b) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/include/asm/tlbflush.h --- arch/x86/include/asm/kaiser.h | 18 ++

[PATCH 4.1 38/65] kaiser: cleanups while trying for gold link

2018-03-05 Thread Pavel Tatashin
c52e55a2a82d3a44189810d35717d81cb4cf61d4) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/desc.h | 2 +- arch/x86/include/asm/processor.h | 5 - include/asm-generic/vmlinux.lds.h | 18 -- include/linux/percpu-defs.h | 22 +++--- 4 files changed, 20

[PATCH 4.1 29/65] kaiser: stack map PAGE_SIZE at THREAD_SIZE-PAGE_SIZE

2018-03-05 Thread Pavel Tatashin
ping() and kaiser_remove_mapping(). And use linux/kaiser.h in init/main.c to avoid the #ifdefs there. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 003e476716906afa135faf605ae0a5c3598c0293) Signed-off-by: Pavel Tatashin Conflicts:

[PATCH 4.1 36/65] kaiser: tidied up kaiser_add/remove_mapping slightly

2018-03-05 Thread Pavel Tatashin
vel paging tree. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 0c68228f7b39c96cabd89bee3e1d6bd55926df80) Signed-off-by: Pavel Tatashin --- arch/x86/mm/kaiser.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff -

[PATCH 4.1 28/65] kaiser: do not set _PAGE_NX on pgd_none

2018-03-05 Thread Pavel Tatashin
ative_get_shadow/normal_pgd() while here. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit edde73205b3fdde8c8a3adfce78cc6d0de72386b) Signed-off-by: Pavel Tatashin --- arch/x86/boot/compressed/misc.h | 1 +

[PATCH 4.1 32/65] kaiser: fix regs to do_nmi() ifndef CONFIG_KAISER

2018-03-05 Thread Pavel Tatashin
re CR3" comment: matching how the "Unconditionally use kernel CR3" comment above is enclosed. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 487f0b73d82611a2dc48d7d78409e2e9d994006a) Signed-off-by: Pavel Tatashin Conf

[PATCH 4.1 33/65] kaiser: fix perf crashes

2018-03-05 Thread Pavel Tatashin
Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 20cbe9a3aa2e341824da57ce0ac6d52cbffaa570) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/kernel/cpu/perf_event_intel_ds.c --- arch/x86/kernel/cpu/perf_event_intel_ds.c | 57 --- 1 file changed

[PATCH 4.1 35/65] kaiser: tidied up asm/kaiser.h somewhat

2018-03-05 Thread Pavel Tatashin
From: Hugh Dickins Mainly deleting a surfeit of blank lines, and reflowing header comment. Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 5fbd46c4be78174656b52e1b04d3057a5dd7af66) Signed-off-by: Pavel Tatashin --- arch/x86

[PATCH 4.1 26/65] KAISER: Kernel Address Isolation

2018-03-05 Thread Pavel Tatashin
y picked from commit 8a43ddfb93a0c6ae1a6e1f5c25705ec5d1843c40) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/entry/entry_64.S (not in this tree) arch/x86/kernel/entry_64.S (patched instead of that) arch/x86/entry/entry_64_compat.S (not in this tree) arch/

[PATCH 4.1 31/65] kaiser: KAISER depends on SMP

2018-03-05 Thread Pavel Tatashin
ff-by: Greg Kroah-Hartman (cherry picked from commit d94df20135ccfdfb77b1479c501564e9b4ab5bc9) Signed-off-by: Pavel Tatashin --- security/Kconfig | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/security/Kconfig b/security/Kconfig index cdad6dd3693a..5f4b656bfa4c 1006

[PATCH 4.1 25/65] x86/entry: Define 'cpu_current_top_of_stack' for 64-bit code

2018-03-05 Thread Pavel Tatashin
Cc: Thomas Gleixner Cc: Will Drewry Link: http://lkml.kernel.org/r/1429889495-27850-3-git-send-email-dvlas...@redhat.com Signed-off-by: Ingo Molnar (cherry picked from commit 3a23208e69679597e767cf3547b1a30dd845d9b5) Signed-off-by: Pavel Tatashin --- arch/x86/ia32/ia32entry.S | 4 ++--

[PATCH 4.1 21/65] x86/mm/64: Fix reboot interaction with CR4.PCIDE

2018-03-05 Thread Pavel Tatashin
) Signed-off-by: Pavel Tatashin --- arch/x86/kernel/reboot.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 0549ae3cb332..d9ea27ec9dbd 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -93,6 +93,10 @@

[PATCH 4.1 24/65] x86/entry: Remove unused 'kernel_stack' per-cpu variable

2018-03-05 Thread Pavel Tatashin
Gleixner Cc: Will Drewry Link: http://lkml.kernel.org/r/1429889495-27850-2-git-send-email-dvlas...@redhat.com Signed-off-by: Ingo Molnar (cherry picked from commit fed7c3f0f750f225317828d691e9eb76eec887b3) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/thread_info.h | 2 -- arch/x86

[PATCH 4.1 17/65] x86/mm: Remove the UP asm/tlbflush.h code, always use the (formerly) SMP code

2018-03-05 Thread Pavel Tatashin
n (cherry picked from commit b2e24274d50e0ecdf560ebe06dbed0cc648ad3f9) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/Kconfig --- arch/x86/include/asm/hardirq.h | 2 +- arch/x86/include/asm/mmu.h | 6 --- arch/x86/include/asm/mmu_context.h | 2 - arch/x86/

[PATCH 4.1 22/65] x86/boot: Add early cmdline parsing for options with arguments

2018-03-05 Thread Pavel Tatashin
) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/cmdline.h | 2 + arch/x86/lib/cmdline.c | 105 + 2 files changed, 107 insertions(+) diff --git a/arch/x86/include/asm/cmdline.h b/arch/x86/include/asm/cmdline.h index e01f7f7ccb0c..84ae170bc3d0

[PATCH 4.1 20/65] x86/mm: Enable CR4.PCIDE on supported systems

2018-03-05 Thread Pavel Tatashin
org/r/6327ecd907b32f79d5aa0d466f04503bbec5df88.1498751203.git.l...@kernel.org Signed-off-by: Ingo Molnar Cc: Hugh Dickins Signed-off-by: Greg Kroah-Hartman (cherry picked from commit fd0504525efd2ce2063cd4229baabd3e3a56ecbc) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/tlbflush.h | 8 arch/x86/kerne

[PATCH 4.1 23/65] x86/entry: Stop using PER_CPU_VAR(kernel_stack)

2018-03-05 Thread Pavel Tatashin
/1429889495-27850-1-git-send-email-dvlas...@redhat.com Signed-off-by: Ingo Molnar (cherry picked from commit 63332a8455d8310b77d38779c6c21a660a8d9feb) Signed-off-by: Pavel Tatashin --- arch/x86/ia32/ia32entry.S | 2 +- arch/x86/include/asm/thread_info.h | 8 +++- arch/x86/kernel

[PATCH 4.1 13/65] x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly()

2018-03-05 Thread Pavel Tatashin
Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/791a644076fc3577ba7f7b7cafd643cc089baa7d.1492844372.git.l...@kernel.org Signed-off-by: Ingo Molnar Cc: Hugh Dickins Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 6ce9d1e6819e53c4de0bf980555c4e07bbedb4ce) Signed-off-by: Pave

[PATCH 4.1 16/65] x86/mm: Reimplement flush_tlb_page() using flush_tlb_mm_range()

2018-03-05 Thread Pavel Tatashin
ins Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 3efba6062a410a2a65fc9d6f53dca63db2602e65) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/tlbflush.h | 6 +- arch/x86/mm/tlb.c | 27 --- 2 files changed, 5 insertions(+), 28 deleti

[PATCH 4.1 19/65] x86/mm: Add the 'nopcid' boot option to turn off PCID

2018-03-05 Thread Pavel Tatashin
-by: Ingo Molnar Cc: Hugh Dickins Signed-off-by: Greg Kroah-Hartman (cherry picked from commit dcccd3c266e24ce80ecf592765315c54c222ac33) Signed-off-by: Pavel Tatashin --- Documentation/kernel-parameters.txt | 2 ++ arch/x86/kernel/cpu/common.c| 18 ++ 2 files changed

[PATCH 4.1 11/65] sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()

2018-03-05 Thread Pavel Tatashin
tman (cherry picked from commit 18a5348d49afcfc2b95da939143c9420edd78b9e) Signed-off-by: Pavel Tatashin --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index d253618d09c6..9c905bd94ff0 100644 --- a/kernel/sched/

[PATCH 4.1 14/65] x86/mm: Remove flush_tlb() and flush_tlb_current_task()

2018-03-05 Thread Pavel Tatashin
eixner Link: http://lkml.kernel.org/r/e52d64c11690f85e9f1d69d7b48cc2269cd2e94b.1492844372.git.l...@kernel.org Signed-off-by: Ingo Molnar Cc: Hugh Dickins Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 227d6f0e79f809e448d3157fbfd00eb54dcbb54e) Signed-off-by: Pavel Tatashin --- ar

[PATCH 4.1 18/65] x86/mm: Disable PCID on 32-bit kernels

2018-03-05 Thread Pavel Tatashin
/2e391769192a4d31b808410c383c6bf0734bc6ea.1498751203.git.l...@kernel.org Signed-off-by: Ingo Molnar Cc: Hugh Dickins Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 78043e5b6fb2921d836b31f23e89e52925191153) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/disabled-features.h

[PATCH 4.1 15/65] x86/mm: Make flush_tlb_mm_range() more predictable

2018-03-05 Thread Pavel Tatashin
rnel.org/r/4b29b771d9975aad7154c314534fec235618175a.1492844372.git.l...@kernel.org Signed-off-by: Ingo Molnar Cc: Hugh Dickins Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 9f4d1ba1d407e56dac833aa0b11c60f952939e1c) Signed-off-by: Pavel Tatashin --- arch/x86/mm/tlb.c | 12 +++- 1 file

[PATCH 4.1 09/65] x86/mm, sched/core: Turn off IRQs in switch_mm()

2018-03-05 Thread Pavel Tatashin
4ead44fd2525ed97e5362a806d312a0e3b0ea445) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/include/asm/mmu_context.h --- arch/x86/include/asm/mmu_context.h | 4 arch/x86/mm/tlb.c | 10 ++ 2 files changed, 14 insertions(+) diff --git a/arch/x86/include/asm

[PATCH 4.1 08/65] x86/mm, sched/core: Uninline switch_mm()

2018-03-05 Thread Pavel Tatashin
a Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/54f3367803e7f80b2be62c8a21879aa74b1a5f57.1461688545.git.l...@kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 70a39c7fd167399fde76aeac314dce026a255b49) Signed-off-by: Pavel Tatashin Conf

[PATCH 4.1 10/65] ARM: Hide finish_arch_post_lock_switch() from modules

2018-03-05 Thread Pavel Tatashin
b6013c55 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler") Link: http://lkml.kernel.org/r/1463146234-161304-1-git-send-email-a...@arndb.de Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit c22d4b4d1c7fcc0d9eb4d8618d86c554c48ed9c0)

[PATCH 4.1 06/65] sched/core: Add switch_mm_irqs_off() and use it in the scheduler

2018-03-05 Thread Pavel Tatashin
Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/df401df47bdd6be3e389c6f1e3f5310d70e81b2c.1461688545.git.l...@kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 425f13a36652523d604fd96413d6c438d415dd70) Signed-off-by: Pavel Tatashin

[PATCH 4.1 04/65] x86/mm: If INVPCID is available, use it to flush global mappings

2018-03-05 Thread Pavel Tatashin
Cc: Toshi Kani Cc: linux...@kvack.org Link: http://lkml.kernel.org/r/ed0ef62581c0ea9c99b9bf6df726015e96d44743.1454096309.git.l...@kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 85d3700c744a11ee2989252acf50ccbbd814167a) Signed-off-by: Pavel

[PATCH 4.1 01/65] x86/mm: Add INVPCID helpers

2018-03-05 Thread Pavel Tatashin
/8a62b23ad686888cee01da134c91409e22064db9.1454096309.git.l...@kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit becf292446e9f2dc8842c448836bbe8005e24db0) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/tlbflush.h | 48 + 1 file changed, 48

[PATCH 4.1 07/65] x86/mm: Build arch/x86/mm/tlb.c even on !SMP

2018-03-05 Thread Pavel Tatashin
://lkml.kernel.org/r/f0d778f0d828fc46e5d1946bca80f0aaf9abf032.1461688545.git.l...@kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 83cc4b50e3a977915666ade0b951ba446e7181bd) Signed-off-by: Pavel Tatashin --- arch/x86/mm/Makefile | 3 +-- arch/x86/mm

[PATCH 4.1 05/65] mm/mmu_context, sched/core: Fix mmu_context.h assumption

2018-03-05 Thread Pavel Tatashin
: linux-kernel@vger.kernel.org Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit dfe513a4e8ddde75ffc6abd3f139c5d65bf925d7) Signed-off-by: Pavel Tatashin --- mm/mmu_context.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 4.1 02/65] x86/mm: Fix INVPCID asm constraint

2018-03-05 Thread Pavel Tatashin
sterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: linux...@kvack.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 04ec428b15f161ce8449756fb64b6f380c8d95fd) Signed-off-by: Pavel Tatashin --- arch/x86/include/asm/tlbflush.h | 4 ++-- 1 fi

[PATCH 4.1 03/65] x86/mm: Add a 'noinvpcid' boot option to turn off INVPCID

2018-03-05 Thread Pavel Tatashin
linux...@kvack.org Link: http://lkml.kernel.org/r/f586317ed1bc2b87aee652267e515b90051af385.1454096309.git.l...@kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 791a0f3fecdabe18cc291e5f9b7ebbdc81895975) Signed-off-by: Pavel Tatashin --- Documentation/k

<    1   2   3   4   5   6   7   8   9   10   >