linux-stable/tools/testing/selftests/kvm
Michal Luczaj 47d2804bc9 KVM: selftests: Add test for race in kvm_recalculate_apic_map()
Keep switching between LAPIC_MODE_X2APIC and LAPIC_MODE_DISABLED during
APIC map construction to hunt for TOCTOU bugs in KVM.  KVM's optimized map
recalc makes multiple passes over the list of vCPUs, and the calculations
ignore vCPU's whose APIC is hardware-disabled, i.e. there's a window where
toggling LAPIC_MODE_DISABLED is quite interesting.

Signed-off-by: Michal Luczaj <mhal@rbox.co>
Co-developed-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20230602233250.1014316-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2023-06-02 17:21:06 -07:00
..
aarch64 Merge branch kvm-arm64/smccc-filtering into kvmarm-master/next 2023-04-21 09:44:32 +01:00
include KVM selftests, and an AMX/XCR0 bugfix, for 6.4: 2023-04-26 15:56:01 -04:00
lib KVM selftests, and an AMX/XCR0 bugfix, for 6.4: 2023-04-26 15:56:01 -04:00
s390x KVM: selftests: Make vCPU exit reason test assertion common 2023-03-14 10:20:09 -04:00
x86_64 KVM: selftests: Add test for race in kvm_recalculate_apic_map() 2023-06-02 17:21:06 -07:00
.gitignore KVM: selftests: Use pattern matching in .gitignore 2022-12-27 06:00:46 -05:00
access_tracking_perf_test.c Merge remote-tracking branch 'kvm/queue' into HEAD 2022-12-12 15:54:07 -05:00
config KVM: selftests: Fixup config fragment for access_tracking_perf_test 2023-03-30 19:27:56 +01:00
demand_paging_test.c KVM: selftests: Fix nsec to sec conversion in demand_paging_test 2023-03-24 08:26:23 -07:00
dirty_log_perf_test.c KVM: selftests: Fix spelling mistake "probabalistic" -> "probabilistic" 2022-12-02 13:23:55 -05:00
dirty_log_test.c Merge remote-tracking branch 'kvm/queue' into HEAD 2022-12-12 15:54:07 -05:00
hardware_disable_test.c KVM: selftests: Move per-VM/per-vCPU nr pages calculation to __vm_create() 2022-06-11 11:47:26 -04:00
kvm_binary_stats_test.c KVM: selftests: Stop assuming stats are contiguous in kvm_binary_stats_test 2023-01-24 10:06:34 -08:00
kvm_create_max_vcpus.c KVM: selftests: Add TEST_REQUIRE macros to reduce skipping copy+paste 2022-06-11 11:47:29 -04:00
kvm_page_table_test.c KVM: selftests: Drop now-unnecessary ucall_uninit() 2022-11-16 16:58:53 -08:00
Makefile KVM: selftests: Add test for race in kvm_recalculate_apic_map() 2023-06-02 17:21:06 -07:00
max_guest_memory_test.c KVM: selftests: Add atoi_positive() and atoi_non_negative() for input validation 2022-11-16 10:03:24 -08:00
memslot_modification_stress_test.c KVM/arm64 updates for 6.2 2022-12-09 09:12:12 +01:00
memslot_perf_test.c KVM: selftests: Assign guest page size in sync area early in memslot_perf_test 2023-02-07 15:44:19 -08:00
rseq_test.c KVM: selftests: Fix build of rseq test 2023-01-30 16:29:45 +01:00
set_memory_region_test.c KVM: selftests: Make vCPU exit reason test assertion common 2023-03-14 10:20:09 -04:00
settings
steal_time.c KVM: selftests: Automatically do init_ucall() for non-barebones VMs 2022-11-16 16:58:51 -08:00
system_counter_offset_test.c KVM: selftests: Automatically do init_ucall() for non-barebones VMs 2022-11-16 16:58:51 -08:00