summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorGautam Menghani <gautam@linux.ibm.com>2026-11-06 13:37:42 +0530
committerMadhavan Srinivasan <maddy@linux.ibm.com>2026-11-21 13:16:05 +0530
commit0e3d5c0408262aef599df888e9bde88d0337c1dc (patch)
treeee22b865d81e1ec3241fa39e64046accf972c585 /rust/kernel/alloc
parent54efc2e1e9af9e3a14264db5686330e4fd477286 (diff)
KVM: PPC: Book3S HV: Use u8 to store guest's interrupt priorities
Interrupt priorities range from 0x00 - 0xFF. When represented as u32 by the host in kvm_rtas_set_xive(), the guest can pass in a higher priority number (eg: 0x1FF) which ends up breaking this check in kvmppc_xive_set_xive(): if (priority != MASKED) { mutex_lock(&xive->lock); rc = xive_check_provisioning(xive->kvm, xive_prio_from_guest(priority)); mutex_unlock(&xive->lock); } This results in an attempt to access invalid memory in the function xive_provision_queue(): struct xive_q *q = &xc->queues[prio]; // prio = 0xFF Fix this by converting the priority variable to u8. Fixes: 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller") Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com> Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com> Signed-off-by: Gautam Menghani <gautam@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions