<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git, branch v4.9.75</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.75</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.75'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-01-05T14:46:36Z</updated>
<entry>
<title>Linux 4.9.75</title>
<updated>2018-01-05T14:46:36Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-01-05T14:46:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9f74755895f9b080f79384edb600a18433788adc'/>
<id>urn:sha1:9f74755895f9b080f79384edb600a18433788adc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>kaiser: Set _PAGE_NX only if supported</title>
<updated>2018-01-05T14:46:36Z</updated>
<author>
<name>Guenter Roeck</name>
<email>groeck@chromium.org</email>
</author>
<published>2018-01-04T21:41:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=92fd81f772673ee51381337f07b1da94187de542'/>
<id>urn:sha1:92fd81f772673ee51381337f07b1da94187de542</id>
<content type='text'>
This resolves a crash if loaded under qemu + haxm under windows.
See https://www.spinics.net/lists/kernel/msg2689835.html for details.
Here is a boot log (the log is from chromeos-4.4, but Tao Wu says that
the same log is also seen with vanilla v4.4.110-rc1).

[    0.712750] Freeing unused kernel memory: 552K
[    0.721821] init: Corrupted page table at address 57b029b332e0
[    0.722761] PGD 80000000bb238067 PUD bc36a067 PMD bc369067 PTE 45d2067
[    0.722761] Bad pagetable: 000b [#1] PREEMPT SMP 
[    0.722761] Modules linked in:
[    0.722761] CPU: 1 PID: 1 Comm: init Not tainted 4.4.96 #31
[    0.722761] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014
[    0.722761] task: ffff8800bc290000 ti: ffff8800bc28c000 task.ti: ffff8800bc28c000
[    0.722761] RIP: 0010:[&lt;ffffffff83f4129e&gt;]  [&lt;ffffffff83f4129e&gt;] __clear_user+0x42/0x67
[    0.722761] RSP: 0000:ffff8800bc28fcf8  EFLAGS: 00010202
[    0.722761] RAX: 0000000000000000 RBX: 00000000000001a4 RCX: 00000000000001a4
[    0.722761] RDX: 0000000000000000 RSI: 0000000000000008 RDI: 000057b029b332e0
[    0.722761] RBP: ffff8800bc28fd08 R08: ffff8800bc290000 R09: ffff8800bb2f4000
[    0.722761] R10: ffff8800bc290000 R11: ffff8800bb2f4000 R12: 000057b029b332e0
[    0.722761] R13: 0000000000000000 R14: 000057b029b33340 R15: ffff8800bb1e2a00
[    0.722761] FS:  0000000000000000(0000) GS:ffff8800bfb00000(0000) knlGS:0000000000000000
[    0.722761] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[    0.722761] CR2: 000057b029b332e0 CR3: 00000000bb2f8000 CR4: 00000000000006e0
[    0.722761] Stack:
[    0.722761]  000057b029b332e0 ffff8800bb95fa80 ffff8800bc28fd18 ffffffff83f4120c
[    0.722761]  ffff8800bc28fe18 ffffffff83e9e7a1 ffff8800bc28fd68 0000000000000000
[    0.722761]  ffff8800bc290000 ffff8800bc290000 ffff8800bc290000 ffff8800bc290000
[    0.722761] Call Trace:
[    0.722761]  [&lt;ffffffff83f4120c&gt;] clear_user+0x2e/0x30
[    0.722761]  [&lt;ffffffff83e9e7a1&gt;] load_elf_binary+0xa7f/0x18f7
[    0.722761]  [&lt;ffffffff83de2088&gt;] search_binary_handler+0x86/0x19c
[    0.722761]  [&lt;ffffffff83de389e&gt;] do_execveat_common.isra.26+0x909/0xf98
[    0.722761]  [&lt;ffffffff844febe0&gt;] ? rest_init+0x87/0x87
[    0.722761]  [&lt;ffffffff83de40be&gt;] do_execve+0x23/0x25
[    0.722761]  [&lt;ffffffff83c002e3&gt;] run_init_process+0x2b/0x2d
[    0.722761]  [&lt;ffffffff844fec4d&gt;] kernel_init+0x6d/0xda
[    0.722761]  [&lt;ffffffff84505b2f&gt;] ret_from_fork+0x3f/0x70
[    0.722761]  [&lt;ffffffff844febe0&gt;] ? rest_init+0x87/0x87
[    0.722761] Code: 86 84 be 12 00 00 00 e8 87 0d e8 ff 66 66 90 48 89 d8 48 c1
eb 03 4c 89 e7 83 e0 07 48 89 d9 be 08 00 00 00 31 d2 48 85 c9 74 0a &lt;48&gt; 89 17
48 01 f7 ff c9 75 f6 48 89 c1 85 c9 74 09 88 17 48 ff 
[    0.722761] RIP  [&lt;ffffffff83f4129e&gt;] __clear_user+0x42/0x67
[    0.722761]  RSP &lt;ffff8800bc28fcf8&gt;
[    0.722761] ---[ end trace def703879b4ff090 ]---
[    0.722761] BUG: sleeping function called from invalid context at /mnt/host/source/src/third_party/kernel/v4.4/kernel/locking/rwsem.c:21
[    0.722761] in_atomic(): 0, irqs_disabled(): 1, pid: 1, name: init
[    0.722761] CPU: 1 PID: 1 Comm: init Tainted: G      D         4.4.96 #31
[    0.722761] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014
[    0.722761]  0000000000000086 dcb5d76098c89836 ffff8800bc28fa30 ffffffff83f34004
[    0.722761]  ffffffff84839dc2 0000000000000015 ffff8800bc28fa40 ffffffff83d57dc9
[    0.722761]  ffff8800bc28fa68 ffffffff83d57e6a ffffffff84a53640 0000000000000000
[    0.722761] Call Trace:
[    0.722761]  [&lt;ffffffff83f34004&gt;] dump_stack+0x4d/0x63
[    0.722761]  [&lt;ffffffff83d57dc9&gt;] ___might_sleep+0x13a/0x13c
[    0.722761]  [&lt;ffffffff83d57e6a&gt;] __might_sleep+0x9f/0xa6
[    0.722761]  [&lt;ffffffff84502788&gt;] down_read+0x20/0x31
[    0.722761]  [&lt;ffffffff83cc5d9b&gt;] __blocking_notifier_call_chain+0x35/0x63
[    0.722761]  [&lt;ffffffff83cc5ddd&gt;] blocking_notifier_call_chain+0x14/0x16
[    0.800374] usb 1-1: new full-speed USB device number 2 using uhci_hcd
[    0.722761]  [&lt;ffffffff83cefe97&gt;] profile_task_exit+0x1a/0x1c
[    0.802309]  [&lt;ffffffff83cac84e&gt;] do_exit+0x39/0xe7f
[    0.802309]  [&lt;ffffffff83ce5938&gt;] ? vprintk_default+0x1d/0x1f
[    0.802309]  [&lt;ffffffff83d7bb95&gt;] ? printk+0x57/0x73
[    0.802309]  [&lt;ffffffff83c46e25&gt;] oops_end+0x80/0x85
[    0.802309]  [&lt;ffffffff83c7b747&gt;] pgtable_bad+0x8a/0x95
[    0.802309]  [&lt;ffffffff83ca7f4a&gt;] __do_page_fault+0x8c/0x352
[    0.802309]  [&lt;ffffffff83eefba5&gt;] ? file_has_perm+0xc4/0xe5
[    0.802309]  [&lt;ffffffff83ca821c&gt;] do_page_fault+0xc/0xe
[    0.802309]  [&lt;ffffffff84507682&gt;] page_fault+0x22/0x30
[    0.802309]  [&lt;ffffffff83f4129e&gt;] ? __clear_user+0x42/0x67
[    0.802309]  [&lt;ffffffff83f4127f&gt;] ? __clear_user+0x23/0x67
[    0.802309]  [&lt;ffffffff83f4120c&gt;] clear_user+0x2e/0x30
[    0.802309]  [&lt;ffffffff83e9e7a1&gt;] load_elf_binary+0xa7f/0x18f7
[    0.802309]  [&lt;ffffffff83de2088&gt;] search_binary_handler+0x86/0x19c
[    0.802309]  [&lt;ffffffff83de389e&gt;] do_execveat_common.isra.26+0x909/0xf98
[    0.802309]  [&lt;ffffffff844febe0&gt;] ? rest_init+0x87/0x87
[    0.802309]  [&lt;ffffffff83de40be&gt;] do_execve+0x23/0x25
[    0.802309]  [&lt;ffffffff83c002e3&gt;] run_init_process+0x2b/0x2d
[    0.802309]  [&lt;ffffffff844fec4d&gt;] kernel_init+0x6d/0xda
[    0.802309]  [&lt;ffffffff84505b2f&gt;] ret_from_fork+0x3f/0x70
[    0.802309]  [&lt;ffffffff844febe0&gt;] ? rest_init+0x87/0x87
[    0.830559] Kernel panic - not syncing: Attempted to kill init!  exitcode=0x00000009
[    0.830559] 
[    0.831305] Kernel Offset: 0x2c00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    0.831305] ---[ end Kernel panic - not syncing: Attempted to kill init!  exitcode=0x00000009

The crash part of this problem may be solved with the following patch
(thanks to Hugh for the hint). There is still another problem, though -
with this patch applied, the qemu session aborts with "VCPU Shutdown
request", whatever that means.

Cc: lepton &lt;ytht.net@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KPTI: Report when enabled</title>
<updated>2018-01-05T14:46:36Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2018-01-03T18:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ea6cd39d230f71e27facc0667c1986504e5b0f54'/>
<id>urn:sha1:ea6cd39d230f71e27facc0667c1986504e5b0f54</id>
<content type='text'>
Make sure dmesg reports when KPTI is enabled.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>KPTI: Rename to PAGE_TABLE_ISOLATION</title>
<updated>2018-01-05T14:46:35Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2018-01-03T18:17:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e71fac01727a9495f08de9db5259089bee311766'/>
<id>urn:sha1:e71fac01727a9495f08de9db5259089bee311766</id>
<content type='text'>
This renames CONFIG_KAISER to CONFIG_PAGE_TABLE_ISOLATION.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>x86/kaiser: Move feature detection up</title>
<updated>2018-01-05T14:46:35Z</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2017-12-25T12:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=59094faf3f618b2d2b2a45acb916437d611cede6'/>
<id>urn:sha1:59094faf3f618b2d2b2a45acb916437d611cede6</id>
<content type='text'>
... before the first use of kaiser_enabled as otherwise funky
things happen:

  about to get started...
  (XEN) d0v0 Unhandled page fault fault/trap [#14, ec=0000]
  (XEN) Pagetable walk from ffff88022a449090:
  (XEN)  L4[0x110] = 0000000229e0e067 0000000000001e0e
  (XEN)  L3[0x008] = 0000000000000000 ffffffffffffffff
  (XEN) domain_crash_sync called from entry.S: fault at ffff82d08033fd08
  entry.o#create_bounce_frame+0x135/0x14d
  (XEN) Domain 0 (vcpu#0) crashed on cpu#0:
  (XEN) ----[ Xen-4.9.1_02-3.21  x86_64  debug=n   Not tainted ]----
  (XEN) CPU:    0
  (XEN) RIP:    e033:[&lt;ffffffff81007460&gt;]
  (XEN) RFLAGS: 0000000000000286   EM: 1   CONTEXT: pv guest (d0v0)

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kaiser: disabled on Xen PV</title>
<updated>2018-01-05T14:46:35Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2018-01-02T13:19:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=402e63de94afdf7cd64e4eb209a8a77310e02d2c'/>
<id>urn:sha1:402e63de94afdf7cd64e4eb209a8a77310e02d2c</id>
<content type='text'>
Kaiser cannot be used on paravirtualized MMUs (namely reading and writing CR3).
This does not work with KAISER as the CR3 switch from and to user space PGD
would require to map the whole XEN_PV machinery into both.

More importantly, enabling KAISER on Xen PV doesn't make too much sense, as PV
guests use distinct %cr3 values for kernel and user already.

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>x86/kaiser: Reenable PARAVIRT</title>
<updated>2018-01-05T14:46:35Z</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2018-01-02T13:19:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2c2721754a7f193c98188d07ee335b124ae2df77'/>
<id>urn:sha1:2c2721754a7f193c98188d07ee335b124ae2df77</id>
<content type='text'>
Now that the required bits have been addressed, reenable
PARAVIRT.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>x86/paravirt: Dont patch flush_tlb_single</title>
<updated>2018-01-05T14:46:35Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2017-12-04T14:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1817d2c2fac1b277d97c5a54316e6bfb430d0268'/>
<id>urn:sha1:1817d2c2fac1b277d97c5a54316e6bfb430d0268</id>
<content type='text'>
commit a035795499ca1c2bd1928808d1a156eda1420383 upstream

native_flush_tlb_single() will be changed with the upcoming
PAGE_TABLE_ISOLATION feature. This requires to have more code in
there than INVLPG.

Remove the paravirt patching for it.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Reviewed-by: Juergen Gross &lt;jgross@suse.com&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Borislav Petkov &lt;bpetkov@suse.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Dave Hansen &lt;dave.hansen@intel.com&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: David Laight &lt;David.Laight@aculab.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: Eduardo Valentin &lt;eduval@amazon.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: aliguori@amazon.com
Cc: daniel.gruss@iaik.tugraz.at
Cc: hughd@google.com
Cc: keescook@google.com
Cc: linux-mm@kvack.org
Cc: michael.schwarz@iaik.tugraz.at
Cc: moritz.lipp@iaik.tugraz.at
Cc: richard.fellner@student.tugraz.at
Link: https://lkml.kernel.org/r/20171204150606.828111617@linutronix.de
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kaiser: kaiser_flush_tlb_on_return_to_user() check PCID</title>
<updated>2018-01-05T14:46:35Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@google.com</email>
</author>
<published>2017-11-05T01:43:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fe5cb75fd2dd51746fd391c7f6d18485e6a44f76'/>
<id>urn:sha1:fe5cb75fd2dd51746fd391c7f6d18485e6a44f76</id>
<content type='text'>
Let kaiser_flush_tlb_on_return_to_user() do the X86_FEATURE_PCID
check, instead of each caller doing it inline first: nobody needs
to optimize for the noPCID case, it's clearer this way, and better
suits later changes.  Replace those no-op X86_CR3_PCID_KERN_FLUSH lines
by a BUILD_BUG_ON() in load_new_mm_cr3(), in case something changes.

Signed-off-by: Hugh Dickins &lt;hughd@google.com&gt;
Acked-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kaiser: asm/tlbflush.h handle noPGE at lower level</title>
<updated>2018-01-05T14:46:35Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@google.com</email>
</author>
<published>2017-11-05T01:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b72c26e911c566c78743d7973103925007d103c7'/>
<id>urn:sha1:b72c26e911c566c78743d7973103925007d103c7</id>
<content type='text'>
I found asm/tlbflush.h too twisty, and think it safer not to avoid
__native_flush_tlb_global_irq_disabled() in the kaiser_enabled case,
but instead let it handle kaiser_enabled along with cr3: it can just
use __native_flush_tlb() for that, no harm in re-disabling preemption.

(This is not the same change as Kirill and Dave have suggested for
upstream, flipping PGE in cr4: that's neat, but needs a cpu_has_pge
check; cr3 is enough for kaiser, and thought to be cheaper than cr4.)

Also delete the X86_FEATURE_INVPCID invpcid_flush_all_nonglobals()
preference from __native_flush_tlb(): unlike the invpcid_flush_all()
preference in __native_flush_tlb_global(), it's not seen in upstream
4.14, and was recently reported to be surprisingly slow.

Signed-off-by: Hugh Dickins &lt;hughd@google.com&gt;
Acked-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
