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

Re: [PATCH] xsm: misra rule 8.4 fix


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 8 Dec 2022 09:42:05 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=Aw9jkc/STrOn0ZeERl9Onfdrp9d+22WAt+7ky8mzvdw=; b=HilFCeAhOVrirzR9BVCEPf5zUogpdjff9pCY24YqQB5GmBTmBvVxEHJa+wafaHARaHo+6a/i5apH25EzaX8kDzwBwSAWgc0JshCCdmuUcaMSF9SOyLbb7nqxlD4pHeIUGI5KoQvZEZp4YrEZFXqp5ti3fiRzXLlywV2LtfeAOsnMnFc0hN9nMhk7JkUcPP0tKOF2URM2rKxKHJfyoHgGhJpN7jqXCptBGajER203Y+rIzRDk9w3ASuQ7rOtjz2mRSrVd5NPD4m4yj7ErgsdyvOG3b8Qo3dpzzlU2OSi6TvFv3HAiMBzwRhLNgRzqivV/kePg0f9M7IKP4C+gh5kUOw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jNaS9tQzphEne63eoIrU5u15iOJdzKp+ihIS41RjsC8I0LkUWfJmZNfoGREAOiV5G71DMhLjQGhicMZgJB4VFEHs31Dl4nBOW0nKC9NWD5oa0aENw70FfmMg159ST/R9FfEaHQe/bk5dY19SpZuCsHfO/807L5c+9vGkev0eXX64gByhhUKpjZS8JGtgNciYg1A5RWu3QqUQiuOd43XEISgMLpMkqr7SQtuWGF5XjWWcWACcodzxnKCEZ9tLI4zyKuqZtRuEM9TMwzs/ckthwVSxGmOc3d4cvipCvko7DAO6E4SCOzTk4mWGLXcMXgihzh/k+4DXUkLLeLCc4NpStg==
  • Cc: <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 08 Dec 2022 08:42:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 08/12/2022 09:14, Jan Beulich wrote:
> 
> 
> On 07.12.2022 13:33, Michal Orzel wrote:
>> Hi Stefano,
>>
>> On 07/12/2022 03:12, Stefano Stabellini wrote:
>>>
>>>
>>> Fix two MISRA Issues Rule 8.4 ("A compatible declaration shall be
>>> visible when an object or function with external linkage is defined")
>>> found by cppcheck affecting xen/xsm/flask/ss/services.c.
>>>
>>> Fix the first issue by making policydb_loaded_version static and the
>>> second issue by declaring ss_initialized in a proper header.
>>>
>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>
>> cppcheck also reports findings for rule 8.4 with regards to the following 
>> functions:
>> - security_get_bools
>> - security_set_bools
>> - security_get_bool_value
>> - security_get_bool_name
>>
>> The prototypes for them are stored in xen/xsm/flask/include/conditional.h,
>> but services.c only does:
>> #include "conditional.h"
>>
>> This include refers to xen/xsm/flask/ss/conditional.h and not to 
>> xen/xsm/flask/include/conditional.h.
>> This means that we should also explicitly do:
>> #include <conditional.h>
> 
> And Misra has no rule disallowing such use of two different, identically
> named headers, for being potentially ambiguous?
I could not find such rule/directive related to filenames; only \wrt 
identifiers.
But all in all, we do not need MISRA to modify the filenames to get rid of 
ambiguity
if we really want to.

> 
> Jan

~Michal



 


Rackspace

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