Thread (76 messages) 76 messages, 6 authors, 2023-03-16

Re: [PATCH v9 24/27] virt: gunyah: Add proxy-scheduled vCPUs

From: Srivatsa Vaddagiri <hidden>
Date: 2023-02-10 06:54:57
Also in: linux-arm-msm, linux-devicetree, linux-doc, lkml

* Srivatsa Vaddagiri [off-list ref] [2023-02-09 16:10:06]:
* Elliot Berman [off-list ref] [2023-01-20 14:46:23]:
quoted
+static void gh_handle_mmio_return(struct gunyah_vcpu *vcpu, u64 *state)
+{
+	if (!vcpu->vcpu_run->mmio.is_write)
+		memcpy(&state[0], vcpu->vcpu_run->mmio.data, vcpu->vcpu_run->mmio.len);
Would be good to do a bound check on length of memcpy I think (in case 
vcpu_run_resp->state_data[1] is wrong for example).
Sorry I meant to comment that for the other memcpy you had!

+               memcpy(vcpu->vcpu_run->mmio.data, &vcpu_run_resp->state_data[2],
+                       vcpu_run_resp->state_data[1]);



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help