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

Re: [XEN PATCH] xen: Add SAF deviations for MISRA C:2012 Rule 7.1


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 10 Oct 2023 07:29:00 +0000
  • Accept-language: en-GB, en-US
  • 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=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=84emrquxgtm2KwJ6ssXPajqSXWUJXQ3I7jVMGIR44zI=; b=nBQ0iQpVIUGrGker9vXtEoSbihGlbiSZaPf4+2w8rrC7nQHQskNLq4cMjBzMkqGbnFMK76lJ27w2IuvqqzFzzAeEx11p8JmxzR+ScBi7kYfyDUF0ThyWvQROdOFwKCUzri9UuNyFaV9V3zSzwAxlr8+JMRL9yq33NtlfiuDFGsuk25g+zx9o6r4U/6LoX7/jgd2nhgWYOHop6iCuGIX6Kh3ooHGnDbYYOBJbGLM2U5uReJuj6suDJVrFGIdOfCxK79rZMfcVdveG79s1VWumTbkli7dM99uJD/4ureeP/HKsVsDj4TLTGZPIHYvu2H4/UdGnc9YXStd28K9oGGGI5g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kFHk00e4iHorZlhaIbzdNSoePXZhnYr2VDwehVJlWaA1wZMZPg1dkgJJF3dLFLFI2sxOAjIVwmMwdkTyW+2AUTYJ6nIysD8B/MI1ay+TGctGZ1A8E7ot+tGnNyVY12Auevm8OneRoPH4GZwSHmRviDOMjMvVaFggkPumGcyle1p/fjIzYM50W1yoxc0SaQfbWlTbpr2ARmfBRmcPePmbdkPlE26WzNjmQGHLzZzJRoULTjOtunbOP+Pz5GXHxYrdj6xjilxkhsZlZgSIrIeCN1RTnMuSXNzpdBxVH1rYixqSq56yVzqeJdsKRmf5y1xqhLydyjfMdhqUzugQV/8pVw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, "xenia.ragiadakou@xxxxxxx" <xenia.ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, "consulting@xxxxxxxxxxx" <consulting@xxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Tue, 10 Oct 2023 07:29:54 +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: AQHZ9qj87vFsnMRst0ybMa+ffKOLU7A5Z4mAgAAGhgCAAAYzgIAA1KIAgACGqQCAASTEgIAAdASAgAEY6ICAA60ogIAA4ZaAgACZhgA=
  • Thread-topic: [XEN PATCH] xen: Add SAF deviations for MISRA C:2012 Rule 7.1

> 
>>> /* SAF-x-safe */
>>> if ( modrm_mod == MASK_EXTR(instr_modrm, 0300) && (modrm_reg & 7) ==
>>> MASK_EXTR(instr_modrm, 0070) && (modrm_rm & 7)  == MASK_EXTR(instr_modrm,
>>> 0007) )
>>> 
>>> Any other ideas?
>> 
>> Could we have a number in the comment to indicate the number of lines the
>> comment applies to?
> 
> Luca can confirm that what I am about to write is correct; my
> understanding is that ECLAIR supports it, but cppcheck does not. Which
> means for cppcheck we would have to translate the SAF tag with
> xen_analyize to:
> 
> /* cppcheck tag */
> line1
> /* cppcheck tag */
> line2
> /* cppcheck tag */
> line3
> 
> and that would end up changing the line numbers in the source files so
> the cppcheck report wouldn't match with the original line numbers any
> longer

Yes, but it’s not only Cppcheck, it’s also Coverity that supports only the 
above notation.

For Cppcheck we could do something, but for Coverity we can’t.

Anyway, Stefano or Nicola, I would like to understand where Eclair reports the 
violation
in the case of #define, does it report at the usage or at the definition?

Cheers,
Luca



 


Rackspace

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