Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-14 Thread Jan Beulich
>>> On 14.02.19 at 00:30, wrote: > On Wed, 13 Feb 2019, Jan Beulich wrote: >> >>> On 13.02.19 at 02:17, wrote: >> > On Tue, 12 Feb 2019, Jan Beulich wrote: >> >> >>> On 12.02.19 at 13:01, wrote: >> >> > I would particularly welcome the opinion of hypervisor maintainers on >> >> > my type safety

Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-13 Thread Stefano Stabellini
On Wed, 13 Feb 2019, Jan Beulich wrote: > >>> On 13.02.19 at 02:17, wrote: > > On Tue, 12 Feb 2019, Jan Beulich wrote: > >> >>> On 12.02.19 at 13:01, wrote: > >> > I would particularly welcome the opinion of hypervisor maintainers on > >> > my type safety point, below. > >> > >> I agree with the

Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-13 Thread Jan Beulich
>>> On 13.02.19 at 02:17, wrote: > On Tue, 12 Feb 2019, Jan Beulich wrote: >> >>> On 12.02.19 at 13:01, wrote: >> > I would particularly welcome the opinion of hypervisor maintainers on >> > my type safety point, below. >> >> I agree with the requirements you put forward; I think I'd >> prefer t

Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-12 Thread Stefano Stabellini
se willing to take it over :-) Seriously, now that all the calls sites are marked appropriately and we all agree on the compare/subtract macro approach, it wouldn't be hard for somebody else to jump in and write the macros in their favorite way. Let me know if you would like to volunteer! >

Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-12 Thread Ian Jackson
Jan Beulich writes ("Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE"): > On 12.02.19 at 15:47, wrote: > > I didn't see your proposed inline function, but don't think it can > > work correctly because it won't be type-gen

Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-12 Thread Jan Beulich
>>> On 12.02.19 at 15:47, wrote: > Jan Beulich writes ("Re: [Xen-devel] [PATCH v9 2/5] xen: introduce > SYMBOLS_SUBTRACT and SYMBOLS_COMPARE"): >> On 12.02.19 at 13:01, wrote: >> > I would particularly welcome the opinion of hypervisor maintainers on &g

Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-12 Thread Ian Jackson
Jan Beulich writes ("Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE"): > On 12.02.19 at 13:01, wrote: > > I would particularly welcome the opinion of hypervisor maintainers on > > my type safety point, below. > > I agree with t

Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-12 Thread Jan Beulich
r macros though, not the least because they come with "built-in" type safety, rather than grafted one (by adding "pseudo" comparisons). > Stefano Stabellini writes ("[Xen-devel] [PATCH v9 2/5] xen: introduce > SYMBOLS_SUBTRACT and SYMBOLS_COMPARE"): >>

Re: [Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-12 Thread Ian Jackson
I would particularly welcome the opinion of hypervisor maintainers on my type safety point, below. Stefano Stabellini writes ("[Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE"): > +/* > + * Calculate (end - start), where start and/or end ar

[Xen-devel] [PATCH v9 2/5] xen: introduce SYMBOLS_SUBTRACT and SYMBOLS_COMPARE

2019-02-11 Thread Stefano Stabellini
Introduce two macros meant used everywhere symbols such as _stext and _etext are compared or subtracted in the code. They are needed because the C standard forbids for both comparisons and substraction (see C Standard, 6.5.6 [ISO/IEC 9899:2011] and [1]) between pointers pointing to different objec