Bug 407376 - Update Xen support to 4.12 and add more coverage
Summary: Update Xen support to 4.12 and add more coverage
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Other
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-10 02:56 UTC by Tamas K Lengyel
Modified: 2020-04-29 11:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patchfile (19.62 KB, patch)
2019-05-10 02:56 UTC, Tamas K Lengyel
Details
Xen 4.13 support (32.08 KB, patch)
2020-01-03 20:12 UTC, Tamas K Lengyel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamas K Lengyel 2019-05-10 02:56:13 UTC
Created attachment 119941 [details]
Patchfile

SUMMARY

The attached patch updates Valgrind's support to Xen 4.12 and adds more coverage, specifically for hypercalls used by introspection tools like LibVMI.
Comment 1 Julian Seward 2019-12-30 09:53:05 UTC
The patch causes the following fall-though warning, and the resulting
merged code does indeed look suspicious.  Is this intended?  If not
can you make a revised patch?

In file included from m_syswrap/syswrap-xen.c:49:
m_syswrap/syswrap-xen.c: In function ‘vgSysWrap_xen_sysctl_before’:
./pub_core_tooliface.h:50:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
   50 |       if (VG_(tdict).track_##fn)  \
      |          ^
m_syswrap/priv_types_n_macros.h:618:4: note: in expansion of macro ‘VG_TRACK’
  618 |    VG_TRACK( pre_mem_read, Vg_CoreSysCall, tid, zzname, zzaddr, zzlen)
      |    ^~~~~~~~
m_syswrap/syswrap-xen.c:600:7: note: in expansion of macro ‘PRE_MEM_READ’
  600 |       PRE_MEM_READ("XEN_SYSCTL_" #_sysctl " u." #_union "." #_field, \
      |       ^~~~~~~~~~~~
m_syswrap/syswrap-xen.c:604:7: note: in expansion of macro ‘__PRE_XEN_SYSCTL_READ’
  604 |       __PRE_XEN_SYSCTL_READ(_sysctl, _sysctl, _field)
      |       ^~~~~~~~~~~~~~~~~~~~~
m_syswrap/syswrap-xen.c:640:3: note: in expansion of macro ‘PRE_XEN_SYSCTL_READ’
  640 |   PRE_XEN_SYSCTL_READ(getdomaininfolist_0000000a, buffer);
      |   ^~~~~~~~~~~~~~~~~~~
m_syswrap/syswrap-xen.c:641:7: note: here
  641 |       case 0x00000010:
      |       ^~~~
Comment 2 Tamas K Lengyel 2020-01-03 20:12:14 UTC
Created attachment 124881 [details]
Xen 4.13 support

Fixed the previous issue reported and a couple additional minor stuff I found. Also updated the support to include the recently released Xen 4.13 version.
Comment 3 Julian Seward 2020-01-22 09:57:04 UTC
Committed, c88133141a354d65568fb85037abc5e1f74ce46b.
Thanks for the patch.
Comment 4 Julian Seward 2020-01-22 09:59:01 UTC
*** Bug 390553 has been marked as a duplicate of this bug. ***
Comment 5 Mark Wielaard 2020-04-29 11:18:06 UTC
commit c88133141a354d65568fb85037abc5e1f74ce46b
Author: Julian Seward <jseward@acm.org>
Date:   Wed Jan 22 10:55:33 2020 +0100

    Bug 407376 - Update Xen support to 4.12 (4.13, actually) and add more covera
ge.
    
    Patch from Tamas K Lengyel (tamas@tklengyel.com).