[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: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Nov 2022 13:56:11 +0100
  • 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=4gom/usOdYTCjJw1aHXnmajlSa4tRBYFsESzO8uiolg=; b=L72f3yT282UFkjuzNZUePKo9J0od7WlNmiFA7XZlT+EU5Rwi0NSoz0PguEKzqoUm/AKM6/utQ4ieeKN9aIr3b+Ii3ZU/wBX6qH5k2nyyAcfgP4RzpsVQc1PgL1hvdp4oL86ibvk4DM8qQtlaULc4X2ONsBT6uDKSHI4bJI9WuzGB5AhJ8oG2Gso8X9oNjvwQu4ndz+0vL5OeuJJPPZAj7MywXk3ILGKP2simU0I+OGIWPD6lVYshNoGZVLyu77x/AhHac+jEIMrCk3XOorRzSnocWyhl9Jk4BF1ZNjskZ0te0utU4c+dRW73oDr1SHH6s08wJj77xBd5MfkCuGCPGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=djUedHVC13KCgvxaSJYyQK/QWBpQmR+IUH4e0U+1TnYjFYttRk81badA2qK6wvTHT2GuBtXVXjntka+tG73EpVU1w7DvUV6T0O+1iPjbaaINHIVicHs9nNI2+3nReP2KvQ02KSr8/qvn3W2a2qg+VdqJQ6O/hYHpFxvQBI0CSDZrhzrMnA268XSVvH21DVtxoUN/OcTf/ta8pIvvjD4vDGvITpt3CBTgX+AA1sX7a+n0ZesWQtUhW6arnn8GYNEW3tYXCbkddR/ufxD2djIwYf/GuhdXfQ4255QMGos3+be+EjRtNik6VA1dD424QItqTlaayjnkP83Z0hSGPDD3jQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 07 Nov 2022 12:56:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

Jan



 


Rackspace

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