diff options
| author | T.J. Mercier <tjmercier@google.com> | 2026-07-22 13:54:42 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-07-24 14:53:16 -0700 |
| commit | be6f0d0bae229ebd03e9bfe736f78e2d6b35885f (patch) | |
| tree | 4e05b3c36e18ca6d91a6e1ff006e264fda0bf7f8 /tools/perf/scripts/python | |
| parent | 89d8006259b81dd25c962f6cc8d7ab268d6ea426 (diff) | |
selftests: drv-net: ncdevmem: Open /dev/udmabuf O_RDONLY
Write permissions on the /dev/udmabuf device file are not required to
issue ioctls and allocate udmabufs. Applications should be opening this
file as O_RDONLY. The BPF dmabuf_iter selftest already does this. [1]
Users are pointing to these selftests as examples of how use udmabuf,
and encountering permission errors on systems where write permissions
are not available on /dev/udmabuf. Apply the principle of least
privilege to selftests which use udmabuf by removing the write access
mode from drivers/net/hw/ncdevmem.c.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c?h=v7.1#n49
Signed-off-by: T.J. Mercier <tjmercier@google.com>
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
Link: https://patch.msgid.link/20260722205442.1894665-1-tjmercier@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
