Thread (4 messages) read the whole thread 4 messages, 2 authors, 2021-03-05

RE: [PATCH v8 1/6] arm64: hyperv: Add Hyper-V hypercall and register access utilities

From: Sunil Muthuswamy <hidden>
Date: 2021-03-03 20:58:19
Also in: linux-efi, linux-hyperv, lkml

quoted
+
+	/*
+	 * Allocate a power of 2 size so alignment to that size is
+	 * guaranteed, since the hypercall input and output areas
+	 * must not cross a page boundary.
+	 */
+	input = kzalloc(roundup_pow_of_two(sizeof(input->header) +
+				sizeof(input->element[0])), GFP_ATOMIC);
+	output = kmalloc(roundup_pow_of_two(sizeof(*output)), GFP_ATOMIC);
+
Check for null from these malloc routines? Here and in other places.
Between, is there a plan to setup a percpu input/output page for hypercall
input/output on ARM (like we do for x64)? I didn't check the specific size requirement
for this particular call, but, that generally will remove the need for these
allocations.

_______________________________________________
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