From: Johannes Berg <johannes@sipsolutions.net>
To: Al Viro <viro@ZenIV.linux.org.uk>, netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>
Subject: Re: [RFC] separate SIOCGIFCONF from the rest of dev_ioctl()
Date: Mon, 26 Jun 2017 22:25:14 +0200 [thread overview]
Message-ID: <1498508714.24675.5.camel@sipsolutions.net> (raw)
In-Reply-To: <20170626174033.GA10672@ZenIV.linux.org.uk> (sfid-20170626_194046_038743_EA9764C4)
On Mon, 2017-06-26 at 18:40 +0100, Al Viro wrote:
> Only two of dev_ioctl() callers may pass SIOCGIFCONF to it.
> Separating that codepath from the rest of dev_ioctl() allows both
> to simplify dev_ioctl() itself (all other cases work with struct
> ifreq *)
> *and* seriously simplify the compat side of that beast: all it takes
> is passing to inet_gifconf() an extra argument - the size of
> individual
> records (sizeof(struct ifreq) or sizeof(struct compat_ifreq)). With
> dev_ifconf() called directly from sock_do_ioctl()/compat_dev_ifconf()
> that's easy to arrange.
No objection from me; however, I just introduced another special case
(in a bugfix for a >20yo bug ...) here:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=68dd02d19c811ca8ea60220a9d73e13b4bdad73a
It would perhaps make sense to also pull that out into the caller,
which could also get rid of the stupid way the #ifdef is placed in
sock_ioctl(). For compat, it's already pulled out anyway, even a level
up than where you're calling it for SIOCGIFCONF - might make sense to
put the wext stuff into compat_sock_ioctl_trans() too.
johannes
next prev parent reply other threads:[~2017-06-26 20:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-26 17:40 [RFC] separate SIOCGIFCONF from the rest of dev_ioctl() Al Viro
2017-06-26 20:25 ` Johannes Berg [this message]
2017-06-26 22:06 ` Al Viro
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=1498508714.24675.5.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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.