[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>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 7 Dec 2022 07:01:01 -0500
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670414465; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=5YotxaEBrKiaJvbD4JVHAtO1OLm+J/w+QEp318twkTY=; b=XaEf+S1LPBfRM/WyyWisxeqp8Hom7/T7hzH5QabvQlv2MSsP6exQWoPHyttupL2X4B56lAtDWF4Zt9lezIM3KLmuxCcRsyO2aGKO569GwMFXISfa1YawD5NkoffeN2kKzlgu06OekJp1/UD6OXtcE8vQHjea9szcUiS0xx6bqTI=
  • Arc-seal: i=1; a=rsa-sha256; t=1670414465; cv=none; d=zohomail.com; s=zohoarc; b=A7lSo00Ydku8DrTvixBpI/Mj7gCD0rH9I2s46tT0EQu7GwLOXd2ccLr8Mom5r0gsJ4j4jsiNf5wfrmsocipCQhtY/fEoDIlwIZStOSUHlBJtveTrbrbzxbMqEu3NOUI5ktMDbEPweAMGx6cXsca05c66LY4ipgsfJ1G0zn8+Ggs=
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 07 Dec 2022 12:01:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12/7/22 04:47, Jan Beulich wrote:
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

This variable is only ever written to afaics, so perhaps better simply
drop it?

I agree, I would ack a patch with this dropped.

and the
second issue by declaring ss_initialized in a proper header.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>

As to the title: The changes are contained to Flask, so xsm: really
is too wide a prefix.

--- a/xen/xsm/flask/flask_op.c
+++ b/xen/xsm/flask/flask_op.c
@@ -56,8 +56,6 @@ static int bool_num = 0;
  static int *bool_pending_values = NULL;
  static int flask_security_make_bools(void);
-extern int ss_initialized;

What about the 2nd one in flask/ss/policydb.c?

Jan


dps



 


Rackspace

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