[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 4/4] xen: Justify linker script defined symbols in include/xen/kernel.h


  • To: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 8 Nov 2022 11:00:47 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=ziW/iULUAbBB1IoqvVvfagfEsim2NtZox8AdGitTvIA=; b=D4J12t8zImHd9SHavSzqSA0k2F29SEAEwmSUS1JlcuYvdgYRzvVnAJhsfUyhOZ+X++KKUpvtcdiWYFVYOlpXUlPv1spuuxlcCBP5B81SI9/BgSI/zMrV0PRWewwvVfFeqIZzSuG5h+29LW/xAZNrmU9xLP7NAPmyTss7wa8FQ1SzlAGbwGLmvnj1uy7XzFoBE5VRoyNV6xsAyI9oA6AWMJkriVpW7NFDdhLMYK1wwuEl4X3V055nLcVxDsfGQ7D4c1gJ+QSYoKeLF1zFmTGvlVHZWG7Ng2bGbJixxfIOFA9UbYe4l2b0w74A3hozY4b4HZJR5B5yVEnKTb5YT529Zw==
  • 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=ziW/iULUAbBB1IoqvVvfagfEsim2NtZox8AdGitTvIA=; b=RiaDkWc+YToM2N7oSOYJ5KHyRgbnCffFpOXSouHPcXhSds5nMG4l1Zb2alxr13hTNf98B1eczdPM1DhugHaAiYkd9RpxALHHBfRBQUBXUabAICBVe6p30ZqAA5niMIBrHemdTxDamzxVf5D0e4TzEr0kzJXniT9F4r2lXgJi6DOteM7Fs6Cr3xFxzPOUGoDgxO8hXLX8iYQuLlkIlMBgxQzn8AW4/ewwtC8n7gFPjNEkpmYMohb0u4+lAKdkzBnuJQ4jc4ZS03txZIaL5ZVx7RepG9SQFG6lBEv5vb0iiEuzlsY/3MMl2QPfxuEI5Kq5UWQ9DLsCJbnfQjmUhRHNQA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=QstSyg877W2uA89u/NU6Cj6imolVLNnnFcYQr2uxJ6OkFXNxSvlEV2HfvBBIzcYYndIEVcQGfjn/rdlrKRt1Yr2RxDqSszozMAoZClYOOHLMjI5RtI1MUN2LLdq+EtB5oz11lAD/4SA0R9i2ZA9Xqu8mMNWPLRGJdyy63JMPqcPsNKYZn5XVqSp7ENpxU9Vxs8dU4W1o9IT8iUK9hS/286iMIJ8dUIdxdwbtvstiJOMtR2pQ8Y3pvPtR7KaWEx0nPyOg8ivBGDVEo1viRd4fQe7lNu0iaDmXNks1iChNriaWjoQI21LYznkQs2gwPn0QN/iUlPa+KjoS7W47c2ausw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kcotjXmZZPQTk0EgHGQwHjOd211YGd80iAj6CQZqnziYvdnzzCVwdM+WIErbkFPGbd5zJe5d/tdoWOM9FCWIKHnaTsK5Ejo/lzWlElg7Fm/bXwDprSZEiZQ9TItUPSgKHazW5R5Y2IwQ2qH+6hIpDD6CSVt9pwgH62oa4ugBgTR6CX7eM8HTX6yS7ocD8HClIYNTi+NfsKIvcCR0QmsLZZ7eCtWeRfMJ872/oM+vR7tYWsJXB1vkyUAxZAzJwh1LqqzjZHCQKB68huEXPLIc/uNA5z4nf3K1y5rBCnH2ukSrWpBKXpj835WGt3wjXu3sZgYGh5mKyq4Iu+u8OhHRMg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 08 Nov 2022 11:01:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHY8pZ4QA3C9Pi6Y066NaE9A9ULoK4zWNUAgAABAICAABGdgIAAZ3AAgAEKpoA=
  • Thread-topic: [RFC PATCH 4/4] xen: Justify linker script defined symbols in include/xen/kernel.h


> On 7 Nov 2022, at 19:06, Julien Grall <julien@xxxxxxx> wrote:
> 
> 
> 
> On 07/11/2022 12:56, Jan Beulich wrote:
>> On 07.11.2022 12:53, Luca Fancellu wrote:
>>>> On 7 Nov 2022, at 11:49, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>> On 07.11.2022 11:47, Luca Fancellu wrote:
>>>>> --- a/xen/include/xen/kernel.h
>>>>> +++ b/xen/include/xen/kernel.h
>>>>> @@ -65,24 +65,28 @@
>>>>>   1;                                      \
>>>>> })
>>>>> 
>>>>> +/* SAF-0-safe R8.6 linker script defined symbols */
>>>>> extern char _start[], _end[], start[];
>>>>> #define is_kernel(p) ({                         \
>>>>>     char *__p = (char *)(unsigned long)(p);     \
>>>>>     (__p >= _start) && (__p < _end);            \
>>>>> })
>>>>> 
>>>>> +/* SAF-0-safe R8.6 linker script defined symbols */
>>>>> extern char _stext[], _etext[];
>>>>> #define is_kernel_text(p) ({                    \
>>>>>     char *__p = (char *)(unsigned long)(p);     \
>>>>>     (__p >= _stext) && (__p < _etext);          \
>>>>> })
>>>>> 
>>>>> +/* SAF-0-safe R8.6 linker script defined symbols */
>>>>> extern const char _srodata[], _erodata[];
>>>>> #define is_kernel_rodata(p) ({                  \
>>>>>     const char *__p = (const char *)(unsigned long)(p);     \
>>>>>     (__p >= _srodata) && (__p < _erodata);      \
>>>>> })
>>>>> 
>>>>> +/* SAF-0-safe R8.6 linker script defined symbols */
>>>>> extern char _sinittext[], _einittext[];
>>>>> #define is_kernel_inittext(p) ({                \
>>>>>     char *__p = (char *)(unsigned long)(p);     \
>>>> 
>>>> Why the "R8.6" everywhere here? Didn't we agree that the in-code
>>>> comments should be tool-agnostic?
>>> 
>>> The R8.6 is not tool specific, it is to give the quick hint that we are 
>>> deviating
>>> from MISRA Rule 8.6.
>> Well, yes, "tool" was wrong for me to write. Imo references to a specific
>> spec should equally be avoided in in-code comments, as other specs may
>> turn up.
> 
> +1. The comment duplication is not great and sometimes even a short 
> explanation it may not fit in 80 characters (AFAICT the justification should 
> be a one line comment).
> 

Ok we can remove the R8.6 from the comments, is the remaining part ok?


> Cheers,
> 
> -- 
> Julien Grall




 


Rackspace

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