[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/shadow: Don't use signed bitfield in sh_emulate_ctxt
commit 9c0b20700103d746824687383fd330f5da97b72d Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Mon May 9 11:18:20 2022 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Jun 15 10:51:57 2023 +0100 x86/shadow: Don't use signed bitfield in sh_emulate_ctxt 'int' bitfields in particular have implementation defined behaviour under gcc and can change signed-ness with -funsigned-bitfields. There is no need for low_bit_was_clear to be a bitfield in the first place; it is only used as a boolean. Doing so even improves the code generation in sh_emulate_map_dest() to avoid emitting a merge with structure padding. Spotted by Eclair MISRA scanner. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/mm/shadow/private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/shadow/private.h b/xen/arch/x86/mm/shadow/private.h index d02d70ab07..a0f275251f 100644 --- a/xen/arch/x86/mm/shadow/private.h +++ b/xen/arch/x86/mm/shadow/private.h @@ -815,7 +815,7 @@ struct sh_emulate_ctxt { #if (SHADOW_OPTIMIZATIONS & SHOPT_SKIP_VERIFY) /* Special case for avoiding having to verify writes: remember * whether the old value had its low bit (_PAGE_PRESENT) clear. */ - int low_bit_was_clear:1; + bool low_bit_was_clear; #endif }; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |