diff options
| author | Lorenzo Stoakes <[email protected]> | 2025-08-02 20:55:35 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2025-08-05 19:55:29 +0000 |
| commit | 084d2ac4030c5919e85bba1f4af26e33491469cb (patch) | |
| tree | 539d5ce488b609476996e79e3484b3ad2203af72 /drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | |
| parent | perf/core: Prevent VMA split of buffer mappings (diff) | |
| download | kernel-084d2ac4030c5919e85bba1f4af26e33491469cb.tar.gz kernel-084d2ac4030c5919e85bba1f4af26e33491469cb.zip | |
selftests/perf_events: Add a mmap() correctness test
Exercise various mmap(), munmap() and mremap() invocations, which might
cause a perf buffer mapping to be split or truncated.
To avoid hard coding the perf event and having dependencies on
architectures and configuration options, scan through event types in sysfs
and try to open them. On success, try to mmap() and if that succeeds try to
mmap() the AUX buffer.
In case that no AUX buffer supporting event is found, only test the base
buffer mapping. If no mappable event is found or permissions are not
sufficient, skip the tests.
Reserve a PROT_NONE region for both rb and aux tests to allow testing the
case where mremap unmaps beyond the end of a mapped VMA to prevent it from
unmapping unrelated mappings.
Signed-off-by: Lorenzo Stoakes <[email protected]>
Co-developed-by: Thomas Gleixner <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Lorenzo Stoakes <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c')
0 files changed, 0 insertions, 0 deletions
