]> git.baikalelectronics.ru Git - kernel.git/commit
x86/entry/32: Pass cr2 to do_async_page_fault()
authorMatt Mullins <mmullins@fb.com>
Wed, 24 Jul 2019 04:20:58 +0000 (21:20 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 24 Jul 2019 10:17:39 +0000 (12:17 +0200)
commit9ca52c872a58b3b6cc00d5883bc818d53c09e686
tree2d0b30158b848661cd21ed70eacb7c45c60463e7
parentebd9469bc21bd682ed2e9b8210650b14eea26371
x86/entry/32: Pass cr2 to do_async_page_fault()

Commit f374b3bf3a3e ("x86/mm, tracing: Fix CR2 corruption") added the
address parameter to do_async_page_fault(), but does not pass it from the
32-bit entry point.  To plumb it through, factor-out
common_exception_read_cr2 in the same fashion as common_exception, and uses
it from both page_fault and async_page_fault.

For a 32-bit KVM guest, this fixes:

  Run /sbin/init as init process
  Starting init: /sbin/init exists but couldn't execute it (error -14)

Fixes: f374b3bf3a3e ("x86/mm, tracing: Fix CR2 corruption")
Signed-off-by: Matt Mullins <mmullins@fb.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190724042058.24506-1-mmullins@fb.com
arch/x86/entry/entry_32.S