From: Breno Leitao <leitao@debian.org>
To: dccp@vger.kernel.org
Subject: Re: [PATCH net-next v4] net: ioctl: Use kernel memory on protocol ioctl callbacks
Date: Fri, 02 Jun 2023 16:19:06 +0000 [thread overview]
Message-ID: <ZHoWeiDVoLV1VMpT@gmail.com> (raw)
In-Reply-To: <20230530175403.2434218-1-leitao@debian.org>
On Wed, May 31, 2023 at 03:01:56AM -0400, Willem de Bruijn wrote:
> Breno Leitao wrote:
> > +int ip6mr_sk_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
> > +static inline int sk_is_ip6mr(struct sock *sk)
> > +{
> > + return sk->sk_family = AF_INET6 &&
> > + inet_sk(sk)->inet_num = IPPROTO_ICMPV6;
> > +}
> Technically, this is just sk_is_icmpv6, which is broader than IPv6
> multicast routing.
Right, let me rename it to reflect this properly.
> No other concerns from me.
Thanks for the detailed review.
> Two small asides, that are fine to ignore.
>
> The $PROTO_sk_ioctl functions could conceivably call directly into
> the $PROTO_ioctl functions without the indirect function pointer.
> But that would require open coding the sock_sk_ioctl_inout helpers.
>
> The demux now first checks relatively unlikely multicast routing
> and phonet before falling through to the more common protocols. But
> ioctl is not a hot path operation.
I am more than happy to open code sock_sk_ioctl_inout into protocol
functions, but, I would prefer to do it in a follow up patch, since this
one is close (I hope) to address the original problem. I hope it works
for you.
Thanks!
prev parent reply other threads:[~2023-06-02 16:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 17:53 [PATCH net-next v4] net: ioctl: Use kernel memory on protocol ioctl callbacks Breno Leitao
2023-05-31 7:01 ` Willem de Bruijn
2023-05-31 13:36 ` kernel test robot
2023-06-01 3:27 ` kernel test robot
2023-06-02 16:19 ` Breno Leitao [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=ZHoWeiDVoLV1VMpT@gmail.com \
--to=leitao@debian.org \
--cc=dccp@vger.kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).