From: Vladimir Oltean <olteanv@gmail.com>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: What is the purpose of dev->gflags?
Date: Mon, 11 Apr 2022 19:50:30 +0300 [thread overview]
Message-ID: <20220411165030.f65ztltftgxkltmr@skbuf> (raw)
In-Reply-To: <686bf021-e6a4-c77a-33c9-5b01481e12f4@6wind.com>
On Mon, Apr 11, 2022 at 06:27:54PM +0200, Nicolas Dichtel wrote:
> Same here. Some complex path are called (eg. dev_change_rx_flags =>
> ops->ndo_change_rx_flags() => vlan_dev_change_rx_flags => dev_set_allmulti =>
> __dev_set_allmulti => etc).
> Maybe you made an audit to check that other flags cannot be changed. But, if it
> changes in the future, we will miss them here.
I guess I just don't see what other dev->flags that aren't masked out
from netdev notifier calls may or should change during the call to
__dev_set_allmulti(), regardless of the complexity or depth of the
call path.
And the commit that added the __dev_notify_flags() call said "dev:
always advertise rx_flags changes via netlink" (i.e. the function was
called for its rtmsg_ifinfo() part, not for its call_netdevice_notifiers()
part).
There *was* no call to dev_notify_flags prior to that commit, and it
didn't give a reason for voluntarily going through the netdev notifiers,
either.
> Did you see a bug? What is the issue?
I didn't see any bug, as mentioned I was trying to follow how
dev->gflags is used (see title) and stumbled upon this strange pattern
while doing so. dev->gflags is not updated from dev_set_allmulti()
almost by definition, otherwise in-kernel drivers wouldn't have a way to
update IFF_ALLMULTI without user space becoming aware of it.
The reason for emailing you to was to understand the intention, I do
understand that the code has went through changes since 2013 and that
a more in-depth audit is still needed before making any change.
next prev parent reply other threads:[~2022-04-11 16:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 18:30 What is the purpose of dev->gflags? Vladimir Oltean
2022-04-08 18:50 ` Jakub Kicinski
2022-04-08 19:17 ` Vladimir Oltean
2022-04-11 15:26 ` Nicolas Dichtel
2022-04-11 15:33 ` Vladimir Oltean
2022-04-11 15:43 ` Nicolas Dichtel
2022-04-11 15:49 ` Vladimir Oltean
2022-04-11 16:10 ` Nicolas Dichtel
2022-04-11 16:20 ` Vladimir Oltean
2022-04-11 16:27 ` Nicolas Dichtel
2022-04-11 16:50 ` Vladimir Oltean [this message]
2022-04-12 15:57 ` Nicolas Dichtel
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=20220411165030.f65ztltftgxkltmr@skbuf \
--to=olteanv@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.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