On 19/05/25 23:36, Stefano Stabellini wrote:
On Mon, 19 May 2025, Federico Serafini wrote:
Hi,
On 17/05/25 01:57, Andrew Cooper wrote:
+-config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* Generated
file, do not edit! \\*/$, begin-2))"}
-config=MC3A2.D4.10,repo
lector":{"enabled":true,"negated":false,"kind":2,"children":[]}}}
If you prefer, I think we can use ranges and merge the two
configurations.
--
Federico Serafini, MSc
Software Engineer, BUGSENG (https://bugseng.com)
LinkedIn: https://linkedin.com/in/federico-serafini
and fuzzing harness without iterfearing with the one
that the Xen build has.
Signed-off-by: Federico Serafini
---
Changes from v1:
- moved definition in the right file;
- remove useless parenthesis;
- description improved.
---
tools/tests/x86_emulator/x86-emulate.h | 10 ++
1 file
On 13/11/24 10:57, Jan Beulich wrote:
On 13.11.2024 09:17, Federico Serafini wrote:
Tag MISRA C:2012 Rule 16.3 as clean for both architectures:
new violations will cause a failure of the CI/CD pipeline.
Signed-off-by: Federico Serafini
---
No changes from v1.
---
automation/eclair_analysis
witch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
No changes from v1.
---
xen/arch/x86/x86_emulate/decode.c | 6 --
xen/arch/x86/x86_emulate/x86_emulate.c | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/x86_emulate/decode.c
Define pseudo keyword fallthrough for the x86 emulator,
use it and tag the rule as clean.
Federico Serafini (3):
x86/emul: auxiliary definition of pseudo keyword fallthrough
x86/emul: use pseudo keyword fallthrough
automation/eclair: tag Rule 16.3 as clean
automation/eclair_analysis
Tag MISRA C:2012 Rule 16.3 as clean for both architectures:
new violations will cause a failure of the CI/CD pipeline.
Signed-off-by: Federico Serafini
---
No changes from v1.
---
automation/eclair_analysis/ECLAIR/tagging.ecl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
On 06/11/24 12:22, Jan Beulich wrote:
On 06.11.2024 10:04, Federico Serafini wrote:
The pseudo keyword fallthrough shall be used to make explicit the
fallthrough intention at the end of a case statement (doing this
through comments is deprecated).
Signed-off-by: Federico Serafini
---
xen
Tag MISRA C:2012 Rule 16.3 as clean for both architectures:
new violations will cause a failure of the CI/CD pipeline.
Signed-off-by: Federico Serafini
---
automation/eclair_analysis/ECLAIR/tagging.ecl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/automation
Define pseudo keyword fallthrough for the x86 emulator,
use it and tag the rule as clean.
Federico Serafini (3):
x86/emul: define pseudo keyword fallthrough
x86/emul: use pseudo keyword fallthrough
automation/eclair: tag Rule 16.3 as clean
automation/eclair_analysis/ECLAIR/tagging.ecl
quot;.
No functional change.
Signed-off-by: Federico Serafini
---
xen/arch/x86/x86_emulate/decode.c | 6 --
xen/arch/x86/x86_emulate/x86_emulate.c | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/x86_emulate/decode.c
b/xen/arch/x86/x86_emulate/deco
The pseudo keyword fallthrough shall be used to make explicit the
fallthrough intention at the end of a case statement (doing this
through comments is deprecated).
Signed-off-by: Federico Serafini
---
xen/arch/x86/x86_emulate/x86_emulate.h | 10 ++
1 file changed, 10 insertions(+)
diff
Add Rule 11.2 and Rule 18.1 to the monitored set.
Tag Rule 7.3 as clean.
Tag Rule 11.2 and Rule 20.7 as clean only for arm.
Rule 2.2, Rule 9.5 and Directive 4.12 are not accepted:
do not enable them and do not tag them as clean.
Signed-off-by: Federico Serafini
---
automation/eclair_analysis
Add missing break statements to address violations of MISRA C:2012
Rule 16.3 (An unconditional `break' statement shall terminate
every switch-clause).
Make explicit unreachability of a program point with
ASSERT_UNREACHABLE() and add defensive code.
No functional change.
Signed-off-by: Fed
Add defensive code after unreachable program points.
This also meets the requirements to deviate violations of MISRA C:2012
Rule 16.3: "An unconditional `break' statement shall terminate every
switch-clause".
Signed-off-by: Federico Serafini
---
Changes in v2:
- use goto unhandl
Address violations of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
Changes from v2:
- simply break without returning X86EMUL_UNHANDLEABLE.
As pointed out by Jan, these
Add missing break statements to address violations of MISRA C:2012
Rule 16.3 (An unconditional `break' statement shall terminate
every switch-clause).
Make explicit unreachability of a program points with
ASSERT_UNREACHABLE().
No functional change.
Signed-off-by: Federico Serafini
---
Ch
gh keyword
that is not defined in x86-emulate.h at the moment).
Federico Serafini (4):
x86/emul: add defensive code
x86/emul: address violations of MISRA C Rule 16.3
xen/vpci: address violations of MISRA C Rule 16.3
xen/pci: address a violation of MISRA C Rule 16.3
xen/arch/x86/x8
Refactor the code to avoid an implicit fallthrough and address
a violation of MISRA C:2012 Rule 16.3: "An unconditional `break'
statement shall terminate every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
Changes in v2:
- improved description.
-
Update ECLAIR configuration to consider Rule 13.6 as clean:
new violations of this rule will cause a failure of the CI pipeline.
Signed-off-by: Federico Serafini
---
automation/eclair_analysis/ECLAIR/tagging.ecl | 1 +
1 file changed, 1 insertion(+)
diff --git a/automation/eclair_analysis
Address remaining violations of Rule 13.6 and tag it as clean.
Federico Serafini (3):
EFI: address violations of MISRA C Rule 13.6
xen/gnttab: address violations of MISRA C Rule 13.6
automation/eclair: tag Rule 13.6 as clean
automation/eclair_analysis/ECLAIR/tagging.ecl | 1 +
xen/common
above violates
MISRA C:2012 Rule 13.6 (The operand of the `sizeof' operator shall not
contain any expression which has potential side effect).
Refactor the code to address the rule violation.
Suggested-by: Andrew Cooper
Signed-off-by: Federico Serafini
---
Changes in v2:
- better d
sions mentioned above violates
MISRA C:2012 Rule 13.6 (The operand of the `sizeof' operator shall not
contain any expression which has potential side effect).
Refactor the code to address the rule violation.
Suggested-by: Andrew Cooper
Signed-off-by: Federico Serafini
---
Changes in v2:
- better d
On 12/09/24 12:01, Jan Beulich wrote:
On 12.09.2024 11:17, Federico Serafini wrote:
On 11/09/24 14:42, Jan Beulich wrote:
On 10.09.2024 12:09, Federico Serafini wrote:
--- a/xen/arch/x86/x86_emulate/fpu.c
+++ b/xen/arch/x86/x86_emulate/fpu.c
@@ -218,6 +218,7 @@ int x86emul_fpu(struct
On 11/09/24 14:42, Jan Beulich wrote:
On 10.09.2024 12:09, Federico Serafini wrote:
--- a/xen/arch/x86/x86_emulate/fpu.c
+++ b/xen/arch/x86/x86_emulate/fpu.c
@@ -218,6 +218,7 @@ int x86emul_fpu(struct x86_emulate_state *s,
*/
if ( dst->type == OP_MEM && !
On 11/09/24 16:57, Jan Beulich wrote:
On 11.09.2024 16:27, Nicola Vetrini wrote:
On 2024-09-11 16:10, Jan Beulich wrote:
On 11.09.2024 15:16, Marek Marczykowski-Górecki wrote:
On Wed, Sep 11, 2024 at 02:50:03PM +0200, Jan Beulich wrote:
On 10.09.2024 21:06, Federico Serafini wrote:
Refactor
Refactor the code to improve readability and address violations of
MISRA C:2012 Rule 13.6 ("The operand of the `sizeof' operator shall
not contain any expression which has potential side effect").
No functional change.
Suggested-by: Andrew Cooper
Signed-off-by: Federico Ser
Address remaining violations of Rule 13.6 and tag it as clean.
Federico Serafini (3):
EFI: address violations of MISRA C Rule 13.6
xen/gnttab: address violations of MISRA C Rule 13.6
automation/eclair: tag Rule 13.6 as clean
automation/eclair_analysis/ECLAIR/tagging.ecl | 1 +
xen/common
Refactor the code to improve readability and address violations of
MISRA C:2012 Rule 13.6 ("The operand of the `sizeof' operator shall
not contain any expression which has potential side effect").
No functional change.
Suggested-by: Andrew Cooper
Signed-off-by: Federico Ser
Update ECLAIR configuration to consider Rule 13.6 as clean:
introducing violations of this rule will cause a failure of the CI pipeline.
Signed-off-by: Federico Serafini
---
automation/eclair_analysis/ECLAIR/tagging.ecl | 1 +
1 file changed, 1 insertion(+)
diff --git a/automation
On 10/09/24 16:55, Jan Beulich wrote:
On 10.09.2024 12:08, Federico Serafini wrote:
Address violations of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
On 10/09/24 19:41, Federico Serafini wrote:
On 10/09/24 16:59, Jan Beulich wrote:
On 10.09.2024 16:57, Jan Beulich wrote:
On 10.09.2024 12:09, Federico Serafini wrote:
Address violations of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
swi
On 10/09/24 16:59, Jan Beulich wrote:
On 10.09.2024 16:57, Jan Beulich wrote:
On 10.09.2024 12:09, Federico Serafini wrote:
Address violations of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
Since in our interpretation "
A * B
M(1+1, 2+2) will expand to: 1+1 * 2+2
Update ECLAIR configuration to tag as 'safe' the expansions of macro
arguments surrounded tokens '{', '}' and ';', since in their presence
problems related to operator precedence can not occur.
Signed-off-by: Fede
Update ECLAIR configuration to deviate some safe violations of Rule 20.7.
Remove redundant comment-based deviations.
Federico Serafini (2):
automation/eclair: update configuration of Rule 20.7
xen/bitmap: remove redundant deviations
automation/eclair_analysis/ECLAIR/deviations.ecl | 4
Remove comment-based deviations since a project wide deviation that
cover such cases is present.
Signed-off-by: Federico Serafini
---
Changes from v1:
- split modifications in two patches.
---
xen/include/xen/bitmap.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/xen/include/xen
Address violations of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/drivers/passthrough/pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --gi
Use agreed syntax for pseudo-keyword fallthrough to meet the
requirements to deviate a violation of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/common/efi/runt
Address a violation of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/arch/x86/psr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/x86/psr.c b/xen
Address a violation of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/arch/x86/include/asm/monitor.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/
Address a violation of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/arch/x86/x86_64/mmconfig-shared.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/
Add defensive code after unreachable program points.
This also meets the requirements to deviate a violation of MISRA C:2012
Rule 16.3: "An unconditional `break' statement shall terminate every
switch-clause".
Signed-off-by: Federico Serafini
---
xen/arch/x86/x86_emulate/x8
Address a violation of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/arch/x86/vm_event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/x86/vm_event.c
ot; to make
the fallthrough intention explicit (i.e., a comment or the fallthrough keyword
that is not defined in x86-emulate.h at the moment).
Federico Serafini (12):
x86/psr: address violation of MISRA C Rule 16.3
x86/time: address violations of MISRA C Rule 16.3
x86/vm_event: address violation
Address violations of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/arch/x86/time.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/arch/x86/time.c b/xen/
Add defensive code in unreachable program points.
This also meets the requirements to deviate a violation of MISRA C:2012
Rule 16.3: "An unconditional `break' statement shall terminate every
switch-clause".
Signed-off-by: Federico Serafini
---
xen/drivers/vpci/msix.c | 4
1
Address violations of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/arch/x86/x86_emulate/fpu.c | 4
xen/arch/x86/x86_emulate/x86_emulate.c | 1 +
2 f
Address violations of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/arch/x86/mm/guest_walk.c | 1 +
xen/arch/x86/mm/hap/hap.c| 2 +-
xen/arch/x86/mm/h
Address violations of MISRA C:2012 Rule 16.3:
"An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
xen/arch/x86/include/asm/hypercall.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
d
On 29/08/24 02:42, Stefano Stabellini wrote:
On Wed, 28 Aug 2024, Federico Serafini wrote:
Update ECLAIR configuration of MISRA C:2012 Rule 20.7 ("Expressions
resulting from the expansion of macro parameters shall be enclosed in
parentheses") to tag as 'safe' the exp
On 28/08/24 16:50, Jan Beulich wrote:
On 28.08.2024 15:12, Federico Serafini wrote:
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -565,6 +565,10 @@ of this macro do not lead to developer confusion, and can thus
be deviated
'.
Remove redundant comment-based deviations.
Signed-off-by: Federico Serafini
---
automation/eclair_analysis/ECLAIR/deviations.ecl | 4
docs/misra/deviations.rst| 5 +
xen/include/xen/bitmap.h | 3 ---
3 files changed, 9 inse
Add MISRA C:2012 Rules 13.2 and 18.2 to the monitored set.
Signed-off-by: Federico Serafini
---
automation/eclair_analysis/ECLAIR/monitored.ecl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/automation/eclair_analysis/ECLAIR/monitored.ecl
b/automation/eclair_analysis/ECLAIR
Update ECLAIR configuration to deviate more cases where an
unintentional fallthrough cannot happen.
Tag Rule 16.3 as clean for arm.
Signed-off-by: Federico Serafini
---
Hi, v4 of this patch has been on hold due to discussion on whether or not
to consider switch clauses ending with
Tag more of the accepted guidelines as clean to avoid regressions.
Signed-off-by: Federico Serafini
---
automation/eclair_analysis/ECLAIR/tagging.ecl | 4
1 file changed, 4 insertions(+)
diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl
b/automation/eclair_analysis/ECLAIR
To improve readability, sort guidelines with -V.
No functional change.
---
.../eclair_analysis/ECLAIR/monitored.ecl | 92 +--
1 file changed, 46 insertions(+), 46 deletions(-)
diff --git a/automation/eclair_analysis/ECLAIR/monitored.ecl
b/automation/eclair_analysis/ECLAIR/m
Sort -v monitored guidelines and tag more guidelines as clean.
Federico Serafini (2):
automation/eclair: sort monitored guidelines with -V
automation/eclair: tag more guidelines as clean
.../eclair_analysis/ECLAIR/monitored.ecl | 92 +--
automation/eclair_analysis
Add break or pseudo keyword fallthrough to address violations of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/a
Add a missing break statement to address a violation of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch/x8
As a defensive measure, make sure to signal an error to the caller
if an unreachable program point is reached.
Signed-off-by: Federico Serafini
---
xen/arch/x86/hvm/emulate.c | 1 +
xen/arch/x86/hvm/hvm.c | 4
xen/arch/x86/hvm/vmx/vmcs.c | 2 ++
3 files changed, 7 insertions(+)
diff
Add defensive return statement at the end of an unreachable
default case. Other than improve safety, this meets the requirements
to deviate a violation of MISRA C Rule 16.3: "An unconditional `break'
statement shall terminate every switch-clause".
Signed-off-by: Federico Serafini
MISRA C Rule 16.3 states that "An unconditional `break' statement shall
terminate every switch-clause".
Add pseudo keyword fallthrough or missing break statement
to address violations of the rule.
Signed-off-by: Federico Serafini
---
Changes in v5:
- separate mechanical change
Add missing break statements to address violations of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch
Add missing break statements to address violations of MISRA C Rule
16.3: "An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Reviewed-by: Jan Beulich
---
xen/arch
This patch series fixes a missing escape in a deviation and addresses some
violations.
Federico Serafini (8):
automation/eclair: fix deviation of MISRA C Rule 16.3
x86/vpmu: address violations of MISRA C Rule 16.3
x86/traps: address violations of MISRA C Rule 16.3
x86/mce: address
ed-by: Jan Beulich
Signed-off-by: Federico Serafini
Acked-by: Stefano Stabellini
---
automation/eclair_analysis/ECLAIR/deviations.ecl | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl
b/automation/eclair_analysis/ECLAIR/deviations
On 24/07/24 11:45, Jan Beulich wrote:
On 15.07.2024 18:48, Federico Serafini wrote:
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -499,7 +499,7 @@ safe."
-doc_end
-doc_begin="Switch clauses ending with an explic
On 16/07/24 09:08, Jan Beulich wrote:
On 15.07.2024 18:48, Federico Serafini wrote:
Add break or pseudo keyword fallthrough to address violations of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-o
On 16/07/24 08:59, Jan Beulich wrote:
On 15.07.2024 18:48, Federico Serafini wrote:
This patch series fixes a missing escape in a deviation and addresses some
violations.
Federico Serafini (9):
automation/eclair: fix deviation of MISRA C Rule 16.3
x86/cpuid: use fallthrough pseudo
On 13/07/24 01:25, Stefano Stabellini wrote:
On Tue, 2 Jul 2024, Federico Serafini wrote:
On 01/07/24 10:47, Jan Beulich wrote:
On 26.06.2024 11:28, Federico Serafini wrote:
@@ -2798,11 +2800,12 @@ void hvm_emulate_one_vm_event(enum emul_kind kind,
unsigned int trapnr,
hvio
Add missing break statements to address violations of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch
Add defensive return statement at the end of an unreachable
default case. Other than improve safety, this meets the requirements
to deviate a violation of MISRA C Rule 16.3: "An unconditional `break'
statement shall terminate every switch-clause".
Signed-off-by: Federico Serafini
The current comment making explicit the fallthrough intention does
not follow the agreed syntax: replace it with the pseduo keyword.
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch/x86/cpuid.c | 3 +--
1 file changed
Add missing break statements to address violations of MISRA C Rule
16.3: "An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
---
xen/arch/x86/cpu/vpmu.c | 3 +++
x
eachable return statement is reached.
Signed-off-by: Federico Serafini
---
Changes in v4:
- do not separate different parts of HVM:
a) squash patches 8, 11 and 12 of v3 into this patch;
b) address also violations of SVM and VMX;
- re-arrange fallthrough positioning to comply with Coverity
This patch series fixes a missing escape in a deviation and addresses some
violations.
Federico Serafini (9):
automation/eclair: fix deviation of MISRA C Rule 16.3
x86/cpuid: use fallthrough pseudo keyword
x86/domctl: address a violation of MISRA C Rule 16.3
x86/vpmu: address violations
Add break or pseudo keyword fallthrough to address violations of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
---
xen/arch/x86/traps.c | 3 +++
Add a missing break statement to address a violation of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch/x8
Escape the final dot of the comment and extend the search of a
fallthrough comment up to 2 lines after the last statement.
Fixes: Fixes: a128d8da91 ("automation/eclair: add deviations for MISRA C:2012
Rule 16.3")
Reported-by: Jan Beulich
Signed-off-by: Federico Serafini
Acked-b
Add missing break statement to address a violation of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch/x86/do
On 01/07/24 10:49, Jan Beulich wrote:
On 26.06.2024 11:28, Federico Serafini wrote:
--- a/xen/arch/x86/hvm/vpt.c
+++ b/xen/arch/x86/hvm/vpt.c
@@ -118,9 +118,11 @@ static int pt_irq_masked(struct periodic_time *pt)
return 0;
gsi = hvm_isa_irq_to_gsi(pt->
On 01/07/24 10:47, Jan Beulich wrote:
On 26.06.2024 11:28, Federico Serafini wrote:
@@ -2798,11 +2800,12 @@ void hvm_emulate_one_vm_event(enum emul_kind kind,
unsigned int trapnr,
hvio->mmio_insn_bytes = sizeof(hvio->mmio_insn);
memcpy(hvio->mmio_insn, curr->a
ment is reached.
Signed-off-by: Federico Serafini
---
Changes in v3:
- squashed here modifications of pmtimer.c;
- no blank line after fallthrough;
- better indentation of fallthrough.
---
xen/arch/x86/hvm/emulate.c | 9 ++---
xen/arch/x86/hvm/hvm.c | 5 +
xen/arch/x86/hvm/hypercall.c
Add pseudokeyword fallthrough to meet the requirements to deviate
a violation of MISRA C Rul 16.3: "An unconditional `break' statement
shall terminate every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Be
Add pseudo keyword fallthrough to meet the requirements to deviate
a violation of MISRA C Rule 16.3 ("An unconditional `break'
statement shall terminate every switch-clause").
No functional change.
Signed-off-by: Federico Serafini
---
Changes in v3:
- better indentation of fallth
Add missing break statement to address a violation of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch/x86/do
Add missing break statements to address violations of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch
This patch series fixes a missing escape in a deviation and addresses some
violations.
Federico Serafini (12):
automation/eclair: fix deviation of MISRA C Rule 16.3
x86/cpuid: use fallthrough pseudo keyword
x86/domctl: address a violation of MISRA C Rule 16.3
x86/vpmu: address violations
Add missing break statement to address a violation of MISRA C
Rule 16.3: "An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch/x86/h
Add a missing break statement to address a violation of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch/x8
The current comment making explicit the fallthrough intention does
not follow the agreed syntax: replace it with the pseduo keyword.
No functional change.
Signed-off-by: Federico Serafini
Reviewed-by: Stefano Stabellini
Acked-by: Jan Beulich
---
xen/arch/x86/cpuid.c | 3 +--
1 file changed
Add defensive return statement at the end of an unreachable
default case. Other than improve safety, this meets the requirements
to deviate a violation of MISRA C Rule 16.3: "An unconditional `break'
statement shall terminate every switch-clause".
Signed-off-by: Federico Serafini
Add break or pseudo keyword fallthrough to address violations of
MISRA C Rule 16.3: "An unconditional `break' statement shall terminate
every switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
Changes in v3:
- use break instead of fallthrough.
---
xen/a
Add missing break statements to address violations of MISRA C Rule
16.3: "An unconditional `break' statement shall terminate every
switch-clause".
No functional change.
Signed-off-by: Federico Serafini
---
Changes in v3:
- addressed all violations of R16.3 in vpmu_intel.c
---
x
Escape the final dot of the comment and extend the search of a
fallthrough comment up to 2 lines after the last statement.
Fixes: a128d8da913b ("automation/eclair: add deviations for MISRA C:2012 Rule
16.3")
Reported-by: Jan Beulich
Signed-off-by: Federico Serafini
Acked-by: Stefano
or 'void
*', and thereby MISRA won't complain about code with such conversions?
Exactly, taking into account section 4.7 of GCC manual.
--
Federico Serafini, M.Sc.
Software Engineer, BUGSENG (http://bugseng.com)
On 26/06/24 03:59, Stefano Stabellini wrote:
On Tue, 25 Jun 2024, Federico Serafini wrote:
Update ECLAIR configuration to take into account the deviations
agreed during the MISRA meetings.
While doing this, remove the obsolete "Set [123]" comments.
Signed-off-by: Federico Serafin
Update ECLAIR configuration to take into account the deviations
agreed during the MISRA meetings.
While doing this, remove the obsolete "Set [123]" comments.
Signed-off-by: Federico Serafini
---
Changes in v2:
- keep sync between deviations.ecl and deviations.rst;
- use 'delibera
Update ECLAIR configuration to take into account the deviations
agreed during the MISRA meetings.
While doing this, remove the obsolete "Set [123]" comments.
Signed-off-by: Federico Serafini
---
.../eclair_analysis/ECLAIR/deviations.ecl | 93 +--
docs/misra/devi
On 24/06/24 17:16, Jan Beulich wrote:
On 24.06.2024 11:04, Federico Serafini wrote:
--- a/xen/arch/x86/cpu/vpmu_intel.c
+++ b/xen/arch/x86/cpu/vpmu_intel.c
@@ -713,6 +713,7 @@ static int cf_check core2_vpmu_do_rdmsr(unsigned int msr,
uint64_t *msr_content)
break
1 - 100 of 551 matches
Mail list logo