On 20.07.2023 02:23, Stefano Stabellini wrote:
> On Wed, 19 Jul 2023, Nicola Vetrini wrote:
>> MISRA C:2012 Rule 4.1 has the following headline:
>> "Octal and hexadecimal escape sequences shall be terminated."
>>
>> The string literals modified by this patch contain octal or
>> hexadecimal escape sequences that are neither terminated by the
>> end of the literal, nor by the beginning of another escape sequence.
>>
>> Therefore, such unterminated sequences have been split into a
>> separate literal as a way to comply with the rule and preserve the
>> semantics of the code.
>>
>> No functional changes.
>>
>> Signed-off-by: Nicola Vetrini <[email protected]>
> 
> Reviewed-by: Stefano Stabellini <[email protected]>

In order to get this off the plate
Acked-by: Jan Beulich <[email protected]>
albeit I'm not overly happy with ...

>> --- a/xen/arch/x86/hvm/hvm.c
>> +++ b/xen/arch/x86/hvm/hvm.c
>> @@ -3853,7 +3853,7 @@ void hvm_ud_intercept(struct cpu_user_regs *regs)
>>                                          cs, &addr) &&
>>               (hvm_copy_from_guest_linear(sig, addr, sizeof(sig),
>>                                           walk, NULL) == HVMTRANS_okay) &&
>> -             (memcmp(sig, "\xf\xbxen", sizeof(sig)) == 0) )
>> +             (memcmp(sig, "\xf\xb" "xen", sizeof(sig)) == 0) )

... this. Imo it should never have been a string literal here. But
I'm also not really up to making yet another alternative patch.

Jan

Reply via email to