powerpc updates for 4.18

Notable changes:

 - Support for split PMD page table lock on 64-bit Book3S (Power8/9).

 - Add support for HAVE_RELIABLE_STACKTRACE, so we properly support live
   patching again.

 - Add support for patching barrier_nospec in copy_from_user() and syscall entry.

 - A couple of fixes for our data breakpoints on Book3S.

 - A series from Nick optimising TLB/mm handling with the Radix MMU.

 - Numerous small cleanups to squash sparse/gcc warnings from Mathieu Malaterre.

 - Several series optimising various parts of the 32-bit code from Christophe Leroy.

 - Removal of support for two old machines, "SBC834xE" and "C2K" ("GEFanuc,C2K"),
   which is why the diffstat has so many deletions.

And many other small improvements & fixes.

There's a few out-of-area changes. Some minor ftrace changes OK'ed by Steve, and
a fix to our powernv cpuidle driver. Then there's a series touching mm, x86 and
fs/proc/task_mmu.c, which cleans up some details around pkey support. It was
ack'ed/reviewed by Ingo & Dave and has been in next for several weeks.

Thanks to:
  Akshay Adiga, Alastair D'Silva, Alexey Kardashevskiy, Al Viro, Andrew
  Donnellan, Aneesh Kumar K.V, Anju T Sudhakar, Arnd Bergmann, Balbir Singh,
  Cédric Le Goater, Christophe Leroy, Christophe Lombard, Colin Ian King, Dave
  Hansen, Fabio Estevam, Finn Thain, Frederic Barrat, Gautham R. Shenoy, Haren
  Myneni, Hari Bathini, Ingo Molnar, Jonathan Neuschäfer, Josh Poimboeuf,
  Kamalesh Babulal, Madhavan Srinivasan, Mahesh Salgaonkar, Mark Greer, Mathieu
  Malaterre, Matthew Wilcox, Michael Neuling, Michal Suchanek, Naveen N. Rao,
  Nicholas Piggin, Nicolai Stange, Olof Johansson, Paul Gortmaker, Paul
  Mackerras, Peter Rosin, Pridhiviraj Paidipeddi, Ram Pai, Rashmica Gupta, Ravi
  Bangoria, Russell Currey, Sam Bobroff, Samuel Mendoza-Jonas, Segher
  Boessenkool, Shilpasri G Bhat, Simon Guo, Souptick Joarder, Stewart Smith,
  Thiago Jung Bauermann, Torsten Duwe, Vaibhav Jain, Wei Yongjun, Wolfram Sang,
  Yisheng Xie, YueHaibing.
powerpc/64s/radix: Fix missing ptesync in flush_cache_vmap

There is a typo in f1cb8f9beb ("powerpc/64s/radix: avoid ptesync after
set_pte and ptep_set_access_flags") config ifdef, which results in the
necessary ptesync not being issued after vmalloc.

This causes random kernel faults in module load, bpf load, anywhere
that vmalloc mappings are used.

After correcting the code, this survives a guest kernel booting
hundreds of times where previously there would be a crash every few
boots (I haven't noticed the crash on host, perhaps due to different
TLB and page table walking behaviour in hardware).

A memory clobber is also added to the flush, just to be sure it won't
be reordered with the pte set or the subsequent mapping access.

Fixes: f1cb8f9beb ("powerpc/64s/radix: avoid ptesync after set_pte and ptep_set_access_flags")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 file changed