[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/6] xen: add SAF deviation for safe cast removal
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Date: Tue, 19 Dec 2023 16:03:27 +0100
- Cc: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, consulting@xxxxxxxxxxx, Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 19 Dec 2023 15:03:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2023-12-19 12:28, Jan Beulich wrote:
On 19.12.2023 12:05, Simone Ballarin wrote:
--- a/xen/arch/arm/guestcopy.c
+++ b/xen/arch/arm/guestcopy.c
@@ -109,6 +109,7 @@ static unsigned long copy_guest(void *buf,
uint64_t addr, unsigned int len,
unsigned long raw_copy_to_guest(void *to, const void *from, unsigned
int len)
{
+ /* SAF-3-safe COPY_to_guest doesn't modify from */
return copy_guest((void *)from, (vaddr_t)to, len,
GVA_INFO(current), COPY_to_guest |
COPY_linear);
}
@@ -116,6 +117,7 @@ unsigned long raw_copy_to_guest(void *to, const
void *from, unsigned int len)
unsigned long raw_copy_to_guest_flush_dcache(void *to, const void
*from,
unsigned int len)
{
+ /* SAF-3-safe COPY_to_guest doesn't modify from */
return copy_guest((void *)from, (vaddr_t)to, len,
GVA_INFO(current),
COPY_to_guest | COPY_flush_dcache |
COPY_linear);
}
Unlike below for x86, here in both cases the comment cover more than
just the one function argument they are intended to cover. I think we
want to limit the scope of such comments as much as possible (and
hence have as little as possible on the immediately following line).
Jan
Ok, noted for v3.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
|