| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/28 11:40 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies ARM64 KVM virtual interrupt controller (VGIC) code in arch/arm64/kvm/vgic/ and adds a test case to user-space KVM selftests (tools/testing/selftests/). Since the target architecture is amd64, all modified kernel code paths are exclusive to the arm64 architecture and structurally unreachable on amd64.",
"WorthFuzzing": false
} |
| 1/1 | 2026/10/28 11:40 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit c6d1999846735fb5cb6b4926525cf60db43bc3fd\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Wed Oct 28 11:40:48 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/arch/arm64/kvm/vgic/vgic-mmio.c b/arch/arm64/kvm/vgic/vgic-mmio.c\nindex fddb9da0403d55..e42eb10d502b26 100644\n--- a/arch/arm64/kvm/vgic/vgic-mmio.c\n+++ b/arch/arm64/kvm/vgic/vgic-mmio.c\n@@ -350,11 +350,54 @@ static void __set_pending(struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len,\n \t}\n }\n \n+/*\n+ * If we are fiddling with an IRQ's active state, we have to make sure the IRQ\n+ * is not queued on some running VCPU's LRs, because then the change to the\n+ * active state can be overwritten when the VCPU's state is synced coming back\n+ * from the guest. Setting an IRQ pending also requires the target VCPU's LRs\n+ * to be synced first so that any prior ack in the LR is folded\n+ * before pending_latch is set.\n+ *\n+ * For shared interrupts as well as GICv3 private interrupts accessed from the\n+ * non-owning CPU, we have to stop all the VCPUs because interrupts can be\n+ * migrated while we don't hold the IRQ locks and we don't want to be chasing\n+ * moving targets.\n+ *\n+ * For GICv2 private interrupts we don't have to do anything because\n+ * userspace accesses to the VGIC state already require all VCPUs to be\n+ * stopped, and only the VCPU itself can modify its private interrupts\n+ * active state, which guarantees that the VCPU is not running.\n+ */\n+static void vgic_access_active_prepare(struct kvm_vcpu *vcpu, u32 intid)\n+{\n+\tif ((vcpu-\u003ekvm-\u003earch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 \u0026\u0026\n+\t vcpu != kvm_get_running_vcpu()) ||\n+\t intid \u003e= VGIC_NR_PRIVATE_IRQS)\n+\t\tkvm_arm_halt_guest(vcpu-\u003ekvm);\n+}\n+\n+/* See vgic_access_active_prepare */\n+static void vgic_access_active_finish(struct kvm_vcpu *vcpu, u32 intid)\n+{\n+\tif ((vcpu-\u003ekvm-\u003earch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 \u0026\u0026\n+\t vcpu != kvm_get_running_vcpu()) ||\n+\t intid \u003e= VGIC_NR_PRIVATE_IRQS)\n+\t\tkvm_arm_resume_guest(vcpu-\u003ekvm);\n+}\n+\n void vgic_mmio_write_spending(struct kvm_vcpu *vcpu,\n \t\t\t gpa_t addr, unsigned int len,\n \t\t\t unsigned long val)\n {\n+\tu32 intid = VGIC_ADDR_TO_INTID(addr, 1);\n+\n+\tmutex_lock(\u0026vcpu-\u003ekvm-\u003earch.config_lock);\n+\tvgic_access_active_prepare(vcpu, intid);\n+\n \t__set_pending(vcpu, addr, len, val, false);\n+\n+\tvgic_access_active_finish(vcpu, intid);\n+\tmutex_unlock(\u0026vcpu-\u003ekvm-\u003earch.config_lock);\n }\n \n int vgic_uaccess_write_spending(struct kvm_vcpu *vcpu,\n@@ -452,39 +495,6 @@ int vgic_uaccess_write_cpending(struct kvm_vcpu *vcpu,\n \treturn 0;\n }\n \n-/*\n- * If we are fiddling with an IRQ's active state, we have to make sure the IRQ\n- * is not queued on some running VCPU's LRs, because then the change to the\n- * active state can be overwritten when the VCPU's state is synced coming back\n- * from the guest.\n- *\n- * For shared interrupts as well as GICv3 private interrupts accessed from the\n- * non-owning CPU, we have to stop all the VCPUs because interrupts can be\n- * migrated while we don't hold the IRQ locks and we don't want to be chasing\n- * moving targets.\n- *\n- * For GICv2 private interrupts we don't have to do anything because\n- * userspace accesses to the VGIC state already require all VCPUs to be\n- * stopped, and only the VCPU itself can modify its private interrupts\n- * active state, which guarantees that the VCPU is not running.\n- */\n-static void vgic_access_active_prepare(struct kvm_vcpu *vcpu, u32 intid)\n-{\n-\tif ((vcpu-\u003ekvm-\u003earch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 \u0026\u0026\n-\t vcpu != kvm_get_running_vcpu()) ||\n-\t intid \u003e= VGIC_NR_PRIVATE_IRQS)\n-\t\tkvm_arm_halt_guest(vcpu-\u003ekvm);\n-}\n-\n-/* See vgic_access_active_prepare */\n-static void vgic_access_active_finish(struct kvm_vcpu *vcpu, u32 intid)\n-{\n-\tif ((vcpu-\u003ekvm-\u003earch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 \u0026\u0026\n-\t vcpu != kvm_get_running_vcpu()) ||\n-\t intid \u003e= VGIC_NR_PRIVATE_IRQS)\n-\t\tkvm_arm_resume_guest(vcpu-\u003ekvm);\n-}\n-\n static unsigned long __vgic_mmio_read_active(struct kvm_vcpu *vcpu,\n \t\t\t\t\t gpa_t addr, unsigned int len)\n {\ndiff --git a/arch/arm64/kvm/vgic/vgic-v2.c b/arch/arm64/kvm/vgic/vgic-v2.c\nindex 7182f63fc9382c..f3ba3177dd97b6 100644\n--- a/arch/arm64/kvm/vgic/vgic-v2.c\n+++ b/arch/arm64/kvm/vgic/vgic-v2.c\n@@ -57,7 +57,7 @@ static void vgic_v2_fold_lr(struct kvm_vcpu *vcpu, u32 val)\n {\n \tu32 cpuid, intid = val \u0026 GICH_LR_VIRTUALID;\n \tstruct vgic_irq *irq;\n-\tbool deactivated;\n+\tbool deactivated, was_active;\n \n \t/* Extract the source vCPU id from the LR */\n \tcpuid = FIELD_GET(GICH_LR_PHYSID_CPUID, val) \u0026 7;\n@@ -71,7 +71,8 @@ static void vgic_v2_fold_lr(struct kvm_vcpu *vcpu, u32 val)\n \n \tscoped_guard(raw_spinlock, \u0026irq-\u003eirq_lock) {\n \t\t/* Always preserve the active bit, note deactivation */\n-\t\tdeactivated = irq-\u003eactive \u0026\u0026 !(val \u0026 GICH_LR_ACTIVE_BIT);\n+\t\twas_active = irq-\u003eactive;\n+\t\tdeactivated = was_active \u0026\u0026 !(val \u0026 GICH_LR_ACTIVE_BIT);\n \t\tirq-\u003eactive = !!(val \u0026 GICH_LR_ACTIVE_BIT);\n \n \t\tif (irq-\u003eactive \u0026\u0026 vgic_irq_is_sgi(intid))\n@@ -88,8 +89,11 @@ static void vgic_v2_fold_lr(struct kvm_vcpu *vcpu, u32 val)\n \n \t\t/*\n \t\t * Clear soft pending state when level irqs have been acked.\n+\t\t * A latch written while the irq was active is a new pending\n+\t\t * state and was not represented in the LR, so preserve it.\n \t\t */\n-\t\tif (irq-\u003econfig == VGIC_CONFIG_LEVEL \u0026\u0026 !(val \u0026 GICH_LR_STATE))\n+\t\tif (irq-\u003econfig == VGIC_CONFIG_LEVEL \u0026\u0026\n+\t\t !(val \u0026 GICH_LR_PENDING_BIT) \u0026\u0026 !was_active)\n \t\t\tirq-\u003epending_latch = false;\n \n \t\t/* Handle resampling for mapped interrupts if required */\ndiff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c\nindex 726e20a1da6e72..4d802fc9c6dd58 100644\n--- a/arch/arm64/kvm/vgic/vgic-v3.c\n+++ b/arch/arm64/kvm/vgic/vgic-v3.c\n@@ -75,7 +75,7 @@ static void vgic_v3_fold_lr(struct kvm_vcpu *vcpu, u64 val)\n {\n \tstruct vgic_irq *irq;\n \tbool is_v2_sgi = false;\n-\tbool deactivated;\n+\tbool deactivated, was_active;\n \tu32 intid;\n \n \tif (vcpu-\u003ekvm-\u003earch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) {\n@@ -93,7 +93,8 @@ static void vgic_v3_fold_lr(struct kvm_vcpu *vcpu, u64 val)\n \t\t/* Always preserve the active bit for !LPIs, note deactivation */\n \t\tif (irq-\u003eintid \u003e= VGIC_MIN_LPI)\n \t\t\tval \u0026= ~ICH_LR_ACTIVE_BIT;\n-\t\tdeactivated = irq-\u003eactive \u0026\u0026 !(val \u0026 ICH_LR_ACTIVE_BIT);\n+\t\twas_active = irq-\u003eactive;\n+\t\tdeactivated = was_active \u0026\u0026 !(val \u0026 ICH_LR_ACTIVE_BIT);\n \t\tirq-\u003eactive = !!(val \u0026 ICH_LR_ACTIVE_BIT);\n \n \t\t/* Edge is the only case where we preserve the pending bit */\n@@ -103,8 +104,11 @@ static void vgic_v3_fold_lr(struct kvm_vcpu *vcpu, u64 val)\n \n \t\t/*\n \t\t * Clear soft pending state when level irqs have been acked.\n+\t\t * A latch written while the irq was active is a new pending\n+\t\t * state and was not represented in the LR, so preserve it.\n \t\t */\n-\t\tif (irq-\u003econfig == VGIC_CONFIG_LEVEL \u0026\u0026 !(val \u0026 ICH_LR_STATE))\n+\t\tif (irq-\u003econfig == VGIC_CONFIG_LEVEL \u0026\u0026\n+\t\t !(val \u0026 ICH_LR_PENDING_BIT) \u0026\u0026 !was_active)\n \t\t\tirq-\u003epending_latch = false;\n \n \t\tif (is_v2_sgi) {\ndiff --git a/tools/testing/selftests/kvm/arm64/vgic_irq.c b/tools/testing/selftests/kvm/arm64/vgic_irq.c\nindex 3cb85932ee85cb..83091e0384c224 100644\n--- a/tools/testing/selftests/kvm/arm64/vgic_irq.c\n+++ b/tools/testing/selftests/kvm/arm64/vgic_irq.c\n@@ -959,6 +959,145 @@ static void guest_code_timer_spi(struct test_args *args, int cpuid)\n \tGUEST_DONE();\n }\n \n+#define REPEND_READ\t\t1\n+#define REPEND_READ_DONE\t2\n+#define REPEND_WRITE\t\t3\n+#define REPEND_PRE_ACK\t\t4\n+#define REPEND_PRE_ACK_DONE\t5\n+\n+/*\n+ * A level-sensitive SPI that is set pending through GICD_ISPENDR stays\n+ * pending for every vCPU until it is acked. If it is set pending again while\n+ * it is active, it becomes active and pending and must be taken a second time\n+ * once it has been deactivated. The second pending state comes from the vCPU\n+ * that handles the interrupt in the first round, and from the other vCPU in\n+ * the second. A remote GICD_ISPENDR write before the interrupt is acked merges\n+ * with the initial pending state without causing a second delivery.\n+ */\n+static void guest_code_level_repend(struct test_args *args, int cpuid)\n+{\n+\tint i;\n+\n+\tgic_init(GIC_V3, 2);\n+\n+\tgic_set_eoi_split(1);\n+\tgic_set_priority_mask(CPU_PRIO_MASK);\n+\n+\tif (cpuid == 0) {\n+\t\tu32 intid;\n+\n+\t\tlocal_irq_disable();\n+\n+\t\tgic_irq_set_config(MIN_SPI, false);\n+\t\tgic_set_priority(MIN_SPI, IRQ_DEFAULT_PRIO);\n+\t\tgic_irq_enable(MIN_SPI);\n+\n+\t\tfor (i = 0; i \u003c 2; i++) {\n+\t\t\tgic_irq_set_pending(MIN_SPI);\n+\n+\t\t\tif (i == 1) {\n+\t\t\t\t/* Not acked yet: the other vCPU sees it pending */\n+\t\t\t\tWRITE_ONCE(args-\u003eshared_data, REPEND_READ);\n+\t\t\t\tdsb(ishst);\n+\n+\t\t\t\tdo {\n+\t\t\t\t\tdsb(ishld);\n+\t\t\t\t} while (READ_ONCE(args-\u003eshared_data) != REPEND_READ_DONE);\n+\t\t\t}\n+\n+\t\t\tGUEST_ASSERT(gic_irq_get_pending(MIN_SPI));\n+\t\t\tintid = wait_for_and_activate_irq();\n+\t\t\tGUEST_ASSERT_EQ(intid, MIN_SPI);\n+\n+\t\t\tif (i == 0) {\n+\t\t\t\tgic_irq_set_pending(MIN_SPI);\n+\t\t\t} else {\n+\t\t\t\tWRITE_ONCE(args-\u003eshared_data, REPEND_WRITE);\n+\t\t\t\tdsb(ishst);\n+\n+\t\t\t\tdo {\n+\t\t\t\t\tdsb(ishld);\n+\t\t\t\t} while (READ_ONCE(args-\u003eshared_data) == REPEND_WRITE);\n+\t\t\t}\n+\n+\t\t\tGUEST_ASSERT(gic_irq_get_active(MIN_SPI));\n+\t\t\tgic_set_eoi(intid);\n+\t\t\tgic_set_dir(intid);\n+\t\t\tisb();\n+\n+\t\t\t/* The second pending state must not have been lost */\n+\t\t\tGUEST_ASSERT(gic_irq_get_pending(MIN_SPI));\n+\t\t\tintid = wait_for_and_activate_irq();\n+\t\t\tGUEST_ASSERT_EQ(intid, MIN_SPI);\n+\n+\t\t\tgic_set_eoi(intid);\n+\t\t\tgic_set_dir(intid);\n+\t\t\tisb();\n+\n+\t\t\tGUEST_ASSERT(!gic_irq_get_active(MIN_SPI));\n+\t\t\tGUEST_ASSERT(!gic_irq_get_pending(MIN_SPI));\n+\t\t\tGUEST_ASSERT_EQ(gic_get_and_ack_irq(), IAR_SPURIOUS);\n+\t\t}\n+\n+\t\t/*\n+\t\t * A remote ISPENDR write before the interrupt is acked merges\n+\t\t * with the initial pending state and must not cause a second\n+\t\t * delivery after deactivation.\n+\t\t */\n+\t\tgic_irq_set_pending(MIN_SPI);\n+\n+\t\tWRITE_ONCE(args-\u003eshared_data, REPEND_PRE_ACK);\n+\t\tdsb(ishst);\n+\n+\t\tdo {\n+\t\t\tdsb(ishld);\n+\t\t} while (READ_ONCE(args-\u003eshared_data) != REPEND_PRE_ACK_DONE);\n+\n+\t\tGUEST_ASSERT(gic_irq_get_pending(MIN_SPI));\n+\t\tintid = wait_for_and_activate_irq();\n+\t\tGUEST_ASSERT_EQ(intid, MIN_SPI);\n+\n+\t\tgic_set_eoi(intid);\n+\t\tgic_set_dir(intid);\n+\t\tisb();\n+\n+\t\tGUEST_ASSERT(!gic_irq_get_active(MIN_SPI));\n+\t\tGUEST_ASSERT(!gic_irq_get_pending(MIN_SPI));\n+\t\tGUEST_ASSERT_EQ(gic_get_and_ack_irq(), IAR_SPURIOUS);\n+\t} else {\n+\t\tdo {\n+\t\t\tdsb(ishld);\n+\t\t} while (READ_ONCE(args-\u003eshared_data) != REPEND_READ);\n+\n+\t\tfor (i = 0; i \u003c 64; i++)\n+\t\t\tGUEST_ASSERT(gic_irq_get_pending(MIN_SPI));\n+\n+\t\tWRITE_ONCE(args-\u003eshared_data, REPEND_READ_DONE);\n+\t\tdsb(ishst);\n+\n+\t\tdo {\n+\t\t\tdsb(ishld);\n+\t\t} while (READ_ONCE(args-\u003eshared_data) != REPEND_WRITE);\n+\n+\t\tgic_irq_set_pending(MIN_SPI);\n+\n+\t\tWRITE_ONCE(args-\u003eshared_data, 0);\n+\t\tdsb(ishst);\n+\n+\t\tdo {\n+\t\t\tdsb(ishld);\n+\t\t} while (READ_ONCE(args-\u003eshared_data) != REPEND_PRE_ACK);\n+\n+\t\tGUEST_ASSERT(gic_irq_get_pending(MIN_SPI));\n+\t\tgic_irq_set_pending(MIN_SPI);\n+\n+\t\tWRITE_ONCE(args-\u003eshared_data, REPEND_PRE_ACK_DONE);\n+\t\tdsb(ishst);\n+\t}\n+\n+\tGUEST_DONE();\n+}\n+\n static void *test_vcpu_run(void *arg)\n {\n \tstruct kvm_vcpu *vcpu = arg;\n@@ -1073,6 +1212,7 @@ int main(int argc, char **argv)\n \t\ttest_vgic_two_cpus(guest_code_asym_dir);\n \t\ttest_vgic_two_cpus(guest_code_group_en);\n \t\ttest_vgic_two_cpus(guest_code_timer_spi);\n+\t\ttest_vgic_two_cpus(guest_code_level_repend);\n \t} else {\n \t\ttest_vgic(nr_irqs, level_sensitive, eoi_split);\n \t}\n"
} |
| 2/1 | 2026/10/28 11:40 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies ARM64 KVM virtual interrupt controller (VGIC) code in arch/arm64/kvm/vgic/ and adds a test case to user-space KVM selftests (tools/testing/selftests/). Since the target architecture is amd64, all modified kernel code paths are exclusive to the arm64 architecture and structurally unreachable on 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 c6d1999846735fb5cb6b4926525cf60db43bc3fd
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Oct 28 11:40:48 2026 +0000
syz-cluster: applied patch under review
diff --git a/arch/arm64/kvm/vgic/vgic-mmio.c b/arch/arm64/kvm/vgic/vgic-mmio.c
index fddb9da0403d55..e42eb10d502b26 100644
--- a/arch/arm64/kvm/vgic/vgic-mmio.c
+++ b/arch/arm64/kvm/vgic/vgic-mmio.c
@@ -350,11 +350,54 @@ static void __set_pending(struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len,
}
}
+/*
+ * If we are fiddling with an IRQ's active state, we have to make sure the IRQ
+ * is not queued on some running VCPU's LRs, because then the change to the
+ * active state can be overwritten when the VCPU's state is synced coming back
+ * from the guest. Setting an IRQ pending also requires the target VCPU's LRs
+ * to be synced first so that any prior ack in the LR is folded
+ * before pending_latch is set.
+ *
+ * For shared interrupts as well as GICv3 private interrupts accessed from the
+ * non-owning CPU, we have to stop all the VCPUs because interrupts can be
+ * migrated while we don't hold the IRQ locks and we don't want to be chasing
+ * moving targets.
+ *
+ * For GICv2 private interrupts we don't have to do anything because
+ * userspace accesses to the VGIC state already require all VCPUs to be
+ * stopped, and only the VCPU itself can modify its private interrupts
+ * active state, which guarantees that the VCPU is not running.
+ */
+static void vgic_access_active_prepare(struct kvm_vcpu *vcpu, u32 intid)
+{
+ if ((vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 &&
+ vcpu != kvm_get_running_vcpu()) ||
+ intid >= VGIC_NR_PRIVATE_IRQS)
+ kvm_arm_halt_guest(vcpu->kvm);
+}
+
+/* See vgic_access_active_prepare */
+static void vgic_access_active_finish(struct kvm_vcpu *vcpu, u32 intid)
+{
+ if ((vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 &&
+ vcpu != kvm_get_running_vcpu()) ||
+ intid >= VGIC_NR_PRIVATE_IRQS)
+ kvm_arm_resume_guest(vcpu->kvm);
+}
+
void vgic_mmio_write_spending(struct kvm_vcpu *vcpu,
gpa_t addr, unsigned int len,
unsigned long val)
{
+ u32 intid = VGIC_ADDR_TO_INTID(addr, 1);
+
+ mutex_lock(&vcpu->kvm->arch.config_lock);
+ vgic_access_active_prepare(vcpu, intid);
+
__set_pending(vcpu, addr, len, val, false);
+
+ vgic_access_active_finish(vcpu, intid);
+ mutex_unlock(&vcpu->kvm->arch.config_lock);
}
int vgic_uaccess_write_spending(struct kvm_vcpu *vcpu,
@@ -452,39 +495,6 @@ int vgic_uaccess_write_cpending(struct kvm_vcpu *vcpu,
return 0;
}
-/*
- * If we are fiddling with an IRQ's active state, we have to make sure the IRQ
- * is not queued on some running VCPU's LRs, because then the change to the
- * active state can be overwritten when the VCPU's state is synced coming back
- * from the guest.
- *
- * For shared interrupts as well as GICv3 private interrupts accessed from the
- * non-owning CPU, we have to stop all the VCPUs because interrupts can be
- * migrated while we don't hold the IRQ locks and we don't want to be chasing
- * moving targets.
- *
- * For GICv2 private interrupts we don't have to do anything because
- * userspace accesses to the VGIC state already require all VCPUs to be
- * stopped, and only the VCPU itself can modify its private interrupts
- * active state, which guarantees that the VCPU is not running.
- */
-static void vgic_access_active_prepare(struct kvm_vcpu *vcpu, u32 intid)
-{
- if ((vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 &&
- vcpu != kvm_get_running_vcpu()) ||
- intid >= VGIC_NR_PRIVATE_IRQS)
- kvm_arm_halt_guest(vcpu->kvm);
-}
-
-/* See vgic_access_active_prepare */
-static void vgic_access_active_finish(struct kvm_vcpu *vcpu, u32 intid)
-{
- if ((vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 &&
- vcpu != kvm_get_running_vcpu()) ||
- intid >= VGIC_NR_PRIVATE_IRQS)
- kvm_arm_resume_guest(vcpu->kvm);
-}
-
static unsigned long __vgic_mmio_read_active(struct kvm_vcpu *vcpu,
gpa_t addr, unsigned int len)
{
diff --git a/arch/arm64/kvm/vgic/vgic-v2.c b/arch/arm64/kvm/vgic/vgic-v2.c
index 7182f63fc9382c..f3ba3177dd97b6 100644
--- a/arch/arm64/kvm/vgic/vgic-v2.c
+++ b/arch/arm64/kvm/vgic/vgic-v2.c
@@ -57,7 +57,7 @@ static void vgic_v2_fold_lr(struct kvm_vcpu *vcpu, u32 val)
{
u32 cpuid, intid = val & GICH_LR_VIRTUALID;
struct vgic_irq *irq;
- bool deactivated;
+ bool deactivated, was_active;
/* Extract the source vCPU id from the LR */
cpuid = FIELD_GET(GICH_LR_PHYSID_CPUID, val) & 7;
@@ -71,7 +71,8 @@ static void vgic_v2_fold_lr(struct kvm_vcpu *vcpu, u32 val)
scoped_guard(raw_spinlock, &irq->irq_lock) {
/* Always preserve the active bit, note deactivation */
- deactivated = irq->active && !(val & GICH_LR_ACTIVE_BIT);
+ was_active = irq->active;
+ deactivated = was_active && !(val & GICH_LR_ACTIVE_BIT);
irq->active = !!(val & GICH_LR_ACTIVE_BIT);
if (irq->active && vgic_irq_is_sgi(intid))
@@ -88,8 +89,11 @@ static void vgic_v2_fold_lr(struct kvm_vcpu *vcpu, u32 val)
/*
* Clear soft pending state when level irqs have been acked.
+ * A latch written while the irq was active is a new pending
+ * state and was not represented in the LR, so preserve it.
*/
- if (irq->config == VGIC_CONFIG_LEVEL && !(val & GICH_LR_STATE))
+ if (irq->config == VGIC_CONFIG_LEVEL &&
+ !(val & GICH_LR_PENDING_BIT) && !was_active)
irq->pending_latch = false;
/* Handle resampling for mapped interrupts if required */
diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c
index 726e20a1da6e72..4d802fc9c6dd58 100644
--- a/arch/arm64/kvm/vgic/vgic-v3.c
+++ b/arch/arm64/kvm/vgic/vgic-v3.c
@@ -75,7 +75,7 @@ static void vgic_v3_fold_lr(struct kvm_vcpu *vcpu, u64 val)
{
struct vgic_irq *irq;
bool is_v2_sgi = false;
- bool deactivated;
+ bool deactivated, was_active;
u32 intid;
if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) {
@@ -93,7 +93,8 @@ static void vgic_v3_fold_lr(struct kvm_vcpu *vcpu, u64 val)
/* Always preserve the active bit for !LPIs, note deactivation */
if (irq->intid >= VGIC_MIN_LPI)
val &= ~ICH_LR_ACTIVE_BIT;
- deactivated = irq->active && !(val & ICH_LR_ACTIVE_BIT);
+ was_active = irq->active;
+ deactivated = was_active && !(val & ICH_LR_ACTIVE_BIT);
irq->active = !!(val & ICH_LR_ACTIVE_BIT);
/* Edge is the only case where we preserve the pending bit */
@@ -103,8 +104,11 @@ static void vgic_v3_fold_lr(struct kvm_vcpu *vcpu, u64 val)
/*
* Clear soft pending state when level irqs have been acked.
+ * A latch written while the irq was active is a new pending
+ * state and was not represented in the LR, so preserve it.
*/
- if (irq->config == VGIC_CONFIG_LEVEL && !(val & ICH_LR_STATE))
+ if (irq->config == VGIC_CONFIG_LEVEL &&
+ !(val & ICH_LR_PENDING_BIT) && !was_active)
irq->pending_latch = false;
if (is_v2_sgi) {
diff --git a/tools/testing/selftests/kvm/arm64/vgic_irq.c b/tools/testing/selftests/kvm/arm64/vgic_irq.c
index 3cb85932ee85cb..83091e0384c224 100644
--- a/tools/testing/selftests/kvm/arm64/vgic_irq.c
+++ b/tools/testing/selftests/kvm/arm64/vgic_irq.c
@@ -959,6 +959,145 @@ static void guest_code_timer_spi(struct test_args *args, int cpuid)
GUEST_DONE();
}
+#define REPEND_READ 1
+#define REPEND_READ_DONE 2
+#define REPEND_WRITE 3
+#define REPEND_PRE_ACK 4
+#define REPEND_PRE_ACK_DONE 5
+
+/*
+ * A level-sensitive SPI that is set pending through GICD_ISPENDR stays
+ * pending for every vCPU until it is acked. If it is set pending again while
+ * it is active, it becomes active and pending and must be taken a second time
+ * once it has been deactivated. The second pending state comes from the vCPU
+ * that handles the interrupt in the first round, and from the other vCPU in
+ * the second. A remote GICD_ISPENDR write before the interrupt is acked merges
+ * with the initial pending state without causing a second delivery.
+ */
+static void guest_code_level_repend(struct test_args *args, int cpuid)
+{
+ int i;
+
+ gic_init(GIC_V3, 2);
+
+ gic_set_eoi_split(1);
+ gic_set_priority_mask(CPU_PRIO_MASK);
+
+ if (cpuid == 0) {
+ u32 intid;
+
+ local_irq_disable();
+
+ gic_irq_set_config(MIN_SPI, false);
+ gic_set_priority(MIN_SPI, IRQ_DEFAULT_PRIO);
+ gic_irq_enable(MIN_SPI);
+
+ for (i = 0; i < 2; i++) {
+ gic_irq_set_pending(MIN_SPI);
+
+ if (i == 1) {
+ /* Not acked yet: the other vCPU sees it pending */
+ WRITE_ONCE(args->shared_data, REPEND_READ);
+ dsb(ishst);
+
+ do {
+ dsb(ishld);
+ } while (READ_ONCE(args->shared_data) != REPEND_READ_DONE);
+ }
+
+ GUEST_ASSERT(gic_irq_get_pending(MIN_SPI));
+ intid = wait_for_and_activate_irq();
+ GUEST_ASSERT_EQ(intid, MIN_SPI);
+
+ if (i == 0) {
+ gic_irq_set_pending(MIN_SPI);
+ } else {
+ WRITE_ONCE(args->shared_data, REPEND_WRITE);
+ dsb(ishst);
+
+ do {
+ dsb(ishld);
+ } while (READ_ONCE(args->shared_data) == REPEND_WRITE);
+ }
+
+ GUEST_ASSERT(gic_irq_get_active(MIN_SPI));
+ gic_set_eoi(intid);
+ gic_set_dir(intid);
+ isb();
+
+ /* The second pending state must not have been lost */
+ GUEST_ASSERT(gic_irq_get_pending(MIN_SPI));
+ intid = wait_for_and_activate_irq();
+ GUEST_ASSERT_EQ(intid, MIN_SPI);
+
+ gic_set_eoi(intid);
+ gic_set_dir(intid);
+ isb();
+
+ GUEST_ASSERT(!gic_irq_get_active(MIN_SPI));
+ GUEST_ASSERT(!gic_irq_get_pending(MIN_SPI));
+ GUEST_ASSERT_EQ(gic_get_and_ack_irq(), IAR_SPURIOUS);
+ }
+
+ /*
+ * A remote ISPENDR write before the interrupt is acked merges
+ * with the initial pending state and must not cause a second
+ * delivery after deactivation.
+ */
+ gic_irq_set_pending(MIN_SPI);
+
+ WRITE_ONCE(args->shared_data, REPEND_PRE_ACK);
+ dsb(ishst);
+
+ do {
+ dsb(ishld);
+ } while (READ_ONCE(args->shared_data) != REPEND_PRE_ACK_DONE);
+
+ GUEST_ASSERT(gic_irq_get_pending(MIN_SPI));
+ intid = wait_for_and_activate_irq();
+ GUEST_ASSERT_EQ(intid, MIN_SPI);
+
+ gic_set_eoi(intid);
+ gic_set_dir(intid);
+ isb();
+
+ GUEST_ASSERT(!gic_irq_get_active(MIN_SPI));
+ GUEST_ASSERT(!gic_irq_get_pending(MIN_SPI));
+ GUEST_ASSERT_EQ(gic_get_and_ack_irq(), IAR_SPURIOUS);
+ } else {
+ do {
+ dsb(ishld);
+ } while (READ_ONCE(args->shared_data) != REPEND_READ);
+
+ for (i = 0; i < 64; i++)
+ GUEST_ASSERT(gic_irq_get_pending(MIN_SPI));
+
+ WRITE_ONCE(args->shared_data, REPEND_READ_DONE);
+ dsb(ishst);
+
+ do {
+ dsb(ishld);
+ } while (READ_ONCE(args->shared_data) != REPEND_WRITE);
+
+ gic_irq_set_pending(MIN_SPI);
+
+ WRITE_ONCE(args->shared_data, 0);
+ dsb(ishst);
+
+ do {
+ dsb(ishld);
+ } while (READ_ONCE(args->shared_data) != REPEND_PRE_ACK);
+
+ GUEST_ASSERT(gic_irq_get_pending(MIN_SPI));
+ gic_irq_set_pending(MIN_SPI);
+
+ WRITE_ONCE(args->shared_data, REPEND_PRE_ACK_DONE);
+ dsb(ishst);
+ }
+
+ GUEST_DONE();
+}
+
static void *test_vcpu_run(void *arg)
{
struct kvm_vcpu *vcpu = arg;
@@ -1073,6 +1212,7 @@ int main(int argc, char **argv)
test_vgic_two_cpus(guest_code_asym_dir);
test_vgic_two_cpus(guest_code_group_en);
test_vgic_two_cpus(guest_code_timer_spi);
+ test_vgic_two_cpus(guest_code_level_repend);
} else {
test_vgic(nr_irqs, level_sensitive, eoi_split);
}
|
| 3/2 | 2026/10/28 11:40 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7458 output: 113 thoughts: 1653 Thoughts: **Analysis of the Patch: WorthFuzzing = False** Okay, let's break this down. The prompt clearly states the "Target architecture: amd64," so that's the key. Looking at the patch, the modified files are exclusively within `arch/arm64/kvm/vgic/` and `tools/testing/selftests/kvm/arm64/`. This immediately raises a red flag. The kernel code in `arch/arm64/` is, by definition, specific to the ARM64 architecture. Similarly, the `tools/testing/selftests` directory indicates user-space selftests. Now, let's consult the "negative criteria" for determining `WorthFuzzing=false`. The relevant bullet point is clear: "Code paths exclusive to architectures other than the target architecture." Bingo. These changes are in code paths exclusive to ARM64, and therefore unreachable on an amd64 target. Furthermore, `tools/testing/selftests` are user-space tests, which fall under the category of "Non-kernel and non-executable changes" and "do not affect the compiled kernel image (vmlinux) or kernel modules". I double-checked: `arch/arm64/kvm/vgic/*` is only compiled when the kernel is configured for ARM64 (CONFIG_ARM64). On amd64, KVM uses the `arch/x86/kvm/` implementation. There's no possible scenario where this ARM64 code would be built or executed on the specified target. I've confirmed by examining the diff that those are the *only* files modified. The conclusion is straightforward: the modified code is structurally unreachable on the amd64 target, so `WorthFuzzing` must be `false`. Here's the reasoning for the output: "The patch modifies ARM-specific KVM VGIC code in arch/arm64/kvm/vgic/ and an arm64 KVM selftest in tools/testing/selftests/. Because the target architecture is amd64, all modified kernel code paths are exclusive to arm64 and structurally unreachable on amd64, and the remaining changes are in user-space selftests." |
| 4/2 | 2026/10/28 11:41 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies ARM64 KVM virtual interrupt controller (VGIC) code in arch/arm64/kvm/vgic/ and adds a test case to user-space KVM selftests (tools/testing/selftests/). Since the target architecture is amd64, all modified kernel code paths are exclusive to the arm64 architecture and structurally unreachable on amd64.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies ARM64 KVM virtual interrupt controller (VGIC) code in arch/arm64/kvm/vgic/ and adds a test case to user-space KVM selftests (tools/testing/selftests/). Since the target architecture is amd64, all modified kernel code paths are exclusive to the arm64 architecture and structurally unreachable on amd64.",
"WorthFuzzing": false
} |
| 5/1 | 2026/10/28 11: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) |
|---|