From: Greg KH <gregkh@linuxfoundation.org>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, davem@davemloft.net,
netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, stable@vger.kernel.org
Subject: Re: [PATCH net 0/5] Netfilter fixes for net
Date: Thu, 10 Aug 2023 09:49:11 +0200 [thread overview]
Message-ID: <2023081006-nurture-landside-fb56@gregkh> (raw)
In-Reply-To: <20230810070830.24064-1-pablo@netfilter.org>
On Thu, Aug 10, 2023 at 09:08:25AM +0200, Pablo Neira Ayuso wrote:
> Hi,
>
> The following patchset contains Netfilter fixes for net.
>
> The existing attempt to resolve races between control plane and GC work
> is error prone, as reported by Bien Pham <phamnnb@sea.com>, some places
> forgot to call nft_set_elem_mark_busy(), leading to double-deactivation
> of elements.
>
> This series contains the following patches:
>
> 1) Do not skip expired elements during walk otherwise elements might
> never decrement the reference counter on data, leading to memleak.
>
> 2) Add a GC transaction API to replace the former attempt to deal with
> races between control plane and GC. GC worker sets on NFT_SET_ELEM_DEAD_BIT
> on elements and it creates a GC transaction to remove the expired
> elements, GC transaction could abort in case of interference with
> control plane and retried later (GC async). Set backends such as
> rbtree and pipapo also perform GC from control plane (GC sync), in
> such case, element deactivation and removal is safe because mutex
> is held then collected elements are released via call_rcu().
>
> 3) Adapt existing set backends to use the GC transaction API.
>
> 4) Update rhash set backend to set on _DEAD bit to report deleted
> elements from datapath for GC.
>
> 5) Remove old GC batch API and the NFT_SET_ELEM_BUSY_BIT.
>
> Florian Westphal (1):
> netfilter: nf_tables: don't skip expired elements during walk
>
> Pablo Neira Ayuso (4):
> netfilter: nf_tables: GC transaction API to avoid race with control plane
> netfilter: nf_tables: adapt set backend to use GC transaction API
> netfilter: nft_set_hash: mark set element as dead when deleting from packet path
> netfilter: nf_tables: remove busy mark and gc batch API
>
> Please, pull these changes from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git nf-23-08-10
>
> Thanks.
>
> ----------------------------------------------------------------
>
> The following changes since commit c5ccff70501d92db445a135fa49cf9bc6b98c444:
>
> Merge branch 'net-sched-bind-logic-fixes-for-cls_fw-cls_u32-and-cls_route' (2023-07-31 20:10:39 -0700)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git tags/nf-23-08-10
>
> for you to fetch changes up to a2dd0233cbc4d8a0abb5f64487487ffc9265beb5:
>
> netfilter: nf_tables: remove busy mark and gc batch API (2023-08-10 08:25:27 +0200)
>
> ----------------------------------------------------------------
> netfilter pull request 23-08-10
>
> ----------------------------------------------------------------
> Florian Westphal (1):
> netfilter: nf_tables: don't skip expired elements during walk
>
> Pablo Neira Ayuso (4):
> netfilter: nf_tables: GC transaction API to avoid race with control plane
> netfilter: nf_tables: adapt set backend to use GC transaction API
> netfilter: nft_set_hash: mark set element as dead when deleting from packet path
> netfilter: nf_tables: remove busy mark and gc batch API
>
> include/net/netfilter/nf_tables.h | 120 ++++++---------
> net/netfilter/nf_tables_api.c | 307 ++++++++++++++++++++++++++++++--------
> net/netfilter/nft_set_hash.c | 85 +++++++----
> net/netfilter/nft_set_pipapo.c | 66 +++++---
> net/netfilter/nft_set_rbtree.c | 146 ++++++++++--------
> 5 files changed, 476 insertions(+), 248 deletions(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2023-08-10 7:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 7:08 [PATCH net 0/5] Netfilter fixes for net Pablo Neira Ayuso
2023-08-10 7:08 ` [PATCH net 1/5] netfilter: nf_tables: don't skip expired elements during walk Pablo Neira Ayuso
2023-08-10 18:00 ` patchwork-bot+netdevbpf
2023-08-10 7:08 ` [PATCH net 2/5] netfilter: nf_tables: GC transaction API to avoid race with control plane Pablo Neira Ayuso
2023-08-10 7:08 ` [PATCH net 3/5] netfilter: nf_tables: adapt set backend to use GC transaction API Pablo Neira Ayuso
2023-08-10 7:08 ` [PATCH net 4/5] netfilter: nft_set_hash: mark set element as dead when deleting from packet path Pablo Neira Ayuso
2023-08-10 7:08 ` [PATCH net 5/5] netfilter: nf_tables: remove busy mark and gc batch API Pablo Neira Ayuso
2023-08-10 7:49 ` Greg KH [this message]
2023-08-10 10:29 ` [PATCH net 0/5] Netfilter fixes for net Pablo Neira Ayuso
2023-08-10 17:46 ` Jakub Kicinski
-- strict thread matches above, loose matches on Subject: below --
2025-06-05 8:57 Pablo Neira Ayuso
2024-06-19 17:05 Pablo Neira Ayuso
2024-03-07 2:15 Pablo Neira Ayuso
2024-02-22 0:08 Pablo Neira Ayuso
2023-11-08 15:57 Pablo Neira Ayuso
2023-08-30 23:59 Pablo Neira Ayuso
2023-06-06 22:58 Pablo Neira Ayuso
2023-04-18 14:50 Pablo Neira Ayuso
2022-06-21 8:56 Pablo Neira Ayuso
2022-05-31 21:58 Pablo Neira Ayuso
2022-01-20 12:52 Pablo Neira Ayuso
2021-09-29 23:04 Pablo Neira Ayuso
2021-09-03 16:30 Pablo Neira Ayuso
2020-11-27 19:03 Pablo Neira Ayuso
2020-11-28 21:23 ` Jakub Kicinski
2020-10-31 18:14 Pablo Neira Ayuso
2020-11-01 1:02 ` Jakub Kicinski
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=2023081006-nurture-landside-fb56@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=stable@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 NNTP newsgroup(s).