Ethernet Bridge development
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Nikolay Aleksandrov <razor@blackwall.org>,
	Ido Schimmel <idosch@idosch.org>
Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
	davem@davemloft.net, kuba@kernel.org, roopa@nvidia.com
Subject: Re: [Bridge] [PATCH net-next v4 05/12] net: rtnetlink: add bulk delete support flag
Date: Wed, 13 Apr 2022 18:42:24 -0600	[thread overview]
Message-ID: <97774474-65a3-fa45-e0b9-8db6c748da28@kernel.org> (raw)
In-Reply-To: <e43b5033-d350-fc81-71be-de3e1053c72a@blackwall.org>

On 4/13/22 6:21 AM, Nikolay Aleksandrov wrote:
>> If a buggy user space application is sending messages with NLM_F_BULK
>> set (unintentionally), will it break on newer kernel? I couldn't find
>> where the kernel was validating that reserved flags are not used (I
>> suspect it doesn't).
> 
> Correct, it doesn't.
> 
>>
>> Assuming the above is correct and of interest, maybe just emit a warning
>> via extack and drop the goto? Alternatively, we can see if anyone
>> complains which might never happen
>>
> 
> TBH I prefer to error out on an unsupported flag, but I get the problem. These
> weren't validated before and we start checking now. The problem is that we'll
> return an extack without an error, but the delete might also remove something.
> Hrm.. perhaps we can rephrase the error in that case (since it becomes a warning
> in iproute2 terms):
>  "NLM_F_BULK flag is set but bulk delete operation is not supported"
> So it will warn the user it has an unsupported flag.
> 
> WDYT ?
> 
> IMO we should bite the bullet and keep the error though. :)
> 

I agree. The check across the board for BULK flag on any DELETE requests
should tell us pretty quick if someone is setting that flag when it
should not be.

  reply	other threads:[~2022-04-14  0:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13 10:51 [Bridge] [PATCH net-next v4 00/12] net: bridge: add flush filtering support Nikolay Aleksandrov
2022-04-13 10:51 ` [Bridge] [PATCH net-next v4 01/12] net: rtnetlink: add msg kind names Nikolay Aleksandrov
2022-04-13 10:51 ` [Bridge] [PATCH net-next v4 02/12] net: rtnetlink: add helper to extract msg type's kind Nikolay Aleksandrov
2022-04-13 10:51 ` [Bridge] [PATCH net-next v4 03/12] net: rtnetlink: use BIT for flag values Nikolay Aleksandrov
2022-04-13 10:51 ` [Bridge] [PATCH net-next v4 04/12] net: netlink: add NLM_F_BULK delete request modifier Nikolay Aleksandrov
2022-09-20  7:49   ` Nicolas Dichtel
2022-09-20  9:05     ` Nikolay Aleksandrov
2022-09-21  6:43       ` Nicolas Dichtel
2022-04-13 10:51 ` [Bridge] [PATCH net-next v4 05/12] net: rtnetlink: add bulk delete support flag Nikolay Aleksandrov
2022-04-13 12:06   ` Ido Schimmel
2022-04-13 12:21     ` Nikolay Aleksandrov
2022-04-14  0:42       ` David Ahern [this message]
2022-04-13 10:51 ` [Bridge] [PATCH net-next v4 06/12] net: add ndo_fdb_del_bulk Nikolay Aleksandrov
2022-04-13 10:51 ` [Bridge] [PATCH net-next v4 07/12] net: rtnetlink: add NLM_F_BULK support to rtnl_fdb_del Nikolay Aleksandrov
2022-04-13 12:20   ` Ido Schimmel
2022-04-13 12:21     ` Nikolay Aleksandrov
2022-04-13 12:35       ` Ido Schimmel
2022-04-13 10:51 ` [Bridge] [PATCH net-next v4 08/12] net: bridge: fdb: add ndo_fdb_del_bulk Nikolay Aleksandrov
2022-04-13 10:51 ` [Bridge] [PATCH net-next v4 09/12] net: bridge: fdb: add support for fine-grained flushing Nikolay Aleksandrov
2022-04-13 10:52 ` [Bridge] [PATCH net-next v4 10/12] net: rtnetlink: add ndm flags and state mask attributes Nikolay Aleksandrov
2022-04-13 10:52 ` [Bridge] [PATCH net-next v4 11/12] net: bridge: fdb: add support for flush filtering based on ndm flags and state Nikolay Aleksandrov
2022-04-13 10:52 ` [Bridge] [PATCH net-next v4 12/12] net: bridge: fdb: add support for flush filtering based on ifindex and vlan Nikolay Aleksandrov
2022-04-13 11:50 ` [Bridge] [PATCH net-next v4 00/12] net: bridge: add flush filtering support 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=97774474-65a3-fa45-e0b9-8db6c748da28@kernel.org \
    --to=dsahern@kernel.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=idosch@idosch.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=razor@blackwall.org \
    --cc=roopa@nvidia.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