mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: "T.J. Mercier" <tjmercier@google.com>,
	Sumit Semwal <sumit.semwal@linaro.org>
Cc: benjamin.gaignard@collabora.com, Brian.Starkey@arm.com,
	jstultz@google.com, linux-media@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
	shuah@kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kselftests: dmabuf-heaps: Open heap device files O_RDONLY
Date: Mon, 9 Nov 2026 12:10:42 +0100	[thread overview]
Message-ID: <04a02164-f69c-478e-80fc-1b8b3fcebb62@amd.com> (raw)
In-Reply-To: <CABdmKX3Ep0cAPakwKDYWnOkrFgfhsJAv9Mh1us+OfscyNeb2tw@mail.gmail.com>

On 11/6/26 19:42, T.J. Mercier wrote:
> On Wed, Aug 12, 2026 at 9:06 AM T.J. Mercier <tjmercier@google.com> wrote:
>>
>> On Wed, Aug 12, 2026 at 8:02 AM Sumit Semwal <sumit.semwal@linaro.org> wrote:
>>>
>>> Hello T J,
>>>
>>> On Wed, 12 Aug 2026 at 02:11, T.J. Mercier <tjmercier@google.com> wrote:
>>>>
>>>> Write permissions on the /dev/dma_heap/* device files are not required
>>>> to issue ioctls and allocate dmabufs. Applications should be opening
>>>> these file as O_RDONLY. The BPF dmabuf_iter selftest already does
>>>> this. [1]
>>>>
>>>> Users are pointing to these selftests as examples of how use dmabuf,
>>>> and encountering permission errors on systems where write permissions
>>>> are not available on /dev/dma_heap/*. Apply the principle of least
>>>> privilege to selftests which open dmabuf heaps by removing the write
>>>> access mode and using O_RDONLY for the open() instead.
>>>
>>> Thanks for the patch.
>>>>
>>>> The same is true for the vgem test using /dev/dri/card.
>>>>
>>>> [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>
>>> Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
>>
>> Thanks for the quick revieews John, Christian, and Sumit!
> 
> Hi, I don't think this has made it into any tree. Can this get picked up please?

Pushed to drm-misc-next.

T.J. I think it would be a good idea if you apply for commit rights to drm-misc.

The tooling used for that repo is a bit special, but considering how much Android uses DMA-buf it is probably a good idea that you are able to help pushing code upstream.

Regards,
Christian.

      reply	other threads:[~2026-11-09 11:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 20:41 T.J. Mercier
2026-08-11 20:57 ` John Stultz
2026-08-12  8:51 ` Christian König
2026-08-12 15:02 ` Sumit Semwal
2026-08-12 16:06   ` T.J. Mercier
2026-11-06 18:42     ` T.J. Mercier
2026-11-09 11:10       ` Christian König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04a02164-f69c-478e-80fc-1b8b3fcebb62@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Brian.Starkey@arm.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jstultz@google.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tjmercier@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®