Re: [PATCH] xen/efi: Rewrite DOS/PE magic checking without memcmp()

2024-04-18 Thread Andrew Cooper
On 17/04/2024 8:14 am, Roger Pau Monné wrote: > On Tue, Apr 16, 2024 at 04:52:51PM +0100, Andrew Cooper wrote: >> Misra Rule 21.16 doesn't like the use of memcmp() between a string literal >> and >> a UINT8 array. Rewrite using plain compares. > The commit message makes it look like it's a type

Re: [PATCH] xen/efi: Rewrite DOS/PE magic checking without memcmp()

2024-04-18 Thread Andrew Cooper
On 18/04/2024 12:09 pm, Jan Beulich wrote: > On 16.04.2024 17:52, Andrew Cooper wrote: >> Misra Rule 21.16 doesn't like the use of memcmp() between a string literal >> and >> a UINT8 array. Rewrite using plain compares. >> >> No functional change. >> >> Signed-off-by: Andrew Cooper >

Re: [PATCH] xen/efi: Rewrite DOS/PE magic checking without memcmp()

2024-04-18 Thread Andrew Cooper
On 18/04/2024 12:06 pm, Jan Beulich wrote: > On 17.04.2024 09:14, Roger Pau Monné wrote: >> On Tue, Apr 16, 2024 at 04:52:51PM +0100, Andrew Cooper wrote: >>> --- a/xen/common/efi/pe.c >>> +++ b/xen/common/efi/pe.c >>> @@ -111,7 +111,8 @@ const void *__init pe_find_section(const void *image, >>>

Re: [PATCH] xen/efi: Rewrite DOS/PE magic checking without memcmp()

2024-04-18 Thread Jan Beulich
On 16.04.2024 17:52, Andrew Cooper wrote: > Misra Rule 21.16 doesn't like the use of memcmp() between a string literal and > a UINT8 array. Rewrite using plain compares. > > No functional change. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich after having realized that sadly gcc13

Re: [PATCH] xen/efi: Rewrite DOS/PE magic checking without memcmp()

2024-04-18 Thread Jan Beulich
On 17.04.2024 09:14, Roger Pau Monné wrote: > On Tue, Apr 16, 2024 at 04:52:51PM +0100, Andrew Cooper wrote: >> --- a/xen/common/efi/pe.c >> +++ b/xen/common/efi/pe.c >> @@ -111,7 +111,8 @@ const void *__init pe_find_section(const void *image, >> const UINTN image_size, >> UINTN offset, i;

Re: [PATCH] xen/efi: Rewrite DOS/PE magic checking without memcmp()

2024-04-17 Thread Roger Pau Monné
On Tue, Apr 16, 2024 at 04:52:51PM +0100, Andrew Cooper wrote: > Misra Rule 21.16 doesn't like the use of memcmp() between a string literal and > a UINT8 array. Rewrite using plain compares. The commit message makes it look like it's a type mismatch issue between the two elements being compared,

Re: [PATCH] xen/efi: Rewrite DOS/PE magic checking without memcmp()

2024-04-16 Thread Stefano Stabellini
On Tue, 16 Apr 2024, Andrew Cooper wrote: > Misra Rule 21.16 doesn't like the use of memcmp() between a string literal and > a UINT8 array. Rewrite using plain compares. > > No functional change. > > Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini > --- > CC: Jan Beulich > CC:

[PATCH] xen/efi: Rewrite DOS/PE magic checking without memcmp()

2024-04-16 Thread Andrew Cooper
Misra Rule 21.16 doesn't like the use of memcmp() between a string literal and a UINT8 array. Rewrite using plain compares. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Stefano Stabellini CC: consult...@bugseng.com CC: Roberto Bagnara CC: