linux-stable/tools/testing/selftests
Linus Torvalds 817772266d * Clean up SVM's enter/exit assembly code so that it can be compiled
without OBJECT_FILES_NON_STANDARD.  This fixes a warning
   "Unpatched return thunk in use. This should not happen!" when running
   KVM selftests.
 
 * Fix a mostly benign bug in the gfn_to_pfn_cache infrastructure where KVM
   would allow userspace to refresh the cache with a bogus GPA.  The bug has
   existed for quite some time, but was exposed by a new sanity check added in
   6.9 (to ensure a cache is either GPA-based or HVA-based).
 
 * Drop an unused param from gfn_to_pfn_cache_invalidate_start() that got left
   behind during a 6.9 cleanup.
 
 * Fix a math goof in x86's hugepage logic for KVM_SET_MEMORY_ATTRIBUTES that
   results in an array overflow (detected by KASAN).
 
 * Fix a bug where KVM incorrectly clears root_role.direct when userspace sets
   guest CPUID.
 
 * Fix a dirty logging bug in the where KVM fails to write-protect SPTEs used
   by a nested guest, if KVM is using Page-Modification Logging and the nested
   hypervisor is NOT using EPT.
 
 x86 PMU:
 
 * Drop support for virtualizing adaptive PEBS, as KVM's implementation is
   architecturally broken without an obvious/easy path forward, and because
   exposing adaptive PEBS can leak host LBRs to the guest, i.e. can leak
   host kernel addresses to the guest.
 
 * Set the enable bits for general purpose counters in PERF_GLOBAL_CTRL at
   RESET time, as done by both Intel and AMD processors.
 
 * Disable LBR virtualization on CPUs that don't support LBR callstacks, as
   KVM unconditionally uses PERF_SAMPLE_BRANCH_CALL_STACK when creating the
   perf event, and would fail on such CPUs.
 
 Tests:
 
 * Fix a flaw in the max_guest_memory selftest that results in it exhausting
   the supply of ucall structures when run with more than 256 vCPUs.
 
 * Mark KVM_MEM_READONLY as supported for RISC-V in set_memory_region_test.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmYjdqcUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroPNRAgAh1AdKBAWnq9bFN2Np1kSAcRAk3bs
 REDq/0iD1T9TvIwEmE1lHaRuqvCSO15WW+DKvbs7TS8zA0DyY7X/x8sIIy5YzZ5C
 bQ+JXiqk55OAj0sPskBpCvE5qEreuU8qAit57+8OseKWs57EICvJjrfsRnHlmIub
 pgGas3I42LjIgsuZRr2kjv+GrvaiikW+wWK6sq3CvPzTtHV196d26AK5l4NOoLkY
 0FTbBIYUSJ7wxs92xuTed5mZ7JFZdsa5DVMXF5MRZ9W6g2vZCLbqCNRddRhSAsl0
 gKmqZkuPTB7AnGQbJ2h/aKFT0ydsguzqbbKq62sK7ft5f1CUlbp9luDC9w==
 =99rq
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "This is a bit on the large side, mostly due to two changes:

   - Changes to disable some broken PMU virtualization (see below for
     details under "x86 PMU")

   - Clean up SVM's enter/exit assembly code so that it can be compiled
     without OBJECT_FILES_NON_STANDARD. This fixes a warning "Unpatched
     return thunk in use. This should not happen!" when running KVM
     selftests.

  Everything else is small bugfixes and selftest changes:

   - Fix a mostly benign bug in the gfn_to_pfn_cache infrastructure
     where KVM would allow userspace to refresh the cache with a bogus
     GPA. The bug has existed for quite some time, but was exposed by a
     new sanity check added in 6.9 (to ensure a cache is either
     GPA-based or HVA-based).

   - Drop an unused param from gfn_to_pfn_cache_invalidate_start() that
     got left behind during a 6.9 cleanup.

   - Fix a math goof in x86's hugepage logic for
     KVM_SET_MEMORY_ATTRIBUTES that results in an array overflow
     (detected by KASAN).

   - Fix a bug where KVM incorrectly clears root_role.direct when
     userspace sets guest CPUID.

   - Fix a dirty logging bug in the where KVM fails to write-protect
     SPTEs used by a nested guest, if KVM is using Page-Modification
     Logging and the nested hypervisor is NOT using EPT.

  x86 PMU:

   - Drop support for virtualizing adaptive PEBS, as KVM's
     implementation is architecturally broken without an obvious/easy
     path forward, and because exposing adaptive PEBS can leak host LBRs
     to the guest, i.e. can leak host kernel addresses to the guest.

   - Set the enable bits for general purpose counters in
     PERF_GLOBAL_CTRL at RESET time, as done by both Intel and AMD
     processors.

   - Disable LBR virtualization on CPUs that don't support LBR
     callstacks, as KVM unconditionally uses
     PERF_SAMPLE_BRANCH_CALL_STACK when creating the perf event, and
     would fail on such CPUs.

  Tests:

   - Fix a flaw in the max_guest_memory selftest that results in it
     exhausting the supply of ucall structures when run with more than
     256 vCPUs.

   - Mark KVM_MEM_READONLY as supported for RISC-V in
     set_memory_region_test"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (30 commits)
  KVM: Drop unused @may_block param from gfn_to_pfn_cache_invalidate_start()
  KVM: selftests: Add coverage of EPT-disabled to vmx_dirty_log_test
  KVM: x86/mmu: Fix and clarify comments about clearing D-bit vs. write-protecting
  KVM: x86/mmu: Remove function comments above clear_dirty_{gfn_range,pt_masked}()
  KVM: x86/mmu: Write-protect L2 SPTEs in TDP MMU when clearing dirty status
  KVM: x86/mmu: Precisely invalidate MMU root_role during CPUID update
  KVM: VMX: Disable LBR virtualization if the CPU doesn't support LBR callstacks
  perf/x86/intel: Expose existence of callback support to KVM
  KVM: VMX: Snapshot LBR capabilities during module initialization
  KVM: x86/pmu: Do not mask LVTPC when handling a PMI on AMD platforms
  KVM: x86: Snapshot if a vCPU's vendor model is AMD vs. Intel compatible
  KVM: x86: Stop compiling vmenter.S with OBJECT_FILES_NON_STANDARD
  KVM: SVM: Create a stack frame in __svm_sev_es_vcpu_run()
  KVM: SVM: Save/restore args across SEV-ES VMRUN via host save area
  KVM: SVM: Save/restore non-volatile GPRs in SEV-ES VMRUN via host save area
  KVM: SVM: Clobber RAX instead of RBX when discarding spec_ctrl_intercepted
  KVM: SVM: Drop 32-bit "support" from __svm_sev_es_vcpu_run()
  KVM: SVM: Wrap __svm_sev_es_vcpu_run() with #ifdef CONFIG_KVM_AMD_SEV
  KVM: SVM: Create a stack frame in __svm_vcpu_run() for unwinding
  KVM: SVM: Remove a useless zeroing of allocated memory
  ...
2024-04-20 11:10:51 -07:00
..
alsa selftests: avoid using SKIP(exit()) in harness fixure setup 2024-03-05 19:25:36 -08:00
amd-pstate selftests/amd-pstate: Added option to provide perf binary path 2023-10-16 13:06:58 -06:00
arm64 Merge branches 'for-next/reorg-va-space', 'for-next/rust-for-arm64', 'for-next/misc', 'for-next/daif-cleanup', 'for-next/kselftest', 'for-next/documentation', 'for-next/sysreg' and 'for-next/dpisa', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2024-03-07 19:04:55 +00:00
bpf bpf: Check bloom filter map value size 2024-03-27 09:56:17 -07:00
breakpoints selftests/breakpoints: Fix format specifier in ksft_print_msg in step_after_suspend_test.c 2023-11-30 14:32:34 -07:00
cachestat selftests/cachestat: Fix print_cachestat format 2023-10-13 14:08:10 -06:00
capabilities selftests: capabilities: namespace create varies for root and normal user 2023-11-30 16:37:30 -07:00
cgroup selftests: add zswapin and no zswap tests 2024-02-22 15:27:16 -08:00
clone3 Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
connector selftests: connector: Fix input argument error paths to skip 2023-07-31 20:11:42 -07:00
core selftests: core: include linux/close_range.h for CLOSE_RANGE_* macros 2024-02-07 21:20:34 -08:00
cpu-hotplug
cpufreq
damon selftests: damon: add access_memory to .gitignore 2024-03-04 17:01:16 -08:00
devices kselftest: devices: Add sample board file for XPS 13 9300 2024-01-27 17:38:53 -08:00
dma
dmabuf-heaps selftests: dmabuf-heap: add config file for the test 2024-03-29 13:57:14 -06:00
drivers selftests: netdevsim: set test timeout to 10 minutes 2024-03-27 11:29:27 +00:00
dt linux_kselftest-next-6.9-rc1 2024-03-11 09:25:33 -07:00
efivarfs selftests/efivarfs: create-read: fix a resource leak 2023-10-18 14:33:44 -06:00
exec selftests/exec: Convert remaining /bin/sh to /bin/bash 2024-03-18 11:19:37 -07:00
fchmodat2 selftests: link libasan statically for tests with -fsanitize=address 2023-09-19 13:21:32 -07:00
filelock selftests: add OFD lock tests 2023-08-24 10:41:47 -04:00
filesystems - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
firmware selftests: firmware: remove duplicate unneeded defines 2023-10-06 17:33:52 -06:00
fpu
ftrace selftests/ftrace: Limit length in subsystem-enable tests 2024-04-04 10:29:10 -06:00
futex selftests: fuxex: Report a unique test name per run of futex_requeue_pi 2024-02-19 15:00:51 -07:00
gpio selftest: gpio: remove obsolete gpio-mockup test 2024-03-05 20:01:08 +01:00
hid selftests/hid: wacom: fix confidence tests 2024-01-18 09:15:38 +01:00
ia64
intel_pstate
iommu iommufd: Add config needed for iommufd_fail_nth 2024-04-14 13:52:08 -03:00
ipc
ir
kcmp
kexec
kmod
kselftest selftests: ktap_helpers: Add a helper to finish the test 2024-02-20 15:53:20 -07:00
kvm KVM: selftests: Add coverage of EPT-disabled to vmx_dirty_log_test 2024-04-11 12:58:52 -07:00
landlock Landlock updates for v6.9-rc1 2024-03-14 16:00:27 -07:00
lib
livepatch linux_kselftest-next-6.9-rc1 2024-03-11 09:25:33 -07:00
lkdtm selftests/lkdtm: Disable CONFIG_UBSAN_TRAP in test config 2023-09-28 16:39:08 -07:00
locking
lsm lsm: use 32-bit compatible data types in LSM syscalls 2024-03-14 11:31:26 -04:00
media_tests
membarrier
memfd selftests/memfd: delete unused declarations 2024-02-22 10:24:38 -08:00
memory-hotplug
mincore selftests/mincore: fix skip condition for check_huge_pages test 2023-07-13 12:51:13 -06:00
mm selftests/mm: include strings.h for ffsl 2024-04-05 11:21:30 -07:00
mount
mount_setattr
move_mount_set_group selftests/move_mount_set_group:Make tests build with old libc 2024-01-22 15:33:37 +01:00
mqueue selftests/mqueue: Set timeout to 180 seconds 2024-02-20 17:28:19 -07:00
nci
net selftests/tcp_ao: Printing fixes to confirm with format-security 2024-04-16 13:35:06 +02:00
netfilter selftests: netfilter: add bridge conntrack + multicast test case 2024-02-29 00:22:48 +01:00
nolibc selftests/nolibc: disable coredump via setrlimit 2023-12-11 22:38:37 +01:00
nsfs
ntb
openat2 linux_kselftest-next-6.7-rc1 2023-11-01 17:08:10 -10:00
perf_events
pid_namespace
pidfd selftests: add ESRCH tests for pidfd_getfd() 2024-02-07 15:48:31 +01:00
power_supply selftests: Add test to verify power supply properties 2024-02-20 15:53:33 -07:00
powerpc selftests/powerpc/papr-vpd: Fix missing variable initialization 2024-04-12 14:40:07 +10:00
prctl selftests: prctl: Add prctl test for PR_GET_NAME 2023-11-30 16:30:05 -07:00
proc proc: test ProtectionKey in proc-empty-vm test 2023-11-01 12:46:59 -07:00
pstore
ptp ptp: add testptp mask test 2023-10-15 20:07:52 +01:00
ptrace
rcutorture clocksource: Scale the watchdog read retries automatically 2024-02-21 12:00:42 +01:00
resctrl selftests/resctrl: Add non-contiguous CBMs CAT test 2024-02-23 15:19:25 -07:00
riscv Merge patch series "riscv: mm: Extend mappable memory up to hint address" 2024-03-15 10:17:34 -07:00
rlimits
rseq selftests/rseq: Do not skip !allowed_cpus for mm_cid 2024-01-22 11:40:36 -07:00
rtc
rust kselftest: Add basic test for probing the rust sample modules 2024-03-04 13:13:04 -07:00
safesetid
sched selftests: sched: Fix spelling mistake "hiearchy" -> "hierarchy" 2024-02-20 17:28:19 -07:00
seccomp selftests/seccomp: Try to fit runtime of benchmark into timeout 2024-03-29 13:57:14 -06:00
sgx selftests/sgx: Skip non X86_64 platform 2023-12-08 10:08:17 -08:00
sigaltstack selftests/sigaltstack: Fix wrong format specifier 2023-10-13 14:08:26 -06:00
size
sparc64
splice
static_keys selftests: static_keys: fix test name in messages 2023-10-05 14:28:59 -06:00
sync
syscall_user_dispatch
sysctl sysclt: Clarify the results of selftest run 2023-12-28 04:57:57 -08:00
tc-testing selftests/tc-testing: require an up to date iproute2 for blockcast tests 2024-03-04 19:30:57 -08:00
tdx selftests/tdx: add gitignore file 2023-10-05 14:22:53 -06:00
thermal/intel selftests: thermal: intel: workload_hint: add missing gitignore 2024-02-20 16:30:55 -07:00
timens
timers selftests: timers: Fix abs() warning in posix_timers test 2024-04-12 14:11:15 +02:00
tmpfs
tpm2
tty
turbostat tools/power turbostat: v2024.04.10 2024-04-10 09:07:57 -04:00
uevent selftests: uevent: add missing gitignore 2024-02-20 16:30:40 -07:00
user
user_events selftests/user_events: Test multi-format events 2024-03-18 10:13:12 -04:00
vDSO kselftest/vDSO: Use ksft_print_msg() rather than printf in vdso_test_abi 2023-11-30 14:50:09 -07:00
watchdog
wireguard wireguard: selftests: set RISCV_ISA_FALLBACK on riscv{32,64} 2024-03-19 11:22:50 +01:00
x86 selftests:x86: Fix Format String Warnings in lam.c 2023-11-30 14:32:41 -07:00
zram
.gitignore
Makefile USB/Thunderbolt changes for 6.9-rc1 2024-03-21 12:35:20 -07:00
gen_kselftest_tar.sh
kselftest.h A little calmer than usual, probably just the timing of sub-tree PRs. 2024-04-18 11:40:54 -07:00
kselftest_deps.sh selftests: fix dependency checker script 2023-09-08 10:06:49 -06:00
kselftest_harness.h A little calmer than usual, probably just the timing of sub-tree PRs. 2024-04-18 11:40:54 -07:00
kselftest_install.sh
kselftest_module.h
lib.mk Networking changes for 6.9. 2024-03-12 17:44:08 -07:00
run_kselftest.sh kselftest/runner.sh: add netns support 2023-12-23 00:26:32 +00:00