diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-03-21 18:27:46 +0100 |
|---|---|---|
| committer | Alexandre Courbot <acourbot@nvidia.com> | 2026-03-28 22:07:31 +0900 |
| commit | 18fb5f1f0289b8217c0c43d54d12bccc201dd640 (patch) | |
| tree | 53c5bf1d06212cdacb06b2d99ec58187f8913553 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 15a4bb87abac5229a4c36e34d388c4279d984b96 (diff) | |
rust: dma: remove DMA_ATTR_NO_KERNEL_MAPPING from public attrs
When DMA_ATTR_NO_KERNEL_MAPPING is passed to dma_alloc_attrs(), the
returned CPU address is not a pointer to the allocated memory but an
opaque handle (e.g. struct page *).
Coherent<T> (or CoherentAllocation<T> respectively) stores this value as
NonNull<T> and exposes methods that dereference it and even modify its
contents.
Remove the flag from the public attrs module such that drivers cannot
pass it to Coherent<T> (or CoherentAllocation<T> respectively) in the
first place.
Instead DMA_ATTR_NO_KERNEL_MAPPING can be supported with an additional
opaque type (e.g. CoherentHandle) which does not provide access to the
allocated memory.
Cc: stable@vger.kernel.org
Fixes: ad2907b4e308 ("rust: add dma coherent allocator abstraction")
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260321172749.592387-1-dakr@kernel.org
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
