summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorFedor Pchelkin <pchelkin@ispras.ru>2024-11-27 21:59:26 +0300
committerChristoph Hellwig <hch@lst.de>2024-11-28 10:19:16 +0100
commitaef7ee7649e02f7fc0d2e5e532f352496976dcb1 (patch)
treefd6311f75d13304e346ac5781f119e9a45e1db0a /tools/perf/scripts/python/exported-sql-viewer.py
parent22293c33738c14bb84b9d3e771bc37150e7cf8e7 (diff)
downloadlinux-stable-aef7ee7649e02f7fc0d2e5e532f352496976dcb1.tar.gz
linux-stable-aef7ee7649e02f7fc0d2e5e532f352496976dcb1.tar.bz2
linux-stable-aef7ee7649e02f7fc0d2e5e532f352496976dcb1.zip
dma-debug: fix physical address calculation for struct dma_debug_entry
Offset into the page should also be considered while calculating a physical address for struct dma_debug_entry. page_to_phys() just shifts the value PAGE_SHIFT bits to the left so offset part is zero-filled. An example (wrong) debug assertion failure with CONFIG_DMA_API_DEBUG enabled which is observed during systemd boot process after recent dma-debug changes: DMA-API: e1000 0000:00:03.0: cacheline tracking EEXIST, overlapping mappings aren't supported WARNING: CPU: 4 PID: 941 at kernel/dma/debug.c:596 add_dma_entry CPU: 4 UID: 0 PID: 941 Comm: ip Not tainted 6.12.0+ #288 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:add_dma_entry kernel/dma/debug.c:596 Call Trace: <TASK> debug_dma_map_page kernel/dma/debug.c:1236 dma_map_page_attrs kernel/dma/mapping.c:179 e1000_alloc_rx_buffers drivers/net/ethernet/intel/e1000/e1000_main.c:4616 ... Found by Linux Verification Center (linuxtesting.org). Fixes: 9d4f645a1fd4 ("dma-debug: store a phys_addr_t in struct dma_debug_entry") Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru> [hch: added a little helper to clean up the code] Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions