Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-buildrequires
valgrind
valgrind.xen-4.8-handle-IOCTL_GNTDEV_GRANT_COPY...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File valgrind.xen-4.8-handle-IOCTL_GNTDEV_GRANT_COPY.patch of Package valgrind
From: Olaf Hering <olaf@aepfle.de> Date: Fri, 16 Nov 2018 17:29:27 +0100 Subject: xen-4.8: handle IOCTL_GNTDEV_GRANT_COPY bz#390553 --- coregrind/m_syswrap/syswrap-linux.c | 15 +++++++++++++++ include/vki/vki-linux.h | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -8534,24 +8534,33 @@ PRE(sys_ioctl) break; case VKI_XEN_IOCTL_GNTALLOC_SET_UNMAP_NOTIFY: { struct vki_xen_ioctl_gntalloc_set_unmap_notify *args = (struct vki_xen_ioctl_gntalloc_set_unmap_notify*)(Addr)(ARG3); PRE_MEM_READ("VKI_XEN_IOCTL_GNTALLOC_set_unmap_notify(index)", (Addr)&args->index, sizeof(args->index)); PRE_MEM_READ("VKI_XEN_IOCTL_GNTALLOC_set_unmap_notify(action)", (Addr)&args->action, sizeof(args->action)); PRE_MEM_READ("VKI_XEN_IOCTL_GNTALLOC_set_unmap_notify(event_channel_port)", (Addr)&args->event_channel_port, sizeof(args->event_channel_port)); } break; + case VKI_XEN_IOCTL_GNTDEV_GRANT_COPY: { + struct vki_xen_ioctl_gntdev_grant_copy *args = + (struct vki_xen_ioctl_gntdev_grant_copy*)(Addr)(ARG3); + PRE_MEM_READ("VKI_XEN_IOCTL_GNTDEV_grant_copy(count)", + (Addr)&args->count, sizeof(args->count)); + PRE_MEM_READ("VKI_XEN_IOCTL_GNTDEV_grant_copy(segments)", + (Addr)args->segments, sizeof(*(args->segments)) * args->count); + } + break; #endif /* Lustre */ case VKI_OBD_IOC_FID2PATH: { struct vki_getinfo_fid2path *gf = (struct vki_getinfo_fid2path *)(Addr)ARG3; PRE_MEM_READ("VKI_OBD_IOC_FID2PATH(args)", ARG3, sizeof(struct vki_getinfo_fid2path)); PRE_FIELD_WRITE("VKI_OBD_IOC_FID2PATH(args).gf_recno", gf->gf_recno); PRE_FIELD_WRITE("VKI_OBD_IOC_FID2PATH(args).gf_linkno", gf->gf_linkno); PRE_MEM_WRITE("VKI_OBD_IOC_FID2PATH(args)", (Addr)gf->gf_path, gf->gf_pathlen); break; } @@ -11172,24 +11181,30 @@ POST(sys_ioctl) struct vki_xen_ioctl_gntalloc_alloc_gref *args = (struct vki_xen_ioctl_gntalloc_alloc_gref*)(Addr)(ARG3); POST_FIELD_WRITE(args->index); POST_FIELD_WRITE(args->count); POST_MEM_WRITE((Addr)&args->gref_ids, sizeof(args->gref_ids) * sizeof(args->count)); } break; case VKI_XEN_IOCTL_GNTALLOC_DEALLOC_GREF: case VKI_XEN_IOCTL_GNTALLOC_SET_UNMAP_NOTIFY: /* No output */ break; + case VKI_XEN_IOCTL_GNTDEV_GRANT_COPY: { + struct vki_xen_ioctl_gntdev_grant_copy *args = + (struct vki_xen_ioctl_gntdev_grant_copy*)(Addr)(ARG3); + POST_MEM_WRITE((Addr)args->segments, sizeof(*(args->segments)) * args->count); + } + break; #endif /* Lustre */ case VKI_OBD_IOC_FID2PATH: { struct vki_getinfo_fid2path *args = (void *)(Addr)(ARG3); POST_FIELD_WRITE(args->gf_recno); POST_FIELD_WRITE(args->gf_linkno); POST_MEM_WRITE((Addr)args->gf_path, VG_(strlen)(args->gf_path)+1); break; } case VKI_LL_IOC_PATH2FID: --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -3557,24 +3557,45 @@ struct vki_xen_ioctl_gntalloc_dealloc_gref { __vki_u64 index; vki_u32 count; }; #define VKI_XEN_IOCTL_GNTALLOC_SET_UNMAP_NOTIFY \ _VKI_IOC(_VKI_IOC_NONE, 'G', 7, sizeof(struct vki_xen_ioctl_gntalloc_set_unmap_notify)) struct vki_xen_ioctl_gntalloc_set_unmap_notify { __vki_u64 index; vki_u32 action; vki_u32 event_channel_port; }; +#define VKI_XEN_IOCTL_GNTDEV_GRANT_COPY \ + _VKI_IOC(_VKI_IOC_NONE, 'G', 8, sizeof(struct vki_xen_ioctl_gntdev_grant_copy)) +struct vki_xen_gntdev_grant_copy_segment { + union { + void *virt; + struct { + vki_u32 ref; /* grant_ref_t */ + vki_u16 offset; + vki_u16 domid; /* domid_t */ + } foreign; + } source, dest; + vki_u16 len; + vki_u16 flags; /* GNTCOPY_* */ + __vki_s16 status; /* GNTST_* */ +}; + +struct vki_xen_ioctl_gntdev_grant_copy { + vki_uint32_t count; + struct vki_xen_gntdev_grant_copy_segment *segments; +}; + //---------------------------------------------------------------------- // From linux-3.4.0/include/linux/fs.h //---------------------------------------------------------------------- struct vki_file_handle { __vki_u32 handle_bytes; int handle_type; /* file identifier */ unsigned char f_handle[0]; }; //----------------------------------------------------------------------
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor