On 01/07/2019 12:17, Jan Beulich wrote: > --- a/xen/arch/x86/x86_emulate/x86_emulate.h > +++ b/xen/arch/x86/x86_emulate/x86_emulate.h > @@ -662,8 +662,6 @@ static inline unsigned long *decode_gpr( > BUILD_BUG_ON(ARRAY_SIZE(cpu_user_regs_gpr_offsets) & > (ARRAY_SIZE(cpu_user_regs_gpr_offsets) - 1)); > > - ASSERT(modrm < ARRAY_SIZE(cpu_user_regs_gpr_offsets)); > - > /* Note that this also acts as array_access_nospec() stand-in. */
This comment needs adjusting to state that it is sometimes legitimate for higher modrm bits to be set, and truncating is the appropriate action to take, so noone is tempted to put the ASSERT() back in. With something along these lines, Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel