From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, Johannes Berg <johannes@sipsolutions.net>,
Nikolay Aleksandrov <razor@blackwall.org>,
Nicolas Dichtel <nicolas.dichtel@6wind.com>,
Guillaume Nault <gnault@redhat.com>,
Florent Fourcot <florent.fourcot@wifirst.fr>,
Florian Westphal <fw@strlen.de>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Hangbin Liu <liuhangbin@gmail.com>
Subject: Re: [PATCH net-next RESEND] genetlink: reject use of nlmsg_flags for new commands
Date: Thu, 29 Sep 2022 17:49:46 +0200 [thread overview]
Message-ID: <YzW+ml81tM9Rlt1i@salvia> (raw)
In-Reply-To: <20220929080650.370b5977@kernel.org>
On Thu, Sep 29, 2022 at 08:06:50AM -0700, Jakub Kicinski wrote:
> On Thu, 29 Sep 2022 16:53:34 +0200 Pablo Neira Ayuso wrote:
> > > + flags = nlh->nlmsg_flags;
> > > + if ((flags & NLM_F_DUMP) == NLM_F_DUMP) /* DUMP is 2 bits */
> > > + flags &= ~NLM_F_DUMP;
> >
> > no bail out for incorrectly set NLM_F_DUMP flag?
>
> Incorrectly? Special handling is because we want to make sure both bits
> are set for DUMP, if they are not we'll not clear them here and the
> condition below will fire. Or do you mean some other incorrectness?
I have seen software in the past setting only one of the bits in the
NLM_F_DUMP bitmask to request a dump. I agree that userspace software
relying in broken semantics and that software should be fixed. What I
am discussing if silently clearing the 2 bits is the best approach.
next prev parent reply other threads:[~2022-09-29 15:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-29 14:28 [PATCH net-next RESEND] genetlink: reject use of nlmsg_flags for new commands Jakub Kicinski
2022-09-29 14:53 ` Pablo Neira Ayuso
2022-09-29 15:06 ` Jakub Kicinski
2022-09-29 15:49 ` Pablo Neira Ayuso [this message]
2022-09-29 15:55 ` Jakub Kicinski
2022-09-29 17:27 ` Keller, Jacob E
2022-10-01 1:10 ` patchwork-bot+netdevbpf
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=YzW+ml81tM9Rlt1i@salvia \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florent.fourcot@wifirst.fr \
--cc=fw@strlen.de \
--cc=gnault@redhat.com \
--cc=jacob.e.keller@intel.com \
--cc=jhs@mojatatu.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.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 NNTP newsgroup(s).