summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2024-12-04 15:39:23 +0000
committerJens Axboe <axboe@kernel.dk>2024-12-23 08:20:00 -0700
commitfebfbf767174b8a027efb7aa434f9a9416adc23d (patch)
tree5009edfe5ba35faee86f6c4ed1814bb9bd96c059 /tools/perf/scripts/python/exported-sql-viewer.py
parent546d191427cf5cf3215529744c2ea8558f0279db (diff)
io_uring/kbuf: fix unintentional sign extension on shift of reg.bgid
Shifting reg.bgid << IORING_OFF_PBUF_SHIFT results in a promotion from __u16 to a 32 bit signed integer, this is then sign extended to a 64 bit unsigned long on 64 bit architectures. If reg.bgid is greater than 0x7fff then this leads to a sign extended result where all the upper 32 bits of mmap_offset are set to 1. Fix this by casting reg.bgid to the same type as mmap_offset before performing the shift. Fixes: ef62de3c4ad5 ("io_uring/kbuf: use region api for pbuf rings") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20241204153923.401674-1-colin.i.king@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions