Re: [Xen-devel] [PATCH v11 8/9] xen: use DECLARE_BOUNDS in alternative.c

2019-03-06 Thread Stefano Stabellini
On Wed, 6 Mar 2019, Jan Beulich wrote: > >>> On 05.03.19 at 23:38, wrote: > > @@ -193,8 +191,10 @@ void init_or_livepatch apply_alternatives(struct > > alt_instr *start, > > Seeing this relevant part of the function parameters, ... > > > * > > * So be careful if you want to change t

Re: [Xen-devel] [PATCH v11 8/9] xen: use DECLARE_BOUNDS in alternative.c

2019-03-06 Thread Jan Beulich
>>> On 05.03.19 at 23:38, wrote: > @@ -193,8 +191,10 @@ void init_or_livepatch apply_alternatives(struct > alt_instr *start, Seeing this relevant part of the function parameters, ... > * > * So be careful if you want to change the scan order to any other > * order. > + * >

[Xen-devel] [PATCH v11 8/9] xen: use DECLARE_BOUNDS in alternative.c

2019-03-05 Thread Stefano Stabellini
Use DECLARE_BOUNDS and the two static inline functions that come with it for comparisons and subtractions of: __alt_instructions, __alt_instructions_end M3CM: Rule-18.2: Subtraction between pointers shall only be applied to pointers that address elements of the same array https://wiki.sei.cmu.ed