Go to file
David Matlack e20bff0f1b KVM: x86/mmu: Write-protect L2 SPTEs in TDP MMU when clearing dirty status
commit 2673dfb591 upstream.

Check kvm_mmu_page_ad_need_write_protect() when deciding whether to
write-protect or clear D-bits on TDP MMU SPTEs, so that the TDP MMU
accounts for any role-specific reasons for disabling D-bit dirty logging.

Specifically, TDP MMU SPTEs must be write-protected when the TDP MMU is
being used to run an L2 (i.e. L1 has disabled EPT) and PML is enabled.
KVM always disables PML when running L2, even when L1 and L2 GPAs are in
the some domain, so failing to write-protect TDP MMU SPTEs will cause
writes made by L2 to not be reflected in the dirty log.

Reported-by: syzbot+900d58a45dcaab9e4821@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=900d58a45dcaab9e4821
Fixes: 5982a53926 ("KVM: x86/mmu: Use kvm_ad_enabled() to determine if TDP MMU SPTEs need wrprot")
Cc: stable@vger.kernel.org
Cc: Vipin Sharma <vipinsh@google.com>
Cc: Sean Christopherson <seanjc@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20240315230541.1635322-2-dmatlack@google.com
[sean: massage shortlog and changelog, tweak ternary op formatting]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-27 17:13:01 +02:00
Documentation x86/bugs: Remove CONFIG_BHI_MITIGATION_AUTO and spectre_bhi=auto 2024-04-17 11:23:41 +02:00
LICENSES
arch KVM: x86/mmu: Write-protect L2 SPTEs in TDP MMU when clearing dirty status 2024-04-27 17:13:01 +02:00
block block: propagate partition scanning errors to the BLKRRPART ioctl 2024-04-27 17:12:57 +02:00
certs
crypto Revert "crypto: pkcs7 - remove sha1 support" 2024-04-03 15:32:31 +02:00
drivers speakup: Avoid crash on very long word 2024-04-27 17:13:01 +02:00
fs fs: sysfs: Fix reference leak in sysfs_break_active_protection() 2024-04-27 17:13:01 +02:00
include sched: Add missing memory barrier in switch_mm_cid 2024-04-27 17:13:01 +02:00
init fs/proc: Skip bootloader comment if no embedded kernel parameters 2024-04-17 11:23:36 +02:00
io_uring io_uring: Fix io_cqring_wait() not restoring sigmask on get_timespec64() failure 2024-04-27 17:12:47 +02:00
ipc
kernel sched: Add missing memory barrier in switch_mm_cid 2024-04-27 17:13:01 +02:00
lib lib: checksum: hide unused expected_csum_ipv6_magic[] 2024-04-17 11:23:28 +02:00
mm userfaultfd: change src_folio after ensuring it's unpinned in UFFDIO_MOVE 2024-04-27 17:12:54 +02:00
net net/sched: Fix mirred deadlock on device recursion 2024-04-27 17:12:53 +02:00
rust Rust changes for v6.8 2024-01-11 13:05:41 -08:00
samples work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
scripts gcc-plugins/stackleak: Avoid .head.text section 2024-04-13 13:10:11 +02:00
security selinux: avoid dereference of garbage after mount failure 2024-04-10 16:38:01 +02:00
sound ALSA: hda/realtek - Enable audio jacks of Haier Boyue G42 with ALC269VC 2024-04-27 17:12:57 +02:00
tools selftests/powerpc/papr-vpd: Fix missing variable initialization 2024-04-27 17:12:56 +02:00
usr Kbuild updates for v6.8 2024-01-18 17:57:07 -08:00
virt KVM: Always flush async #PF workqueue when vCPU is being destroyed 2024-04-03 15:32:03 +02:00
.clang-format
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap drm fixes for 6.8 final 2024-03-08 12:44:56 -08:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: supplement of zswap maintainers update 2024-01-25 23:52:21 -08:00
Kbuild
Kconfig
MAINTAINERS drm fixes for 6.8 final 2024-03-08 12:44:56 -08:00
Makefile Linux 6.8.7 2024-04-17 11:23:43 +02:00
README

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.

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.