[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v2 2/7] x86: add deviations for variables only used in asm code
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Date: Wed, 18 Oct 2023 17:24:06 +0200
- Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 18 Oct 2023 15:24:11 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18/10/2023 16:56, Jan Beulich wrote:
On 18.10.2023 16:28, Nicola Vetrini wrote:
On 16/10/2023 16:58, Jan Beulich wrote:
On 09.10.2023 08:54, Nicola Vetrini wrote:
These variables are only used by asm code, and therefore
the lack of a declaration is justified by the corresponding
deviation comment.
Hmm, you say "declaration" here, but according to my understanding
...
--- 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");
... this is a declaration, not a definition.
It has automatic storage duration and it's not defined afterwards
Mind me asking what makes you derive "automatic storage duration"?
I also don't see how "not defined afterwards" matters here. This is
a special construct, not covered by the C standard.
Jan
Oh, you're right. I was fooled by the fact that this is not a standard
construct.
I see your point now.
Thanks,
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
|