Hi Stefano,
On 11/8/18 10:27 PM, Stefano Stabellini wrote:
On Thu, 8 Nov 2018, Jan Beulich wrote:
On 06.11.18 at 23:05, <sstabell...@kernel.org> wrote:
Use SYMBOL everywhere _stext, _etext, etc. are used. Technically, it
is required when comparing and subtracting pointers [1], but use it
everywhere to avoid confusion.
I think using it when not needed is causing more confusion. Also
why would you then not use it on all other data symbols? The
patch will end up quite a bit more reasonable in size once you drop
the unnecessary changes.
OK, I am happy to do that. It will probably be better that way.
---
xen/arch/arm/alternative.c | 7 ++--
xen/arch/arm/arm32/livepatch.c | 2 +-
xen/arch/arm/arm64/livepatch.c | 2 +-
xen/arch/arm/domain_build.c | 2 +-
xen/arch/arm/livepatch.c | 6 +--
xen/arch/arm/mm.c | 17 ++++----
xen/arch/arm/setup.c | 8 ++--
xen/arch/x86/setup.c | 79 +++++++++++++++++++------------------
xen/arch/x86/tboot.c | 12 +++---
xen/arch/x86/x86_64/machine_kexec.c | 4 +-
xen/drivers/vpci/vpci.c | 7 +++-
xen/include/asm-arm/grant_table.h | 3 +-
xen/include/asm-arm/mm.h | 4 +-
xen/include/asm-x86/mm.h | 4 +-
xen/include/xen/kernel.h | 24 +++++------
15 files changed, 97 insertions(+), 84 deletions(-)
Just like for v2: Did you really check you caught them all? The vPCI
ones I had pointed at back then were only an example. Another
example now is xen/common/kernel.c:_cmdline_parse().
It is difficult to catch them all. Any suggestion on how to make sure
there are no leftover (other than waiting for the next QAVerify scan)?
The webpage [1] seems to suggest coverity would be able to catch the
undefined behavior fixed in that patch.
I am not sure what version of coverity is used to analyze Xen, but it
probably worth to have a try.
Cheers,
[1]
https://wiki.sei.cmu.edu/confluence/display/c/ARR36-C.+Do+not+subtract+or+compare+two+pointers+that+do+not+refer+to+the+same+array
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel