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)