Thread (5 messages) 5 messages, 2 authors, 18d ago

Re: [PATCH] selftests: Open /dev/udmabuf O_RDONLY

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-07-01 18:57:10
Also in: bpf, linux-kselftest, lkml

On Wed, 1 Jul 2026 11:53:15 -0700 T.J. Mercier wrote:
On Fri, Jun 26, 2026 at 6:09 PM Jakub Kicinski [off-list ref] wrote:
quoted
On Thu, 25 Jun 2026 11:15:55 -0700 T.J. Mercier wrote:  
quoted
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]

Remove the write access mode from the drivers/dma-buf/udmabuf.c and
drivers/net/hw/ncdevmem.c selftests.  
You need to explain "why", too. Why change it if it clearly
worked for everyone running this test until now.
--
pw-bot: cr  
Principle of least privilege. Folks use or point to these selftests as
examples, and then wonder why O_RDWR doesn't work on systems where
write permissions are not available on /dev/udmabuf.
Alright, pop that into the commit msg and repost please.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help