Re: [Xen-devel] [PATCH v11 9/9] xen: explicit casts when DECLARE_BOUNDS cannot be used [and 1 more messages] [and 1 more messages]

2019-03-08 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH v11 9/9] xen: explicit casts when DECLARE_BOUNDS cannot be used [and 1 more messages]"): > Ian Jackson 03/07/19 4:26 PM >>> > >Jan, I'm not sure exactly what you are suggesting. Currently the > >array has one pointer per element. Are you suggesting it should have

Re: [Xen-devel] [PATCH v11 9/9] xen: explicit casts when DECLARE_BOUNDS cannot be used [and 1 more messages]

2019-03-08 Thread Jan Beulich
>>> Ian Jackson 03/07/19 4:26 PM >>> >Jan writes: > >> I disagree with the comment, > >I also disagree with the wording of the comment. It is seriously >misleading. These symbols do in fact refer to the same object! >The problem is that the compiler thinks otherwise. You need wording >like that

Re: [Xen-devel] [PATCH v11 9/9] xen: explicit casts when DECLARE_BOUNDS cannot be used [and 1 more messages]

2019-03-07 Thread Stefano Stabellini
On Thu, 7 Mar 2019, Ian Jackson wrote: > bug_frames > -- > > What appears to be going on is this: > > setup_virtual_regions contains a static const array of pointers to > struct bug_frame. These struct bug_frame* values are themselves > linker symbol values. > > Because the compiler has

Re: [Xen-devel] [PATCH v11 9/9] xen: explicit casts when DECLARE_BOUNDS cannot be used [and 1 more messages]

2019-03-07 Thread Ian Jackson
Stefano Stabellini writes ("[PATCH v11 9/9] xen: explicit casts when DECLARE_BOUNDS cannot be used"): > Sometimes the static inline functions provided by DECLARE_BOUNDS cannot > be used. This patch uses explicit casts to uintptr_t in those cases. > > M3CM: Rule-18.2: Subtraction between pointers

Re: [Xen-devel] [PATCH v11 9/9] xen: explicit casts when DECLARE_BOUNDS cannot be used

2019-03-07 Thread Jan Beulich
>>> On 05.03.19 at 23:38, wrote: > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -976,7 +976,8 @@ void __init noreturn __start_xen(unsigned long mbi_p) > * respective reserve_e820_ram() invocation below. > */ > mod[mbi->mods_count].mod_start = virt_to_mf

[Xen-devel] [PATCH v11 9/9] xen: explicit casts when DECLARE_BOUNDS cannot be used

2019-03-05 Thread Stefano Stabellini
Sometimes the static inline functions provided by DECLARE_BOUNDS cannot be used. This patch uses explicit casts to uintptr_t in those cases. M3CM: Rule-18.2: Subtraction between pointers shall only be applied to pointers that address elements of the same array https://wiki.sei.cmu.edu/confluence/