From a0fbb62d9577118fda219fbd475f5ea3d08ea303 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Tue, 13 Jul 2021 16:13:04 +1000 Subject: executor/common_kvm_ppc64: run with enabled MMU This sets up a page table to map the text in order to exercise more code paths in the KVM. This defines flags to control the MMU state. When enabled, this creates a simple page table at the 64K offset and maps all the RAM. The fuzzer code is placed right after the table. The flags are: IR - enables MMU for instruction fetches DR - enables MMU for data loads/stores PR - "problem state", i.e. userspace (implies DR and IR) PID1 - initializes a process table for PID>0 (PID#0 is used by the VM OS normally) This adds a simple "syz_kvm_setup_cpu_ppc64" syz-test with MSR=IR|DR|LE which is a typical Linux kernel mode. Signed-off-by: Alexey Kardashevskiy --- executor/test_linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'executor/test_linux.h') diff --git a/executor/test_linux.h b/executor/test_linux.h index 84efbdba0..f5630edbf 100644 --- a/executor/test_linux.h +++ b/executor/test_linux.h @@ -174,7 +174,7 @@ static int test_kvm() return res; } #elif GOARCH_ppc64le - for (unsigned i = 0; i < (1 << 1); ++i) { + for (unsigned i = 0; i < (1 << 5); ++i) { res = test_one(8, kvm_ppc64_mr, sizeof(kvm_ppc64_mr) - 1, i, KVM_EXIT_DEBUG, true); if (res) return res; -- cgit mrf-deployment