From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: sstabellini@kernel.org, michal.orzel@amd.com,
xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com,
consulting@bugseng.com, andrew.cooper3@citrix.com,
roger.pau@citrix.com, Wei Liu <wl@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH][for-4.19 v4 2/8] x86: add deviations for variables only used in asm code
Date: Tue, 24 Oct 2023 15:40:19 +0200 [thread overview]
Message-ID: <53617132b87450fc385b2f5887bfe65f@bugseng.com> (raw)
In-Reply-To: <2f3850a7-f2a3-350f-b9b6-be0bde0d1a28@suse.com>
On 24/10/2023 10:12, Jan Beulich wrote:
> On 24.10.2023 09:58, Nicola Vetrini wrote:
>> On 24/10/2023 09:32, Jan Beulich wrote:
>>> On 23.10.2023 11:56, Nicola Vetrini wrote:
>>>> --- a/xen/arch/x86/include/asm/asm_defns.h
>>>> +++ b/xen/arch/x86/include/asm/asm_defns.h
>>>> @@ -31,6 +31,7 @@ asm ( "\t.equ CONFIG_INDIRECT_THUNK, "
>>>> * gets set up by the containing function.
>>>> */
>>>> #ifdef CONFIG_FRAME_POINTER
>>>> +/* SAF-1-safe */
>>>> register unsigned long current_stack_pointer asm("rsp");
>>>> # define ASM_CALL_CONSTRAINT , "+r" (current_stack_pointer)
>>>> #else
>>>
>>> SAF-1-safe is about symbols "used only by asm modules". This doesn't
>>> apply
>>> to the declaration here.
>>>
>>
>> The wording could change to "asm code" if that is deemed clearer.
>
> Question is what would be meant by "asm code"; "asm modules" is quite
> clear.
>
Well, I don't know. It's up to the community to decide that. It can be
an ad-hoc
justification, but I don't see much value in doing so. What do you
propose to get this patch
approved (at least on your account)?.
>>>> --- a/xen/arch/x86/setup.c
>>>> +++ b/xen/arch/x86/setup.c
>>>> @@ -75,6 +75,7 @@ static bool __initdata opt_invpcid = true;
>>>> boolean_param("invpcid", opt_invpcid);
>>>> bool __read_mostly use_invpcid;
>>>>
>>>> +/* SAF-1-safe Only used in asm code and within this source file */
>>>> unsigned long __read_mostly cr4_pv32_mask;
>>>>
>>>> /* **** Linux config option: propagated to domain0. */
>>>> @@ -147,12 +148,13 @@ cpumask_t __read_mostly cpu_present_map;
>>>> unsigned long __read_mostly xen_phys_start;
>>>>
>>>> char __section(".init.bss.stack_aligned") __aligned(STACK_SIZE)
>>>> - cpu0_stack[STACK_SIZE];
>>>> + cpu0_stack[STACK_SIZE]; /* SAF-1-safe Only used in asm code and
>>>> below */
>>>
>>> Wasn't it that such comments need to live on the earlier line?
>>
>> On the same line is fine as well. I personally found it less clear
>> putting that in the
>> line above.
>
> But please recall that these comments are intended to cover other
> scanners as well. Iirc only Eclair accepts comments on the same line.
> Nevertheless I realize that putting the comment on the earlier line
> is problematic (and maybe also scanner dependent) when that ends up
> in the middle of a declaration / definition.
>
> Jan
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
next prev parent reply other threads:[~2023-10-24 13:40 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 9:56 [XEN PATCH][for-4.19 v4 0/8] Fix or deviate various instances of missing declarations Nicola Vetrini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 1/8] xen: modify or add declarations for variables where needed Nicola Vetrini
2023-10-23 23:03 ` Stefano Stabellini
2023-10-24 6:18 ` Jan Beulich
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 2/8] x86: add deviations for variables only used in asm code Nicola Vetrini
2023-10-24 7:32 ` Jan Beulich
2023-10-24 7:58 ` Nicola Vetrini
2023-10-24 8:12 ` Jan Beulich
2023-10-24 13:40 ` Nicola Vetrini [this message]
2023-10-24 14:27 ` Jan Beulich
2023-10-24 7:35 ` Jan Beulich
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 3/8] x86: add deviation comments for asm-only functions Nicola Vetrini
2023-10-24 7:50 ` Jan Beulich
2023-10-24 8:01 ` Nicola Vetrini
2023-10-24 8:14 ` Jan Beulich
2023-10-24 13:41 ` Nicola Vetrini
2023-10-24 19:50 ` Stefano Stabellini
2023-10-25 14:04 ` Nicola Vetrini
2023-10-25 22:36 ` Stefano Stabellini
2023-10-26 9:42 ` Nicola Vetrini
2023-10-26 22:52 ` Stefano Stabellini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 4/8] x86/grant: switch included header to make declarations visible Nicola Vetrini
2023-10-24 7:54 ` Jan Beulich
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 5/8] x86/vm_event: add missing include for hvm_vm_event_do_resume Nicola Vetrini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 6/8] xen/console: remove stub definition in consoled.h Nicola Vetrini
2023-10-23 10:21 ` Jan Beulich
2023-10-23 10:29 ` Nicola Vetrini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 7/8] x86/mem_access: make function static Nicola Vetrini
2023-10-23 9:56 ` [XEN PATCH][for-4.19 v4 8/8] docs/misra: exclude three more files Nicola Vetrini
2023-10-23 10:23 ` Jan Beulich
2023-10-23 10:30 ` Nicola Vetrini
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=53617132b87450fc385b2f5887bfe65f@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=ayan.kumar.halder@amd.com \
--cc=consulting@bugseng.com \
--cc=jbeulich@suse.com \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
--cc=xenia.ragiadakou@amd.com \
/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.