[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



>>> Ian Jackson <ian.jackson@xxxxxxxxxx> 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 in DECLARE_BOUNDS.  (Or a reference to it.)
>
>> and if you think it is correct, then no
>> matter what you do the behavior is undefined. Instead I view the
>> entirety of the .bug_frames.* sections as a single array, with
>> labels placed not only at start and end, but also in the middle. I
>> think the code here would better also be taken care of by the
>> DECLARE_BOUNDS() machinery, dividing the single array into
>> multiple smaller ones.
>
>Jan, I'm not sure exactly what you are suggesting.  Currently the
>array has one pointer per element.  Are you suggesting it should have
>two pointers (start and end), with different notional types ?

Yes.


>If that is OK from a perf point of view then it is an easy answer
>(although a bit tiresome since more linker symbols will have to be
>generated).

This is init-time code and init-time data, so to me neither the performance
aspect nor the doubled storage requirements would really matter. Both
could perhaps even be eliminated by using an array of unions.


Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.