summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2025-09-19 16:40:06 +0200
committerChristian König <christian.koenig@amd.com>2025-12-08 16:39:09 +0100
commit51db5336e16de25074ef63d29b8a762a25d193d3 (patch)
treef66261555d669866b76643991b72ded12479ab5b /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parent4ebaaa3b622238ea44fbaa21998ad76bd8417a8c (diff)
dma-buf: improve sg_table debugging hack v4
This debugging hack is important to enforce the rule that importers should *never* touch the underlying struct page of the exporter. Instead of just mangling the page link create a copy of the sg_table but only copy over the DMA addresses and not the pages. This will cause a NULL pointer de-reference if the importer tries to touch the struct page. Still quite a hack but this at least allows the exporter to properly keeps it's sg_table intact while allowing the DMA-buf maintainer to find and fix misbehaving importers and finally switch over to using a different data structure in the future. v2: improve the hack further by using a wrapper structure and explaining the background a bit more in the commit message. v3: fix some whitespace issues, use sg_assign_page(). v4: give the functions a better name Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Link: https://lore.kernel.org/r/20251205130604.1582-1-christian.koenig@amd.com
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions