Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2020-01-07 Thread Jan Beulich
On 06.01.2020 20:01, Andrew Cooper wrote: > On 09/12/2019 12:11, Jan Beulich wrote: >> On 06.12.2019 22:02, Andrew Cooper wrote: >>> On 12/11/2019 14:03, Jan Beulich wrote: Bottom line - I'm half convinced and willing to give my ack, but I'm not convinced you truly thought through the lon

Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2020-01-06 Thread Andrew Cooper
On 09/12/2019 12:11, Jan Beulich wrote: > On 06.12.2019 22:02, Andrew Cooper wrote: >> On 12/11/2019 14:03, Jan Beulich wrote: >>> Bottom line - I'm half convinced and willing to give my ack, but >>> I'm not convinced you truly thought through the longer term >>> consequences. I'd therefore be far

Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2019-12-09 Thread Julien Grall
Hi Jan, On 09/12/2019 12:11, Jan Beulich wrote: On 06.12.2019 22:02, Andrew Cooper wrote: On 12/11/2019 14:03, Jan Beulich wrote: Bottom line - I'm half convinced and willing to give my ack, but I'm not convinced you truly thought through the longer term consequences. I'd therefore be far happ

Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2019-12-09 Thread Jan Beulich
On 06.12.2019 22:02, Andrew Cooper wrote: > On 12/11/2019 14:03, Jan Beulich wrote: >> Bottom line - I'm half convinced and willing to give my ack, but >> I'm not convinced you truly thought through the longer term >> consequences. I'd therefore be far happier to see this patch >> split into a non-

Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2019-12-06 Thread Andrew Cooper
On 12/11/2019 14:03, Jan Beulich wrote: > On 12.11.2019 14:39, Andrew Cooper wrote: >> On 12/11/2019 08:35, Jan Beulich wrote: >>> On 11.11.2019 21:24, Andrew Cooper wrote: --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -1077,7 +1077,7 @@ long do_set_segment_base(un

Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2019-11-12 Thread Jan Beulich
On 12.11.2019 14:39, Andrew Cooper wrote: > On 12/11/2019 08:35, Jan Beulich wrote: >> On 11.11.2019 21:24, Andrew Cooper wrote: >>> --- a/xen/arch/x86/x86_64/mm.c >>> +++ b/xen/arch/x86/x86_64/mm.c >>> @@ -1077,7 +1077,7 @@ long do_set_segment_base(unsigned int which, unsigned >>> long base) >>>

Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2019-11-12 Thread Andrew Cooper
On 12/11/2019 08:35, Jan Beulich wrote: > On 11.11.2019 21:24, Andrew Cooper wrote: >> --- a/xen/arch/x86/x86_64/mm.c >> +++ b/xen/arch/x86/x86_64/mm.c >> @@ -1077,7 +1077,7 @@ long do_set_segment_base(unsigned int which, unsigned >> long base) >> } >> >> >> -/* Returns TRUE if given descript

Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2019-11-12 Thread Wei Liu
On Mon, Nov 11, 2019 at 08:24:43PM +, Andrew Cooper wrote: > actypes.h and efidef.h both define BOOLEAN as unsigned char, which is buggy in > combination with logic such as "BOOLEAN b = (a & 0x100);" Redefine BOOLEAN as > bool instead, which doesn't truncate. > > Both also define TRUE and FAL

Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2019-11-12 Thread Jan Beulich
On 11.11.2019 21:24, Andrew Cooper wrote: > --- a/xen/arch/x86/x86_64/mm.c > +++ b/xen/arch/x86/x86_64/mm.c > @@ -1077,7 +1077,7 @@ long do_set_segment_base(unsigned int which, unsigned > long base) > } > > > -/* Returns TRUE if given descriptor is valid for GDT or LDT. */ > +/* Returns true

Re: [Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2019-11-11 Thread Stefano Stabellini
On Mon, 11 Nov 2019, Andrew Cooper wrote: > actypes.h and efidef.h both define BOOLEAN as unsigned char, which is buggy in > combination with logic such as "BOOLEAN b = (a & 0x100);" Redefine BOOLEAN as > bool instead, which doesn't truncate. > > Both also define TRUE and FALSE, with actypes.h be

[Xen-devel] [PATCH for-4.13] xen: Drop bogus BOOLEAN definitions, TRUE and FALSE

2019-11-11 Thread Andrew Cooper
actypes.h and efidef.h both define BOOLEAN as unsigned char, which is buggy in combination with logic such as "BOOLEAN b = (a & 0x100);" Redefine BOOLEAN as bool instead, which doesn't truncate. Both also define TRUE and FALSE, with actypes.h being extra rude and replacing whatever exists thus fa