Skip to content

address violation of MISRA C:2012 Rule 13.1

Simone Ballarin xen-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 18 repliesIn review
  2. v3 posting 2/24 patches 2 repliesSuperseded
  3. v3 posting 1/21 patch 3 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v2 posting 2/21 patch7 repliesSuperseded
v2 posting 1/23 patches12 repliesSuperseded
v15 patches5 repliesSuperseded

Changes in v4 from the cover letter

- added missing script for converting function_macro_properties.json in ECL configurations and other related improvements.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4xen: add SAF deviation for debugging and logging effectsdocs/misra/safe.json xen/arch/arm/device.c xen/arch/arm/guestcopy.c +2 more+33 -410 replies
2/4xen/ns16550: address violations of MISRA C:2012 Rule 13.1xen/drivers/char/ns16550.c+3 -11 reply
3/4xen/x86: address violations of MISRA C:2012 Rule 13.1xen/arch/x86/io_apic.c xen/arch/x86/mpparse.c xen/arch/x86/setup.c+10 -54 replies
4/4eclair: move function and macro properties outside ECLAIRautomation/eclair_analysis/ECLAIR/analysis.ecl automation/eclair_analysis/ECLAIR/call_properties.ecl automation/eclair_analysis/prepare.sh +3 more+939 -1283 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchJan BeulichStefano Stabellini
1/4
2/4A-b
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [XEN PATCH v4 0/4] address violation of MISRA C:2012 Rule 13.1

The Xen sources contain violations of MISRA C:2012 Rule 13.1 whose headline states:
"Initializer lists shall not contain persistent side effects".

The file properties.json containing function and macro properties is introduced, as stated in v2 discussion. Some functions and macros are found to have properties that can be exploited by static analyzers. For this reason, the file docs/properties.json contains all the needed properties. A description of the json file is documented in docs/properties.rst.

Some persistent effects have been moved outside initializer lists to address violations of Rule 13.1.

Link to the discussion: https://lore.kernel.org/all/[email protected]/T/#u

Changes in v4:
- added missing script for converting function_macro_properties.json in ECL configurations and other related improvements.

Changes in v3:
- change prefix from xen to xen/ns16550
- add assignment of rc in xen/ns16550
- use rc as controlling expression in the following if-statement
- change commit prefix from xen/arm to xen
- specify where saf-3-safe comments are applied in guestcopy.c
- reword saf comments text

Maria Celeste Cesario (1):
eclair: move function and macro properties outside ECLAIR

Simone Ballarin (3):
xen: add SAF deviation for debugging and logging effects xen/ns16550: address violations of MISRA C:2012 Rule 13.1 xen/x86: address violations of MISRA C:2012 Rule 13.1

 .../eclair_analysis/ECLAIR/analysis.ecl       |   1 +
 .../ECLAIR/call_properties.ecl                | 128 ---
 automation/eclair_analysis/prepare.sh         |   2 +
 automation/eclair_analysis/propertyparser.py  |  37 +
 docs/function_macro_properties.json           | 841 ++++++++++++++++++
 docs/function_macro_properties.rst            |  58 ++
 docs/misra/safe.json                          |  16 +
 xen/arch/arm/device.c                         |   1 +
 xen/arch/arm/guestcopy.c                      |  16 +-
 xen/arch/x86/hvm/hvm.c                        |   1 +
 xen/arch/x86/io_apic.c                        |   9 +-
 xen/arch/x86/mpparse.c                        |   3 +-
 xen/arch/x86/setup.c                          |   3 +-
 xen/common/sched/core.c                       |   3 +
 xen/drivers/char/ns16550.c                    |   4 +-
 15 files changed, 985 insertions(+), 138 deletions(-)
 delete mode 100644 automation/eclair_analysis/ECLAIR/call_properties.ecl
 create mode 100644 automation/eclair_analysis/propertyparser.py
 create mode 100644 docs/function_macro_properties.json
 create mode 100644 docs/function_macro_properties.rst
Signature · 1 line
2.34.1