[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:55:35 +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=pPnmmNcE0q5JSy4R/IM++aACalAYSwaWxYInSHjiE0k=; b=NR8T7fYq5Vc4WVUhM0zdAku+eqrhXNhv2cSv91mF/YeUpF7JFWtRxsRabMJm2fb12qo/priDJZabnjucKOPei905bN8HyM15nRsKSOAn5j/zTkTP75xWrguX6TO+6Y8QdF+/7dshEq/9N1NPCLb9zUFv7pCSNl7mgb+avxWd0/T3/CG2sqwrk/DjaZFrwI2Cle+SlM3lo4AcUGwp9GzB4mPJlN+YVk5mHdInkSbEyMe33dI7rzwdxEZ5uMOGM2AH1XvcFOrZkGU97An/cOOQWGjQvncsamGFcqUxPJY+NlWM33yDBxwKuvp3twY6Oh8KaCImnQSd2jWDxjV2yaVI6Q==
- 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=pPnmmNcE0q5JSy4R/IM++aACalAYSwaWxYInSHjiE0k=; b=Yt5Pne/b2BIAHl+cbUe4GPf8Yw+mZ2Vbty/zOxx7+JBF1k2Y3ts4xGJ2G96H43NR1XCnEgSr1sk01w4r3XgMPJt1iWPgweK2cbJPJuHlfhDhG/JugDYvF3uW8PhphbjMqkLnvHW3otOYdFybDCl5vAEc+/17zl8wCtp3ypBv5C1f4VLBcw2LWpDZeUZ/0qqbN312NoQUG0ov0rNVDFxeR4EUQhG5zR4mFy2KvnTumpozNhc7f+XttMT6POcCJ8rKNsm6hnToCVVEZ2VHkqJzxjagaffbt7nZCz4X1c0/Zbhdt4bUu0gmIJTLQIEhmMAcHXkJbytfONB64u07z6Qz8A==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=hmfRwb9/9UABLOp70w4jZAoUh1xmGYhFJ8OUnfVloOtrh/cjoUy04mafoMtWSN5qsHCOTPri2BeN3ESF958xEoQ1G3GZ5sxx0pprpxEXpfx5jjDC4uldAAWSDpenyvgsK0rRYewCWemRaOoWBw6FeczHkxjMK9aS3k38ovUkr/bhO7erw4LHOxj0dRAWhUHFY1u1z/f1yemFjwJBO/Hy4SxsAT5b1bNwCb+XODfg/gzWuVsVq+1RBaS7yvyfAwDJ1DW/ucMQj+dMovXTohh+3CZGU8wuBT5PYPCTkTWaWQvP5ayxEtZu6n4iKYmwr5FQBGLA7kl3gXv81AaZ/Vnwfg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UnOMFk4Pd+MMNsUOD/ifnm3QJES1yM0C8p8T1XYm3W7mu5GOcRk7JkKx18t52KqG0sCtcsrksq/IB6G2uBXrQxQJvewKJkabYygb+MbkfpUh7Jhtpev9QmoyIG9qQGEmN3FGDfV9ILvilIz0gWJ4vQa9FLtWW1CWHejpxgULxWO/3m6j9YseoesyNFVvODc1pTHPgz8RbGqPId1xMkIUiGriBU7wwFs0f52q5Em44CDCNns4CQKqN6q8BJNrXBXQa/GP84LvPTQ12vMTuIMzTn85cS5PdXs7shcWTzf7uLq9sn4qddorpVXidlGHknJc5qNomT0+Nh4mGIJRLXnAsA==
- 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:56:05 +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: AQHY8pZ4QA3C9Pi6Y066NaE9A9ULoK4zWNUAgAABAICAABGdgIAAZ3AAgAEKpoCAAAjCgIAABo0A
- Thread-topic: [RFC PATCH 4/4] xen: Justify linker script defined symbols in include/xen/kernel.h
> On 8 Nov 2022, at 11:32, Julien Grall <julien@xxxxxxx> wrote:
>
> Hi Luca,
>
> On 08/11/2022 11:00, Luca Fancellu wrote:
>>> 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?
>
> I am afraid no. The comment should only be /* SAF-0-safe */.
Ok I will go for that in the next serie
>
> Cheers,
>
> --
> Julien Grall
|