Skip to content

Address Sashiko review of NAT hook dump code

Phil Sutter netfilter-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 2 repliesIn review
  2. v25 patches 0 repliesSuperseded
  3. v14 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Drop patch 1 again. Fixing nfnl_hook_dump's broken NLM_F_DUMP_INTR flag setting in corner-cases is out of scope of this series and should be solved in a more elegant way in nfnetlink itself.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4netfilter: nfnetlink_hook: Pass cb object to nfnl_hook_dump_nat()net/netfilter/nfnetlink_hook.c+6 -60 replies
2/4netfilter: nfnetlink_hook: Address hook ops using READ_ONCE()net/netfilter/nfnetlink_hook.c+8 -50 replies
3/4netfilter: nfnetlink_hook: Handle multipart NAT hook dumpsnet/netfilter/nfnetlink_hook.c+9 -40 replies
4/4netfilter: nfnetlink_hook: Fix for concurrent NAT hooks dump and changenet/netfilter/nfnetlink_hook.c+13 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [nf-next PATCH v3 0/4] Address Sashiko review of NAT hook dump code

Changes since v2:
- Drop patch 1 again. Fixing nfnl_hook_dump's broken NLM_F_DUMP_INTR flag setting in corner-cases is out of scope of this series and should be solved in a more elegant way in nfnetlink itself.
Changes since v1:
- New patch 1
- Fixed three aspects of patch 3
- Fixed two issues of patch 5

Patch 1 is mere preparation to add the missing case handling to nfnl_hook_dump_nat().

Patch 2 fixes for missing READ_ONCE() calls when addressing hook ops array elements.

Patch 3 adds missing multipart dump support to nfnl_hook_dump_nat.

Patch 4 adds code to detect and mitigate concurrent hook updates while amidst a multipart dump to nfnl_hook_dump_nat.

Phil Sutter (4):
netfilter: nfnetlink_hook: Pass cb object to nfnl_hook_dump_nat()
netfilter: nfnetlink_hook: Address hook ops using READ_ONCE()
netfilter: nfnetlink_hook: Handle multipart NAT hook dumps
netfilter: nfnetlink_hook: Fix for concurrent NAT hooks dump and
change

 net/netfilter/nfnetlink_hook.c | 48 ++++++++++++++++++++++++----------
 1 file changed, 34 insertions(+), 14 deletions(-)
Signature · 1 line
2.54.0