[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: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 18 Oct 2023 16:56:26 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zZ1eItpsS2xyc9gqC0IhP4f2MW+FAhdSuboapcw+6lA=; b=Y6fuMfScywe0z9m0WrZZJYqdwWB3W2ft0OxOQuq8kWes6WWUYZXOKzpHBGuUwkFgH4RrTN7r3y1EdwmngOeZR1xI6Pyfhoir+EqpdHDqKFP0hBlBGxbV0RNKW+C8s+xnIexfEUi87hdsn04FOKxYGhRhoWPBNym+O5sGjBpgd6HxjpmrNzvkCnGeAP7FLX3Oj7Tw4KMQiaRu60Pfl4NSw+ALh4hjGDaJ46UOipmBGcEHKW/DexXS0++9i8jOKGxqQ7X/edH+Ox+bvYzFBTAxCxYhVPL+H1D6+qFyDEb/fUQZWy9TXae1COuM1YixjcwBLyOU9x7P5AOwjJnrFVqUUQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gxwgm2Fso3dUsMlbK1z50APGPX8GSrTl5OqqG9R51yOlsQdyN4BbZeWC4aAnEszf2hLEBfLKcgyH2WOLufRpw+8/j1VJOz8nx577wEnV+WmYe7ipwKz3A+3qjNqUICXPz4fAiXubL6dr8aVg1q3VlXf5W+BAtAgAarrTNNmlr8ivZQKT/J7BCLoI0+w7sJToGnm+4I4Ro8CSG3hZOmYBkq0zJIEQgH0n3lIMi2F8UQ2RbK2u3RCGALon/8JpRaCQ96G9CozQ26zEN+gsoqYksCDOZtWFRnAlvb7IB7dv1aR4pjDMKyTPNPah/LGNrqJ+//gJqZ6uEOYp579dODCT8w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • 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 14:57:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.