Re: [PATCH 4/4] xen/version: Introduce non-truncating XENVER_* subops

2023-01-05 Thread Jan Beulich
On 05.01.2023 23:28, Andrew Cooper wrote: > On 05/01/2023 8:15 am, Jan Beulich wrote: >> On 04.01.2023 19:34, Andrew Cooper wrote: >>> On 04/01/2023 5:04 pm, Jan Beulich wrote: On 03.01.2023 21:09, Andrew Cooper wrote: > +if ( sz > INT32_MAX ) > +return -E2BIG; /* Compat gu

Re: [PATCH 4/4] xen/version: Introduce non-truncating XENVER_* subops

2023-01-05 Thread Andrew Cooper
On 05/01/2023 8:15 am, Jan Beulich wrote: > On 04.01.2023 19:34, Andrew Cooper wrote: >> On 04/01/2023 5:04 pm, Jan Beulich wrote: >>> On 03.01.2023 21:09, Andrew Cooper wrote: API/ABI wise, XENVER_build_id could be merged into xenver_varstring_op(), but the internal infrastructure

Re: [PATCH 4/4] xen/version: Introduce non-truncating XENVER_* subops

2023-01-05 Thread Jan Beulich
On 04.01.2023 19:34, Andrew Cooper wrote: > On 04/01/2023 5:04 pm, Jan Beulich wrote: >> On 03.01.2023 21:09, Andrew Cooper wrote: >>> API/ABI wise, XENVER_build_id could be merged into xenver_varstring_op(), >>> but >>> the internal infrastructure is awkward. >> I guess build-id also doesn't fit

Re: [PATCH 4/4] xen/version: Introduce non-truncating XENVER_* subops

2023-01-04 Thread Andrew Cooper
On 04/01/2023 5:04 pm, Jan Beulich wrote: > On 03.01.2023 21:09, Andrew Cooper wrote: >> Recently in XenServer, we have encountered problems caused by both >> XENVER_extraversion and XENVER_commandline having fixed bounds. >> >> More than just the invariant size, the APIs/ABIs also broken by typede

Re: [PATCH 4/4] xen/version: Introduce non-truncating XENVER_* subops

2023-01-04 Thread Jan Beulich
On 03.01.2023 21:09, Andrew Cooper wrote: > Recently in XenServer, we have encountered problems caused by both > XENVER_extraversion and XENVER_commandline having fixed bounds. > > More than just the invariant size, the APIs/ABIs also broken by typedef-ing an > array, and using an unqualified 'cha

Re: [PATCH 4/4] xen/version: Introduce non-truncating XENVER_* subops

2023-01-03 Thread Julien Grall
On 03/01/2023 21:22, Andrew Cooper wrote: On 03/01/2023 8:47 pm, Julien Grall wrote: On 03/01/2023 20:09, Andrew Cooper wrote: diff --git a/xen/include/public/version.h b/xen/include/public/version.h index c8325219f648..cf2d2ef38b54 100644 --- a/xen/include/public/version.h +++ b/xen/include

Re: [PATCH 4/4] xen/version: Introduce non-truncating XENVER_* subops

2023-01-03 Thread Andrew Cooper
On 03/01/2023 8:47 pm, Julien Grall wrote: > Hi Andrew, > > On 03/01/2023 20:09, Andrew Cooper wrote: >> diff --git a/xen/include/public/version.h b/xen/include/public/version.h >> index c8325219f648..cf2d2ef38b54 100644 >> --- a/xen/include/public/version.h >> +++ b/xen/include/public/version.h >>

Re: [PATCH 4/4] xen/version: Introduce non-truncating XENVER_* subops

2023-01-03 Thread Julien Grall
Hi Andrew, On 03/01/2023 20:09, Andrew Cooper wrote: diff --git a/xen/include/public/version.h b/xen/include/public/version.h index c8325219f648..cf2d2ef38b54 100644 --- a/xen/include/public/version.h +++ b/xen/include/public/version.h @@ -19,12 +19,20 @@ /* arg == NULL; returns major:minor (1

[PATCH 4/4] xen/version: Introduce non-truncating XENVER_* subops

2023-01-03 Thread Andrew Cooper
Recently in XenServer, we have encountered problems caused by both XENVER_extraversion and XENVER_commandline having fixed bounds. More than just the invariant size, the APIs/ABIs also broken by typedef-ing an array, and using an unqualified 'char' which has implementation-specific signed-ness. P