| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/06 12:39 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch series modifies KVM code exclusively within arch/powerpc/ (specifically arch/powerpc/kvm/book3s_64_mmu_hv.c, arch/powerpc/kvm/book3s_hv.c, and arch/powerpc/kvm/book3s_paired_singles.c). These code paths are specific to the PowerPC architecture and are structurally unreachable and not compiled on the target architecture (amd64).",
"WorthFuzzing": false
} |
| 1/1 | 2026/10/06 12:39 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 0d3e7200b619daf9d96fbcfd4eadcbe01f44b9fb\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Tue Oct 6 12:39:36 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c\nindex 2ccb3d138f46c..908495f2b001b 100644\n--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c\n+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c\n@@ -810,9 +810,11 @@ static void kvm_unmap_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,\n \n \trmapp = \u0026memslot-\u003earch.rmap[gfn - memslot-\u003ebase_gfn];\n \tfor (;;) {\n+\t\tpreempt_disable();\n \t\tlock_rmap(rmapp);\n \t\tif (!(*rmapp \u0026 KVMPPC_RMAP_PRESENT)) {\n \t\t\tunlock_rmap(rmapp);\n+\t\t\tpreempt_enable();\n \t\t\tbreak;\n \t\t}\n \n@@ -826,6 +828,7 @@ static void kvm_unmap_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,\n \t\tif (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) {\n \t\t\t/* unlock rmap before spinning on the HPTE lock */\n \t\t\tunlock_rmap(rmapp);\n+\t\t\tpreempt_enable();\n \t\t\twhile (be64_to_cpu(hptep[0]) \u0026 HPTE_V_HVLOCK)\n \t\t\t\tcpu_relax();\n \t\t\tcontinue;\n@@ -834,6 +837,7 @@ static void kvm_unmap_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,\n \t\tkvmppc_unmap_hpte(kvm, i, memslot, rmapp, gfn);\n \t\tunlock_rmap(rmapp);\n \t\t__unlock_hpte(hptep, be64_to_cpu(hptep[0]));\n+\t\tpreempt_enable();\n \t}\n }\n \n@@ -890,6 +894,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,\n \n \trmapp = \u0026memslot-\u003earch.rmap[gfn - memslot-\u003ebase_gfn];\n retry:\n+\tpreempt_disable();\n \tlock_rmap(rmapp);\n \tif (*rmapp \u0026 KVMPPC_RMAP_REFERENCED) {\n \t\t*rmapp \u0026= ~KVMPPC_RMAP_REFERENCED;\n@@ -897,6 +902,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,\n \t}\n \tif (!(*rmapp \u0026 KVMPPC_RMAP_PRESENT)) {\n \t\tunlock_rmap(rmapp);\n+\t\tpreempt_enable();\n \t\treturn ret;\n \t}\n \n@@ -912,6 +918,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,\n \t\tif (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) {\n \t\t\t/* unlock rmap before spinning on the HPTE lock */\n \t\t\tunlock_rmap(rmapp);\n+\t\t\tpreempt_enable();\n \t\t\twhile (be64_to_cpu(hptep[0]) \u0026 HPTE_V_HVLOCK)\n \t\t\t\tcpu_relax();\n \t\t\tgoto retry;\n@@ -931,6 +938,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,\n \t} while ((i = j) != head);\n \n \tunlock_rmap(rmapp);\n+\tpreempt_enable();\n \treturn ret;\n }\n \n@@ -1219,6 +1227,7 @@ static unsigned long resize_hpt_rehash_hpte(struct kvm_resize_hpt *resize,\n \tif (!(vpte \u0026 HPTE_V_VALID) \u0026\u0026 !(vpte \u0026 HPTE_V_ABSENT))\n \t\treturn 0; /* nothing to do */\n \n+\tpreempt_disable();\n \twhile (!try_lock_hpte(hptep, HPTE_V_HVLOCK))\n \t\tcpu_relax();\n \n@@ -1346,6 +1355,7 @@ static unsigned long resize_hpt_rehash_hpte(struct kvm_resize_hpt *resize,\n \n out:\n \tunlock_hpte(hptep, vpte);\n+\tpreempt_enable();\n \treturn ret;\n }\n \ndiff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c\nindex de05d721edc4e..56083b415a29d 100644\n--- a/arch/powerpc/kvm/book3s_hv.c\n+++ b/arch/powerpc/kvm/book3s_hv.c\n@@ -1159,6 +1159,42 @@ static long kvmppc_h_rpt_invalidate(struct kvm_vcpu *vcpu,\n \treturn H_SUCCESS;\n }\n \n+/*\n+ * Must be called with preemption disabled. The HPT hcall handlers spin\n+ * on HPTE bit-locks and cannot make any blocking/sleeping calls.\n+ */\n+static long kvmppc_pseries_do_hpt_hcall(struct kvm_vcpu *vcpu, unsigned long req)\n+{\n+\tswitch (req) {\n+\tcase H_REMOVE:\n+\t\treturn kvmppc_h_remove(vcpu, kvmppc_get_gpr(vcpu, 4),\n+\t\t\t\t kvmppc_get_gpr(vcpu, 5),\n+\t\t\t\t kvmppc_get_gpr(vcpu, 6));\n+\tcase H_ENTER:\n+\t\treturn kvmppc_h_enter(vcpu, kvmppc_get_gpr(vcpu, 4),\n+\t\t\t\t kvmppc_get_gpr(vcpu, 5),\n+\t\t\t\t kvmppc_get_gpr(vcpu, 6),\n+\t\t\t\t kvmppc_get_gpr(vcpu, 7));\n+\tcase H_READ:\n+\t\treturn kvmppc_h_read(vcpu, kvmppc_get_gpr(vcpu, 4),\n+\t\t\t\t kvmppc_get_gpr(vcpu, 5));\n+\tcase H_CLEAR_MOD:\n+\t\treturn kvmppc_h_clear_mod(vcpu, kvmppc_get_gpr(vcpu, 4),\n+\t\t\t\t\t kvmppc_get_gpr(vcpu, 5));\n+\tcase H_CLEAR_REF:\n+\t\treturn kvmppc_h_clear_ref(vcpu, kvmppc_get_gpr(vcpu, 4),\n+\t\t\t\t\t kvmppc_get_gpr(vcpu, 5));\n+\tcase H_PROTECT:\n+\t\treturn kvmppc_h_protect(vcpu, kvmppc_get_gpr(vcpu, 4),\n+\t\t\t\t\tkvmppc_get_gpr(vcpu, 5),\n+\t\t\t\t\tkvmppc_get_gpr(vcpu, 6));\n+\tcase H_BULK_REMOVE:\n+\t\treturn kvmppc_h_bulk_remove(vcpu);\n+\t}\n+\n+\treturn H_FUNCTION;\n+}\n+\n int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)\n {\n \tstruct kvm *kvm = vcpu-\u003ekvm;\n@@ -1174,47 +1210,17 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)\n \n \tswitch (req) {\n \tcase H_REMOVE:\n-\t\tret = kvmppc_h_remove(vcpu, kvmppc_get_gpr(vcpu, 4),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 5),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 6));\n-\t\tif (ret == H_TOO_HARD)\n-\t\t\treturn RESUME_HOST;\n-\t\tbreak;\n \tcase H_ENTER:\n-\t\tret = kvmppc_h_enter(vcpu, kvmppc_get_gpr(vcpu, 4),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 5),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 6),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 7));\n-\t\tif (ret == H_TOO_HARD)\n-\t\t\treturn RESUME_HOST;\n-\t\tbreak;\n \tcase H_READ:\n-\t\tret = kvmppc_h_read(vcpu, kvmppc_get_gpr(vcpu, 4),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 5));\n-\t\tif (ret == H_TOO_HARD)\n-\t\t\treturn RESUME_HOST;\n-\t\tbreak;\n \tcase H_CLEAR_MOD:\n-\t\tret = kvmppc_h_clear_mod(vcpu, kvmppc_get_gpr(vcpu, 4),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 5));\n-\t\tif (ret == H_TOO_HARD)\n-\t\t\treturn RESUME_HOST;\n-\t\tbreak;\n \tcase H_CLEAR_REF:\n-\t\tret = kvmppc_h_clear_ref(vcpu, kvmppc_get_gpr(vcpu, 4),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 5));\n-\t\tif (ret == H_TOO_HARD)\n-\t\t\treturn RESUME_HOST;\n-\t\tbreak;\n \tcase H_PROTECT:\n-\t\tret = kvmppc_h_protect(vcpu, kvmppc_get_gpr(vcpu, 4),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 5),\n-\t\t\t\t\tkvmppc_get_gpr(vcpu, 6));\n-\t\tif (ret == H_TOO_HARD)\n-\t\t\treturn RESUME_HOST;\n-\t\tbreak;\n \tcase H_BULK_REMOVE:\n-\t\tret = kvmppc_h_bulk_remove(vcpu);\n+\t\tpreempt_disable();\n+\t\tidx = srcu_read_lock(\u0026kvm-\u003esrcu);\n+\t\tret = kvmppc_pseries_do_hpt_hcall(vcpu, req);\n+\t\tsrcu_read_unlock(\u0026kvm-\u003esrcu, idx);\n+\t\tpreempt_enable();\n \t\tif (ret == H_TOO_HARD)\n \t\t\treturn RESUME_HOST;\n \t\tbreak;\n@@ -1834,8 +1840,10 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,\n \t\telse\n \t\t\tvsid = vcpu-\u003earch.fault_gpa;\n \n+\t\tpreempt_disable();\n \t\terr = kvmppc_hpte_hv_fault(vcpu, vcpu-\u003earch.fault_dar,\n \t\t\t\tvsid, vcpu-\u003earch.fault_dsisr, true);\n+\t\tpreempt_enable();\n \t\tif (err == 0) {\n \t\t\tr = RESUME_GUEST;\n \t\t} else if (err == -1 || err == -2) {\n@@ -1881,8 +1889,10 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,\n \t\telse\n \t\t\tvsid = vcpu-\u003earch.fault_gpa;\n \n+\t\tpreempt_disable();\n \t\terr = kvmppc_hpte_hv_fault(vcpu, vcpu-\u003earch.fault_dar,\n \t\t\t\tvsid, vcpu-\u003earch.fault_dsisr, false);\n+\t\tpreempt_enable();\n \t\tif (err == 0) {\n \t\t\tr = RESUME_GUEST;\n \t\t} else if (err == -1) {\ndiff --git a/arch/powerpc/kvm/book3s_paired_singles.c b/arch/powerpc/kvm/book3s_paired_singles.c\nindex bc39c76c9d9fe..532f96293de0f 100644\n--- a/arch/powerpc/kvm/book3s_paired_singles.c\n+++ b/arch/powerpc/kvm/book3s_paired_singles.c\n@@ -479,12 +479,7 @@ static bool kvmppc_inst_is_paired_single(struct kvm_vcpu *vcpu, u32 inst)\n \n static int get_d_signext(u32 inst)\n {\n-\tint d = inst \u0026 0x8ff;\n-\n-\tif (d \u0026 0x800)\n-\t\treturn -(d \u0026 0x7ff);\n-\n-\treturn (d \u0026 0x7ff);\n+\treturn sign_extend32(inst \u0026 0xfff, 11);\n }\n \n static int kvmppc_ps_three_in(struct kvm_vcpu *vcpu, bool rc,\n"
} |
| 2/1 | 2026/10/06 12:39 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch series modifies KVM code exclusively within arch/powerpc/ (specifically arch/powerpc/kvm/book3s_64_mmu_hv.c, arch/powerpc/kvm/book3s_hv.c, and arch/powerpc/kvm/book3s_paired_singles.c). These code paths are specific to the PowerPC architecture and are structurally unreachable and not compiled on the target architecture (amd64).",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 0d3e7200b619daf9d96fbcfd4eadcbe01f44b9fb
Author: syz-cluster <triage@syzkaller.com>
Date: Tue Oct 6 12:39:36 2026 +0000
syz-cluster: applied patch under review
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 2ccb3d138f46c..908495f2b001b 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
@@ -810,9 +810,11 @@ static void kvm_unmap_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn];
for (;;) {
+ preempt_disable();
lock_rmap(rmapp);
if (!(*rmapp & KVMPPC_RMAP_PRESENT)) {
unlock_rmap(rmapp);
+ preempt_enable();
break;
}
@@ -826,6 +828,7 @@ static void kvm_unmap_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) {
/* unlock rmap before spinning on the HPTE lock */
unlock_rmap(rmapp);
+ preempt_enable();
while (be64_to_cpu(hptep[0]) & HPTE_V_HVLOCK)
cpu_relax();
continue;
@@ -834,6 +837,7 @@ static void kvm_unmap_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
kvmppc_unmap_hpte(kvm, i, memslot, rmapp, gfn);
unlock_rmap(rmapp);
__unlock_hpte(hptep, be64_to_cpu(hptep[0]));
+ preempt_enable();
}
}
@@ -890,6 +894,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn];
retry:
+ preempt_disable();
lock_rmap(rmapp);
if (*rmapp & KVMPPC_RMAP_REFERENCED) {
*rmapp &= ~KVMPPC_RMAP_REFERENCED;
@@ -897,6 +902,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
}
if (!(*rmapp & KVMPPC_RMAP_PRESENT)) {
unlock_rmap(rmapp);
+ preempt_enable();
return ret;
}
@@ -912,6 +918,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) {
/* unlock rmap before spinning on the HPTE lock */
unlock_rmap(rmapp);
+ preempt_enable();
while (be64_to_cpu(hptep[0]) & HPTE_V_HVLOCK)
cpu_relax();
goto retry;
@@ -931,6 +938,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
} while ((i = j) != head);
unlock_rmap(rmapp);
+ preempt_enable();
return ret;
}
@@ -1219,6 +1227,7 @@ static unsigned long resize_hpt_rehash_hpte(struct kvm_resize_hpt *resize,
if (!(vpte & HPTE_V_VALID) && !(vpte & HPTE_V_ABSENT))
return 0; /* nothing to do */
+ preempt_disable();
while (!try_lock_hpte(hptep, HPTE_V_HVLOCK))
cpu_relax();
@@ -1346,6 +1355,7 @@ static unsigned long resize_hpt_rehash_hpte(struct kvm_resize_hpt *resize,
out:
unlock_hpte(hptep, vpte);
+ preempt_enable();
return ret;
}
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index de05d721edc4e..56083b415a29d 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1159,6 +1159,42 @@ static long kvmppc_h_rpt_invalidate(struct kvm_vcpu *vcpu,
return H_SUCCESS;
}
+/*
+ * Must be called with preemption disabled. The HPT hcall handlers spin
+ * on HPTE bit-locks and cannot make any blocking/sleeping calls.
+ */
+static long kvmppc_pseries_do_hpt_hcall(struct kvm_vcpu *vcpu, unsigned long req)
+{
+ switch (req) {
+ case H_REMOVE:
+ return kvmppc_h_remove(vcpu, kvmppc_get_gpr(vcpu, 4),
+ kvmppc_get_gpr(vcpu, 5),
+ kvmppc_get_gpr(vcpu, 6));
+ case H_ENTER:
+ return kvmppc_h_enter(vcpu, kvmppc_get_gpr(vcpu, 4),
+ kvmppc_get_gpr(vcpu, 5),
+ kvmppc_get_gpr(vcpu, 6),
+ kvmppc_get_gpr(vcpu, 7));
+ case H_READ:
+ return kvmppc_h_read(vcpu, kvmppc_get_gpr(vcpu, 4),
+ kvmppc_get_gpr(vcpu, 5));
+ case H_CLEAR_MOD:
+ return kvmppc_h_clear_mod(vcpu, kvmppc_get_gpr(vcpu, 4),
+ kvmppc_get_gpr(vcpu, 5));
+ case H_CLEAR_REF:
+ return kvmppc_h_clear_ref(vcpu, kvmppc_get_gpr(vcpu, 4),
+ kvmppc_get_gpr(vcpu, 5));
+ case H_PROTECT:
+ return kvmppc_h_protect(vcpu, kvmppc_get_gpr(vcpu, 4),
+ kvmppc_get_gpr(vcpu, 5),
+ kvmppc_get_gpr(vcpu, 6));
+ case H_BULK_REMOVE:
+ return kvmppc_h_bulk_remove(vcpu);
+ }
+
+ return H_FUNCTION;
+}
+
int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
{
struct kvm *kvm = vcpu->kvm;
@@ -1174,47 +1210,17 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
switch (req) {
case H_REMOVE:
- ret = kvmppc_h_remove(vcpu, kvmppc_get_gpr(vcpu, 4),
- kvmppc_get_gpr(vcpu, 5),
- kvmppc_get_gpr(vcpu, 6));
- if (ret == H_TOO_HARD)
- return RESUME_HOST;
- break;
case H_ENTER:
- ret = kvmppc_h_enter(vcpu, kvmppc_get_gpr(vcpu, 4),
- kvmppc_get_gpr(vcpu, 5),
- kvmppc_get_gpr(vcpu, 6),
- kvmppc_get_gpr(vcpu, 7));
- if (ret == H_TOO_HARD)
- return RESUME_HOST;
- break;
case H_READ:
- ret = kvmppc_h_read(vcpu, kvmppc_get_gpr(vcpu, 4),
- kvmppc_get_gpr(vcpu, 5));
- if (ret == H_TOO_HARD)
- return RESUME_HOST;
- break;
case H_CLEAR_MOD:
- ret = kvmppc_h_clear_mod(vcpu, kvmppc_get_gpr(vcpu, 4),
- kvmppc_get_gpr(vcpu, 5));
- if (ret == H_TOO_HARD)
- return RESUME_HOST;
- break;
case H_CLEAR_REF:
- ret = kvmppc_h_clear_ref(vcpu, kvmppc_get_gpr(vcpu, 4),
- kvmppc_get_gpr(vcpu, 5));
- if (ret == H_TOO_HARD)
- return RESUME_HOST;
- break;
case H_PROTECT:
- ret = kvmppc_h_protect(vcpu, kvmppc_get_gpr(vcpu, 4),
- kvmppc_get_gpr(vcpu, 5),
- kvmppc_get_gpr(vcpu, 6));
- if (ret == H_TOO_HARD)
- return RESUME_HOST;
- break;
case H_BULK_REMOVE:
- ret = kvmppc_h_bulk_remove(vcpu);
+ preempt_disable();
+ idx = srcu_read_lock(&kvm->srcu);
+ ret = kvmppc_pseries_do_hpt_hcall(vcpu, req);
+ srcu_read_unlock(&kvm->srcu, idx);
+ preempt_enable();
if (ret == H_TOO_HARD)
return RESUME_HOST;
break;
@@ -1834,8 +1840,10 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,
else
vsid = vcpu->arch.fault_gpa;
+ preempt_disable();
err = kvmppc_hpte_hv_fault(vcpu, vcpu->arch.fault_dar,
vsid, vcpu->arch.fault_dsisr, true);
+ preempt_enable();
if (err == 0) {
r = RESUME_GUEST;
} else if (err == -1 || err == -2) {
@@ -1881,8 +1889,10 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,
else
vsid = vcpu->arch.fault_gpa;
+ preempt_disable();
err = kvmppc_hpte_hv_fault(vcpu, vcpu->arch.fault_dar,
vsid, vcpu->arch.fault_dsisr, false);
+ preempt_enable();
if (err == 0) {
r = RESUME_GUEST;
} else if (err == -1) {
diff --git a/arch/powerpc/kvm/book3s_paired_singles.c b/arch/powerpc/kvm/book3s_paired_singles.c
index bc39c76c9d9fe..532f96293de0f 100644
--- a/arch/powerpc/kvm/book3s_paired_singles.c
+++ b/arch/powerpc/kvm/book3s_paired_singles.c
@@ -479,12 +479,7 @@ static bool kvmppc_inst_is_paired_single(struct kvm_vcpu *vcpu, u32 inst)
static int get_d_signext(u32 inst)
{
- int d = inst & 0x8ff;
-
- if (d & 0x800)
- return -(d & 0x7ff);
-
- return (d & 0x7ff);
+ return sign_extend32(inst & 0xfff, 11);
}
static int kvmppc_ps_three_in(struct kvm_vcpu *vcpu, bool rc,
|
| 3/2 | 2026/10/06 12:39 | llm | patch-evaluator |
1mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6216 output: 46 thoughts: 1299 Thoughts: **Patch Evaluation: Unreachable Code Paths** Okay, here's the deal. I need to determine if this kernel patch is worth fuzzing. It looks like standard code review for fuzzing triage, nothing inherently dangerous from a security perspective. The prompt mentions this is fuzzing triage. I see that the target architecture is amd64, which is crucial. First, I checked the modified files and, whoa, they're *all* in `arch/powerpc/kvm/`: `book3s_64_mmu_hv.c`, `book3s_hv.c`, and `book3s_paired_singles.c`. The instructions I have are very specific: I should only return `WorthFuzzing=false` if *all* modified code falls into certain categories, one of which is "code paths exclusive to architectures other than the target architecture". Now, the instructions are crystal clear. I need to confirm if *any* code from `arch/powerpc/` could possibly be relevant to an amd64 system. The patch modifies only files within the `arch/powerpc/` directory, which is *PowerPC* specific. There is no way these PowerPC-specific files could even be compiled or executed on amd64. Therefore, I can safely declare that all the modified code is unreachable on the target architecture. The prompt includes a full diff, confirming this. So, according to the instructions, the answer is clear. This patch touches unreachable code. Based on the rules and reachability being the primary concern, this is not worth fuzzing. I'm going to return `WorthFuzzing=false`. |
| 4/2 | 2026/10/06 12:40 | tool | read-file |
0mArgs:{
"File": "arch/powerpc/kvm/book3s_paired_singles.c",
"FirstLine": 475,
"LineCount": 15
}Results: {
"Contents": " 475:\t\t}\n 476:\t\n 477:\t\treturn false;\n 478:\t}\n 479:\t\n 480:\tstatic int get_d_signext(u32 inst)\n 481:\t{\n 482:\t\treturn sign_extend32(inst \u0026 0xfff, 11);\n 483:\t}\n 484:\t\n 485:\tstatic int kvmppc_ps_three_in(struct kvm_vcpu *vcpu, bool rc,\n 486:\t\t\t\t\t int reg_out, int reg_in1, int reg_in2,\n 487:\t\t\t\t\t int reg_in3, int scalar,\n 488:\t\t\t\t\t void (*func)(u64 *fpscr,\n 489:\t\t\t\t\t\t\t u32 *dst, u32 *src1,\n"
} |
| 5/2 | 2026/10/06 12:40 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8148 output: 131 thoughts: 308 Thoughts: **My Analysis of this Code Change** Okay, let's break this down. The commit touches `arch/powerpc/kvm/book3s_64_mmu_hv.c`, `arch/powerpc/kvm/book3s_hv.c`, and `arch/powerpc/kvm/book3s_paired_singles.c`. All those files live in `arch/powerpc/`, which immediately screams "PowerPC" to me. That's a huge red flag because the evaluation is targeting amd64. Essentially, this is all PowerPC-specific KVM code. Given the target is amd64, this code *cannot* be executed during fuzzing. The definition of `WorthFuzzing=false`, according to Section 2, includes "Unreachable execution paths" and explicitly mentions code paths exclusive to architectures other than the target. This definitely falls under that category. Therefore, `WorthFuzzing` should be false. We should also set `FocusSymbols` to an empty list, and `EnableConfigs` to an empty list, as no specific configurations are relevant here. I will document this reasoning as: "All changes are in arch/powerpc/kvm/, which is specific to PowerPC (ppc/ppc64) and not compiled or executed on the target architecture (amd64)." Time to `set-results`. |
| 6/2 | 2026/10/06 12:41 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch series modifies KVM code exclusively within arch/powerpc/ (specifically arch/powerpc/kvm/book3s_64_mmu_hv.c, arch/powerpc/kvm/book3s_hv.c, and arch/powerpc/kvm/book3s_paired_singles.c). These code paths are specific to the PowerPC architecture and are structurally unreachable and not compiled on the target architecture (amd64).",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch series modifies KVM code exclusively within arch/powerpc/ (specifically arch/powerpc/kvm/book3s_64_mmu_hv.c, arch/powerpc/kvm/book3s_hv.c, and arch/powerpc/kvm/book3s_paired_singles.c). These code paths are specific to the PowerPC architecture and are structurally unreachable and not compiled on the target architecture (amd64).",
"WorthFuzzing": false
} |
| 7/1 | 2026/10/06 12:41 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|