summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorHalil Pasic <pasic@linux.ibm.com>2025-03-22 03:29:54 +0300
committerMichael S. Tsirkin <mst@redhat.com>2025-04-18 17:08:11 +0300
commitfbd3039a64b01b769040677c4fc68badeca8e3b2 (patch)
tree167571bfba9f15d468ca3f61d52b72fb35129493 /tools/perf/scripts/python/check-perf-trace.py
parent183a08715af1491d381b4e22efd61578fbe05fa5 (diff)
downloadlinux-fbd3039a64b01b769040677c4fc68badeca8e3b2.tar.xz
virtio_console: fix missing byte order handling for cols and rows
As per virtio spec the fields cols and rows are specified as little endian. Although there is no legacy interface requirement that would state that cols and rows need to be handled as native endian when legacy interface is used, unlike for the fields of the adjacent struct virtio_console_control, I decided to err on the side of caution based on some non-conclusive virtio spec repo archaeology and opt for using virtio16_to_cpu() much like for virtio_console_control.event. Strictly by the letter of the spec virtio_le_to_cpu() would have been sufficient. But when the legacy interface is not used, it boils down to the same. And when using the legacy interface, the device formatting these as little endian when the guest is big endian would surprise me more than it using guest native byte order (which would make it compatible with the current implementation). Nevertheless somebody trying to implement the spec following it to the letter could end up forcing little endian byte order when the legacy interface is in use. So IMHO this ultimately needs a judgement call by the maintainers. Fixes: 8345adbf96fc1 ("virtio: console: Accept console size along with resize control message") Signed-off-by: Halil Pasic <pasic@linux.ibm.com> Cc: stable@vger.kernel.org # v2.6.35+ Message-Id: <20250322002954.3129282-1-pasic@linux.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions