x86/mm: Add TLB purge to free pmd/pte page interfaces
Toshi Kani authored
commit 5e0fb5df upstream.

ioremap() calls pud_free_pmd_page() / pmd_free_pte_page() when it creates
a pud / pmd map.  The following preconditions are met at their entry.
 - All pte entries for a target pud/pmd address range have been cleared.
 - System-wide TLB purges have been peformed for a target pud/pmd address
   range.

The preconditions assure that there is no stale TLB entry for the range.
Speculation may not cache TLB entries since it requires all levels of page
entries, including ptes, to have P & A-bits set for an associated address.
However, speculation may cache pud/pmd entries (paging-structure caches)
when they have P-bit set.

Add a system-wide TLB purge (INVLPG) to a single page after clearing
pud/pmd entry's P-bit.

SDM 4.10.4.1, Operation that Invalidate TLBs and Paging-Structure Caches,
states that:
  INVLPG invalidates all paging-structure caches associated with the
  current PCID regardless of the ...
69622a5c
Name Last commit Last update
Documentation kbuild: verify that $DEPMOD is installed
LICENSES LICENSES: Add Linux-OpenIB license text
arch x86/mm: Add TLB purge to free pmd/pte page interfaces
block Partially revert "block: fail op_is_write() requests to read-only partitions"
certs certs/blacklist: fix const confusion
crypto crypto: skcipher - fix crash flushing dcache in error path
drivers crypto: ccp - Fix command completion detection race
firmware kbuild: remove all dummy assignments to obj-
fs Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
include ioremap: Update pgtable free interfaces with addr
init init: rename and re-order boot_cpu_state_init()
ipc ipc/shm.c add ->pagesize function to shm_vm_ops
kernel cpu/hotplug: Non-SMP machines do not make use of booted_once
lib ioremap: Update pgtable free interfaces with addr
mm x86/speculation/l1tf: Limit swap file size to MAX_PA/2
net Bluetooth: hidp: buffer overflow in hidp_process_report
samples samples/bpf: xdp_redirect_cpu adjustment to reproduce teardown race easier
scripts kbuild: verify that $DEPMOD is installed
security Merge tag 'selinux-pr-20180629' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
sound ALSA: hda/realtek - Yet another Clevo P950 quirk entry
tools tools headers: Synchronise x86 cpufeatures.h for L1TF additions
usr kbuild: rename built-in.o to built-in.a
virt Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
.clang-format clang-format: add configuration file
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Add hch to .get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore Merge tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
.mailmap Merge branch 'asoc-4.17' into asoc-4.18 for compress dependencies
COPYING COPYING: use the new text with points to the license files
CREDITS MAINTAINERS/CREDITS: Drop METAG ARCHITECTURE
Kbuild Merge tag 'kbuild-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Kconfig kconfig: add basic helper macros to scripts/Kconfig.include
MAINTAINERS MAINTAINERS: GDB: update e-mail address
Makefile Linux 4.18.1
README Docs: Added a pointer to the formatted docs to README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.