From: "Iván Ezequiel Rodriguez" <ivanrwcm25@gmail.com>
To: kraxel@redhat.com, vivek.kasireddy@intel.com
Cc: dri-devel@lists.freedesktop.org,
linux-kselftest@lists.kernel.org, linux-kernel@vger.kernel.org,
"Iván Ezequiel Rodriguez" <ivanrwcm25@gmail.com>
Subject: [PATCH 0/1] udmabuf: reject unknown UDMABUF_CREATE flags
Date: Wed, 1 Jul 2026 14:21:58 -0300 [thread overview]
Message-ID: <20260701172159.270872-1-ivanrwcm25@gmail.com> (raw)
UDMABUF_CREATE and UDMABUF_CREATE_LIST only define UDMABUF_FLAGS_CLOEXEC
in include/uapi/linux/udmabuf.h. Today the driver masks unknown flag bits
and returns a dmabuf fd anyway, so userspace cannot tell that an
unsupported flag was ignored. dma-heap already rejects unknown fd_flags
and heap_flags with -EINVAL; apply the same policy in udmabuf_create(),
which is shared by both ioctls.
This series adds the driver check, documents the flag semantics in the
uapi header, and extends the existing kselftest with test-unknown-flags
(UDMABUF_FLAGS_CLOEXEC | 0x2 must fail).
Tested with the udmabuf kselftest on a kernel built with this patch
(test-unknown-flags PASS).
Iván Ezequiel Rodriguez (1):
udmabuf: reject unknown UDMABUF_CREATE flags
drivers/dma-buf/udmabuf.c | 3 +++
include/uapi/linux/udmabuf.h | 13 +++++++++++++
tools/testing/selftests/drivers/dma-buf/udmabuf.c | 14 +++++++++++++-
3 files changed, 29 insertions(+), 1 deletion(-)
--
2.43.0
next reply other threads:[~2026-07-01 17:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 17:21 Iván Ezequiel Rodriguez [this message]
2026-07-01 17:21 ` [PATCH 1/1] udmabuf: reject unknown UDMABUF_CREATE flags Iván Ezequiel Rodriguez
2026-07-01 17:39 ` sashiko-bot
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=20260701172159.270872-1-ivanrwcm25@gmail.com \
--to=ivanrwcm25@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@lists.kernel.org \
--cc=vivek.kasireddy@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.