From: Dairui Zhang <zhangdairui@gmail.com>
To: Mina Almasry <almasrymina@google.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, David Wei <dw@davidwei.uk>,
Dairui Zhang <zhangdairui@gmail.com>
Subject: Re: [BUG] net: devmem: NETDEV_CMD_BIND_TX has no permission check and no accounting
Date: Tue, 22 Sep 2026 02:07:15 +0800 [thread overview]
Message-ID: <20260921180715.1411780-1-zhangdairui@gmail.com> (raw)
In-Reply-To: <20260920174727.1332115-1-zhangdairui@gmail.com>
Mina Almasry wrote:
> bind-tx is meant to be privileged.
>
> I hope to add a comment in the code this week. We get this suggestion
> quite often now :D
Thanks for the quick answer. Want me to send the patch adding
GENL_UNS_ADMIN_PERM to NETDEV_CMD_BIND_TX (same level as bind-rx),
or would you rather fold it into your own change?
Separate from the permission bit: even a privileged caller can
exhaust memory right now, since binds aren't accounted (GFP_KERNEL,
devmem.c:207) and the same dmabuf fd can be bound over and over.
Is it worth adding GFP_KERNEL_ACCOUNT plus a per-binding cap or fd
dedup? Happy to send patches for either.
Thanks,
Dairui Zhang
next prev parent reply other threads:[~2026-09-21 18:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 17:47 [BUG] net: devmem: NETDEV_CMD_BIND_TX has no permission check and no accounting Dairui Zhang
2026-09-21 18:07 ` Dairui Zhang [this message]
[not found] ` <CAHS8izOM-Mjh_s=0K=8rDdvDdwORCsNMiKf7eoir97i95DkqEg@mail.gmail.com>
2026-09-21 18:34 ` Stanislav Fomichev
2026-09-21 18:43 ` Dairui Zhang
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=20260921180715.1411780-1-zhangdairui@gmail.com \
--to=zhangdairui@gmail.com \
--cc=almasrymina@google.com \
--cc=dw@davidwei.uk \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sdf@fomichev.me \
/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