All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Simone Ballarin" <simone.ballarin@bugseng.com>,
	consulting@bugseng.com,
	"Maria Celeste Cesario" <maria.celeste.cesario@bugseng.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 4/6] xen: add SAF deviation for safe cast removal
Date: Tue, 19 Dec 2023 16:03:27 +0100	[thread overview]
Message-ID: <8251c32b9af3da9e69538285d0e1c25c@bugseng.com> (raw)
In-Reply-To: <7dfb364e-e144-4a92-825a-71394610b931@suse.com>

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)


  reply	other threads:[~2023-12-19 15:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 11:05 [PATCH v2 0/6] xen: address violations of MISRA C:2012 Rule 11.8 Simone Ballarin
2023-12-19 11:05 ` [PATCH v2 1/6] xen/arm: " Simone Ballarin
2023-12-20  1:02   ` Stefano Stabellini
2023-12-19 11:05 ` [PATCH v2 2/6] xen/ppc: " Simone Ballarin
2024-02-23 23:19   ` Stefano Stabellini
2024-02-26 19:33     ` Shawn Anastasio
2023-12-19 11:05 ` [PATCH v2 3/6] xen: add deviations for " Simone Ballarin
2023-12-20  1:04   ` Stefano Stabellini
2023-12-20 10:50   ` Jan Beulich
2023-12-20 11:39     ` Nicola Vetrini
2023-12-19 11:05 ` [PATCH v2 4/6] xen: add SAF deviation for safe cast removal Simone Ballarin
2023-12-19 11:28   ` Jan Beulich
2023-12-19 15:03     ` Nicola Vetrini [this message]
2023-12-19 11:05 ` [PATCH v2 5/6] xen: remove unused function ERR_CAST Simone Ballarin
2023-12-19 11:24   ` Jan Beulich
2023-12-20  1:07   ` Stefano Stabellini
2023-12-19 11:05 ` [PATCH v2 6/6] xen/common: address violations of MISRA C:2012 Rule 11.8 Simone Ballarin
2023-12-19 16:25   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8251c32b9af3da9e69538285d0e1c25c@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=consulting@bugseng.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=maria.celeste.cesario@bugseng.com \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=simone.ballarin@bugseng.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.