Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-14 Thread Nicola Vetrini
On 2023-11-11 02:13, Stefano Stabellini wrote: On Fri, 10 Nov 2023, Nicola Vetrini wrote: Hi everyone, I trimmed the thread a bit, to make this more readable. > > > > > IMHO, the only viable option would be to have a configuration to > > > > > keep > > > > > ASSERT in production build for

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-10 Thread Stefano Stabellini
On Fri, 10 Nov 2023, Nicola Vetrini wrote: > Hi everyone, > > I trimmed the thread a bit, to make this more readable. > > > > > > > IMHO, the only viable option would be to have a configuration to > > > > > > keep > > > > > > ASSERT in production build for scanning tools. > > > > > > > > > >

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-10 Thread Andrew Cooper
On 08/11/2023 1:45 pm, Nicola Vetrini wrote: > On 2023-11-08 14:37, Andrew Cooper wrote: >> On 03/11/2023 5:58 pm, Nicola Vetrini wrote: >>> Static analysis tools may detect a possible null >>> pointer dereference at line 760 (the memcpy call) >>> of xen/common/domain.c. This ASSERT helps them in

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-10 Thread Nicola Vetrini
Hi everyone, I trimmed the thread a bit, to make this more readable. IMHO, the only viable option would be to have a configuration to keep ASSERT in production build for scanning tools. But wouldn't that then likely mean scanning to be done on builds not also used in production? Would

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-10 Thread Julien Grall
Hi Stefano, On 10/11/2023 00:29, Stefano Stabellini wrote: On Thu, 9 Nov 2023, Julien Grall wrote: On 09/11/2023 07:42, Jan Beulich wrote: On 08.11.2023 14:33, Julien Grall wrote: Hi Jan, On 08/11/2023 11:19, Jan Beulich wrote: On 08.11.2023 12:03, Nicola Vetrini wrote: On 2023-11-08

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-09 Thread Stefano Stabellini
On Thu, 9 Nov 2023, Julien Grall wrote: > On 09/11/2023 07:42, Jan Beulich wrote: > > On 08.11.2023 14:33, Julien Grall wrote: > > > Hi Jan, > > > > > > On 08/11/2023 11:19, Jan Beulich wrote: > > > > On 08.11.2023 12:03, Nicola Vetrini wrote: > > > > > On 2023-11-08 09:24, Jan Beulich wrote: > >

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-09 Thread Julien Grall
Hi Jan, On 09/11/2023 07:42, Jan Beulich wrote: On 08.11.2023 14:33, Julien Grall wrote: Hi Jan, On 08/11/2023 11:19, Jan Beulich wrote: On 08.11.2023 12:03, Nicola Vetrini wrote: On 2023-11-08 09:24, Jan Beulich wrote: On 03.11.2023 18:58, Nicola Vetrini wrote: Static analysis tools may

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-08 Thread Jan Beulich
On 08.11.2023 14:28, Nicola Vetrini wrote: > On 2023-11-08 12:19, Jan Beulich wrote: >> On 08.11.2023 12:03, Nicola Vetrini wrote: >>> On 2023-11-08 09:24, Jan Beulich wrote: On 03.11.2023 18:58, Nicola Vetrini wrote: > Static analysis tools may detect a possible null > pointer

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-08 Thread Jan Beulich
On 08.11.2023 14:33, Julien Grall wrote: > Hi Jan, > > On 08/11/2023 11:19, Jan Beulich wrote: >> On 08.11.2023 12:03, Nicola Vetrini wrote: >>> On 2023-11-08 09:24, Jan Beulich wrote: On 03.11.2023 18:58, Nicola Vetrini wrote: > Static analysis tools may detect a possible null >

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-08 Thread Nicola Vetrini
On 2023-11-08 14:37, Andrew Cooper wrote: On 03/11/2023 5:58 pm, Nicola Vetrini wrote: Static analysis tools may detect a possible null pointer dereference at line 760 (the memcpy call) of xen/common/domain.c. This ASSERT helps them in detecting that such a condition is not possible and also

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-08 Thread Andrew Cooper
On 03/11/2023 5:58 pm, Nicola Vetrini wrote: > Static analysis tools may detect a possible null > pointer dereference at line 760 (the memcpy call) > of xen/common/domain.c. This ASSERT helps them in > detecting that such a condition is not possible > and also provides a basic sanity check. > >

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-08 Thread Julien Grall
Hi Jan, On 08/11/2023 11:19, Jan Beulich wrote: On 08.11.2023 12:03, Nicola Vetrini wrote: On 2023-11-08 09:24, Jan Beulich wrote: On 03.11.2023 18:58, Nicola Vetrini wrote: Static analysis tools may detect a possible null pointer dereference at line 760 (the memcpy call) of

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-08 Thread Nicola Vetrini
On 2023-11-08 12:19, Jan Beulich wrote: On 08.11.2023 12:03, Nicola Vetrini wrote: On 2023-11-08 09:24, Jan Beulich wrote: On 03.11.2023 18:58, Nicola Vetrini wrote: Static analysis tools may detect a possible null pointer dereference at line 760 (the memcpy call) of xen/common/domain.c. This

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-08 Thread Jan Beulich
On 08.11.2023 12:03, Nicola Vetrini wrote: > On 2023-11-08 09:24, Jan Beulich wrote: >> On 03.11.2023 18:58, Nicola Vetrini wrote: >>> Static analysis tools may detect a possible null >>> pointer dereference at line 760 (the memcpy call) >>> of xen/common/domain.c. This ASSERT helps them in >>>

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-08 Thread Nicola Vetrini
On 2023-11-08 09:24, Jan Beulich wrote: On 03.11.2023 18:58, Nicola Vetrini wrote: Static analysis tools may detect a possible null pointer dereference at line 760 (the memcpy call) of xen/common/domain.c. This ASSERT helps them in detecting that such a condition is not possible and also

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-08 Thread Jan Beulich
On 03.11.2023 18:58, Nicola Vetrini wrote: > Static analysis tools may detect a possible null > pointer dereference at line 760 (the memcpy call) > of xen/common/domain.c. This ASSERT helps them in > detecting that such a condition is not possible > and also provides a basic sanity check. I

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-06 Thread Stefano Stabellini
On Fri, 3 Nov 2023, Nicola Vetrini wrote: > On 2023-11-03 18:58, Nicola Vetrini wrote: > > Static analysis tools may detect a possible null > > pointer dereference at line 760 (the memcpy call) > > of xen/common/domain.c. This ASSERT helps them in > > detecting that such a condition is not

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-03 Thread Nicola Vetrini
On 2023-11-03 18:58, Nicola Vetrini wrote: Static analysis tools may detect a possible null pointer dereference at line 760 (the memcpy call) of xen/common/domain.c. This ASSERT helps them in detecting that such a condition is not possible and also provides a basic sanity check. Suggested-by:

[XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-03 Thread Nicola Vetrini
Static analysis tools may detect a possible null pointer dereference at line 760 (the memcpy call) of xen/common/domain.c. This ASSERT helps them in detecting that such a condition is not possible and also provides a basic sanity check. Signed-off-by: Nicola Vetrini --- The check may be later