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

Re: [PATCH] xsm: misra rule 8.4 fix


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 8 Dec 2022 09:14:02 +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=vcubySrWzrcMqOg6tKo/4xWo0j/8Zmid6GQzXN/1e/g=; b=i8HWQi5jrXF0mMtdDi8+ayrQaJsmTiTYHoFUIJ3Kdi+wv/R9xcT61+UPcImB8qp38SvFSIq5obwz30PHLX5ic3CVYVHsJurW5GIT5Zecz3GWmqk9X4/dEtm/mO+lFBAFO/Ipt08/XZO7y6N+oltwMLRdgc8Dh296NwQgK1kdQsDfuP5P/o/H1h5emFk8dIckjHtcScFrgdepJq/gveWblBF8cIU2+XMIHpkZ5/Ya3q6P5sLdwyJrA4kkp8eOakHfkPbqakGRwOuMYbXrp2rTIxV+I7h6dZkcf1QjWUwOteRGDLtYKmY7sVCxRMti147UnK7+JcitinAxMIDOV//d5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UbOQnHJsh6a8zEiNXqyXUlBB/+GvA5IiO+uWJcXWONT1NxvPo9m+A1/U/r34f16nQBVklIhAhLPHAcz6A7/jzqIhiNDe6Qd+Os+kDyeuwBELNfWH/Tiq7wUy9jXbdbIWXiJttS780xQ+qJzzb6XJVBWHqdDcF4J15JpAiXruQ1Yf35sGoyTHBRirI+cxB54nKM4ZFg6hjSHjMgkWNag5AOpg3poK7pYbfF5eezhZ2YF7+Cpi4dFbesD5m7fhb1+vUEazkEhuXCRJD0pguUJgK0VAhz/j0vMrEALyTpDG+dPHpjmc/1oz3vbonJQ+/gqvwfL/GwtYtZ0iJ6y8CXWfXQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: dpsmith@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 08 Dec 2022 08:14:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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?

Jan



 


Rackspace

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