aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorJason J. Herne <[email protected]>2017-07-21 03:14:36 +0200
committerCornelia Huck <[email protected]>2017-07-24 09:54:37 +0200
commitc389377c01bf2d6e2a178e86aef8535931bfbd75 (patch)
tree0d8a78e41190e41a9d38ca16b114b351abaea7ae /tools/perf/scripts/python/export-to-postgresql.py
parent97ca7bfc19605bc08e9183441b8b8545e84032d6 (diff)
vfio: ccw: fix bad ptr math for TIC cda translation
When we are translating channel data addresses from guest to host address space for TIC instructions we are getting incorrect addresses because of a pointer arithmetic error. We currently calculate the offset of the TIC's cda from the start of the channel program chain (ccw->cda - ccw_head). We then add that to the address of the ccw chain in host memory (iter->ch_ccw). The problem is that iter->ch_ccw is a pointer to struct ccw1 so when we increment it we are actually incrementing by the size of struct ccw1 which is 8 bytes. The intent was to increment by n-bytes, not n*8. The fix: cast iter->ch_ccw to char* so it will be incremented by n*1. Reviewed-by: Dong Jia Shi <[email protected]> Signed-off-by: Jason J. Herne <[email protected]> Signed-off-by: Dong Jia Shi <[email protected]> Message-Id: <[email protected]> Signed-off-by: Cornelia Huck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions