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

Re: [PATCH 2/2] xen/misra: add entries to exclude-list.json



On Tue, 14 Feb 2023, Jan Beulich wrote:
> On 14.02.2023 09:56, Luca Fancellu wrote:
> > --- a/docs/misra/exclude-list.json
> > +++ b/docs/misra/exclude-list.json
> > @@ -1,4 +1,209 @@
> >  {
> >      "version": "1.0",
> > -    "content": []
> > +    "content": [
> > +        {
> > +            "rel_path": "arch/arm/arm64/cpufeature.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/arm/arm64/insn.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/arm/arm64/lib/find_next_bit.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/acpi/boot.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/acpi/cpu_idle.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/acpi/cpufreq/cpufreq.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/acpi/cpuidle_menu.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/acpi/lib.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/acpi/power.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/amd.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/centaur.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/common.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/hygon.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/intel.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/intel_cacheinfo.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/mcheck/mce-apei.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/mcheck/non-fatal.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/mtrr/*"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/cpu/mwait-idle.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/delay.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/dmi_scan.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/domain.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/genapic/*"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/i387.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/irq.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/mpparse.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/srat.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/time.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/traps.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/usercopy.c"
> > +        },
> > +        {
> > +            "rel_path": "arch/x86/x86_64/mmconf-fam10h.c"
> > +        },
> > +        {
> > +            "rel_path": "common/bitmap.c"
> > +        },
> > +        {
> > +            "rel_path": "common/bunzip2.c"
> > +        },
> > +        {
> > +            "rel_path": "common/cpu.c"
> > +        },
> > +        {
> > +            "rel_path": "common/earlycpio.c"
> > +        },
> > +        {
> > +            "rel_path": "common/inflate.c"
> > +        },
> > +        {
> > +            "rel_path": "common/libfdt/*"
> > +        },
> > +        {
> > +            "rel_path": "common/lz4/decompress.c"
> > +        },
> > +        {
> > +            "rel_path": "common/notifier.c"
> > +        },
> > +        {
> > +            "rel_path": "common/radix-tree.c"
> > +        },
> > +        {
> > +            "rel_path": "common/rcupdate.c"
> > +        },
> > +        {
> > +            "rel_path": "common/softirq.c"
> > +        },
> > +        {
> > +            "rel_path": "common/tasklet.c"
> > +        },
> > +        {
> > +            "rel_path": "common/ubsan/ubsan.c"
> > +        },
> > +        {
> > +            "rel_path": "common/un*.c"
> > +        },
> > +        {
> > +            "rel_path": "common/vsprintf.c"
> > +        },
> > +        {
> > +            "rel_path": "common/xz/*"
> > +        },
> > +        {
> > +            "rel_path": "common/zstd/*"
> > +        },
> > +        {
> > +            "rel_path": "crypto/rijndael.c"
> > +        },
> > +        {
> > +            "rel_path": "crypto/vmac.c"
> > +        },
> > +        {
> > +            "rel_path": "drivers/acpi/apei/*"
> > +        },
> > +        {
> > +            "rel_path": "drivers/acpi/hwregs.c"
> > +        },
> > +        {
> > +            "rel_path": "drivers/acpi/numa.c"
> > +        },
> > +        {
> > +            "rel_path": "drivers/acpi/osl.c"
> > +        },
> > +        {
> > +            "rel_path": "drivers/acpi/reboot.c"
> > +        },
> > +        {
> > +            "rel_path": "drivers/acpi/tables.c"
> > +        },
> > +        {
> > +            "rel_path": "drivers/acpi/tables/*"
> > +        },
> > +        {
> > +            "rel_path": "drivers/acpi/utilities/*"
> > +        },
> > +        {
> > +            "rel_path": "drivers/char/ehci-dbgp.c"
> > +        },
> > +        {
> > +            "rel_path": "drivers/char/xhci-dbc.c"
> > +        },
> > +        {
> > +            "rel_path": "drivers/cpufreq/*"
> > +        },
> > +        {
> > +            "rel_path": "drivers/video/font_*"
> > +        },
> > +        {
> > +            "rel_path": "lib/list-sort.c"
> > +        },
> > +        {
> > +            "rel_path": "lib/mem*.c"
> > +        },
> > +        {
> > +            "rel_path": "lib/rbtree.c"
> > +        },
> > +        {
> > +            "rel_path": "lib/str*.c"
> > +        },
> > +        {
> > +            "rel_path": "lib/xxhash32.c"
> > +        },
> > +        {
> > +            "rel_path": "lib/xxhash64.c"
> > +        }
> > +    ]
> >  }
> 
> Patch 1's example has a "comment" field, which no entry makes use of.
> Without that, how does it become clear _why_ a particular file is to
> be excluded? The patch description here also doesn't provide any
> justification ...

It would be good to have a couple of pre-canned justifications as the
reason for excluding one file could be different from the reason for
excluding another file. Some of the reasons:

- imported from Linux
- too many false positives


That said, we don't necessarily need to know the exact reason for
excluding one file to be able to start scanning xen with cppcheck
automatically. If someone wants to remove a file from the exclude list
in the future they just need to show that cppcheck does a good job at
scanning the file and we can handle the number of violations.

I take that with this exclude list, not accounting for rule 20.7,
cppcheck reports zero violations overall?



 


Rackspace

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