On 2025-08-14 21:37, Nicola Vetrini wrote:
On 2025-08-14 13:47, Andrew Cooper wrote:
On 14/08/2025 12:44 pm, Jan Beulich wrote:
On 14.08.2025 13:42, Andrew Cooper wrote:
On 14/08/2025 12:20 pm, Jan Beulich wrote:
On 08.08.2025 22:23, Andrew Cooper wrote:
--- a/xen/arch/x86/include/asm/x86-defns.h
+++ b/xen/arch/x86/include/asm/x86-defns.h
@@ -75,6 +75,7 @@
#define X86_CR4_PKE 0x00400000 /* enable PKE */
#define X86_CR4_CET 0x00800000 /* Control-flow Enforcement
Technology */
#define X86_CR4_PKS 0x01000000 /* Protection Key
Supervisor */
+#define X86_CR4_FRED 0x100000000 /* Fast Return and Event
Delivery */
... a UL suffix added here for Misra.
I was surprised, but Eclair is entirely fine with this.
And there is a use of the identifier in a monitored C file?
Yes. traps-setup.c which definitely has not been added to an
exclusion
list.
Might look into it before the end of the week, if time allows. Is [1]
the right branch to look at?
[1]
https://gitlab.com/xen-project/hardware/xen-staging/-/commits/andrew/fred
Actually thinking about it, this is indeed represented in a signed type
in x86: according to the standard it's just a signed long [2], therefore
the rule does not apply. Then you would have a R10 violation due to the
conversion at the callsite. I would put a U regardless, since the
intention was clearly to have an unsigned long.
[2] https://godbolt.org/z/rT5j4j9vj
~Andrew
--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253