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

Re: [XEN PATCH][for-4.19 v4] xen: address violations of Rule 11.9


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Nov 2023 15:09:23 +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=cQBxa5irDlgy6TrWgjMJ1O5liy7STpDHdZSG6bICTNo=; b=AfACGZu82h2acPTH4GWPcFEX+9YZrwfqk1ct0wH5XNUq50eJznv0c8CjVeSBKYZHLwLGqFw0zCOz9DiLjGwWTF6oJNXNtrKoZ0WzfUavTOkaztKIWa57TpeBPTckIvRmJWclD39N2q8Bu38sHvZVJOoOi3e7nk/t9r/l8J9lExzqx8W/qDKasEpmvSugwMuZpNtmxdhCdGcLqAgMXyjIIs2BQ2Qj2mQbb08zuH9dq9gJFEL4daujmhxMa6ggzTRUZuDTEbk/MLoXJ8VO2PamIscX5BJpulO8gTyGcpJHV7BJBFiKw9IHVYt2KcLRoIc2iUvGexeMTlKzlLO6UVMxzQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C8Qa6qyPZ81gQ7xfdmet/q+iBP/W7+3TMRP7uzidedK6qnMcmgwhQWRke/r9R6QMkYbQt7TxmxIOmW7PB9BolXC077v4wBGUe3q+jWkQ93WpHDeCX4iJf1Ohy3AgH9ZwqM2kEGBghqtqd9v9PohX/N9LBx5HBow8sDXNX74gIx92WCphnnsPCLI6YNM0NzuB8XisYAqv+y2hyYB9V3hFSsdqe3q0bkd6ebc6VmgVMQlDTVvvBumZy2w+kNcKgjfKvS/GOV0l6/22xgEeHZymZ8UvreAPhDGzdQbQrYjWBVjdh3KeLLgBL01fARqECJkHQKf61GAowiFTET3PXimKgg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 13 Nov 2023 14:09:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.10.2023 09:55, Nicola Vetrini wrote:
> The constant 0 is used instead of NULL in '__ACCESS_ONCE' as a
> compile-time check to detect non-scalar types; its usage for this
> purpose is deviated.
> 
> Furthermore, the 'typeof_field' macro is introduced as a general way
> to access the type of a struct member without declaring a variable
> of struct type. Both this macro and 'sizeof_field' are moved to
> 'xen/macros.h'.
> 
> No functional change intended.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> ---
> Changes in v2:
> - added entry in deviations.rst
> Changes in v3:
> - dropped access_field
> - moved macro to macros.h
> ---
> Changes in v4:
> - Amend deviation record.
> ---
>  automation/eclair_analysis/ECLAIR/deviations.ecl |  9 +++++++++
>  docs/misra/deviations.rst                        |  6 ++++++
>  xen/include/xen/compiler.h                       |  8 --------
>  xen/include/xen/kernel.h                         |  2 +-
>  xen/include/xen/macros.h                         | 16 ++++++++++++++++
>  5 files changed, 32 insertions(+), 9 deletions(-)

I tried to commit this patch, but ...

> diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl 
> b/automation/eclair_analysis/ECLAIR/deviations.ecl
> index fa56e5c00a27..28d9c37bedb2 100644
> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl
> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
> @@ -246,6 +246,15 @@ constant expressions are required.\""
>    "any()"}
>  -doc_end
> 
> +#
> +# Series 11
> +#
> +
> +-doc_begin="This construct is used to check if the type is scalar, and for 
> this purpose the use of 0 as a null pointer constant is deliberate."
> +-config=MC3R1.R11.9,reports+={deliberate, 
> "any_area(any_loc(any_exp(macro(^__ACCESS_ONCE$))))"
> +}
> +-doc_end
> +
>  #
>  # Series 13
>  #

... this change doesn't apply, and I also can't see how it would. There were
no dependencies specified, so it's also not clear on top of which other
(ready to be committed) patch(es) this might have been meant to apply. Please
resubmit in a shape applicable to the staging branch.

Jan



 


Rackspace

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