🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #27359

[PATCH 6.18.y 0/2] ipv6: flowlabel: enforce the flowlabel budget per network namespace

#27359
From: Dickson Wu via B4 Relay
Date: Sat, 05 Dec 2026 11:58
35 lines
12050 bytes
These two fixes failed to apply to 6.18.y. 7.3.y has both.

Patch 1 is a clean pick and the prerequisite for patch 2. It moves
ip6_fl_lock out of fl_intern() so mem_check() runs under the same lock.
Patch 2 keeps 6.18.y's ipmr_seq declaration in netns_ipv6 next to the
new flowlabel_count; the code changes match upstream.

Tested on v6.18.66:
- x86_64 allmodconfig W=1 builds of net/ipv6/ip6_flowlabel.o and
  net/ipv6/ip6mr.o, base vs patched, no new warnings
- base and patched kernels under QEMU/KVM: the six cases in
  tools/testing/selftests/net/ipv6_flowlabel.sh pass on both, including
  the ping-socket cases. The new per-netns limit and concurrent
  allocation were checked in the source, not exercised.

The backport and the test runs were prepared with AI coding tools
(OpenAI Codex agents, with review by Claude). I went over the result
before signing off.

---
Maoyi Xie (2):
      ipv6: flowlabel: take ip6_fl_lock across mem_check and fl_intern
      ipv6: flowlabel: enforce per-netns limit for unprivileged callers

 include/net/netns/ipv6.h |  1 +
 net/ipv6/ip6_flowlabel.c | 46 +++++++++++++++++++++++++++++++---------------
 2 files changed, 32 insertions(+), 15 deletions(-)
---
base-commit: 2c7bb1d0212c23234a9f85123eb7a36eecc76776
change-id: 20261205-flowlabel-618b-0712d46851d2

Best regards,
--  
Dickson Wu <dickson.wu@certik.com>
Technical Details
Message-ID: <20261205-flowlabel-618b-v1-0-d81e833c0c60@certik.com>
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377961-linux-kernel-netdev=dewy.ru
References: <2026051901-actress-ambition-70c4@gregkh>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377961-linux-kernel-netdev=dewy.ru
From: devnull+dickson.wu.certik.com@kernel.org (Dickson Wu via B4 Relay)
Newsgroups: linux.kernel.netdev
Subject: [PATCH 6.18.y 0/2] ipv6: flowlabel: enforce the flowlabel budget
 per network namespace
Date: Sat, 05 Dec 2026 11:58:20 +0000
Organization: Usenet Network
Message-ID: <20261205-flowlabel-618b-v1-0-d81e833c0c60@certik.com>
References: <2026051901-actress-ambition-70c4@gregkh>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3020100"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:cm8w1LPD6VJQ8aJDRnZ5R4V515U= sha256:NiI3Y4qKLxOpklMoIDUDPlkoSTrXfyas9H2rPhEp3vQ=
	sha1:YeRENZ7H4xfNrXnYLNjg6yqMn7s= sha256:uyVucbRNdjZ1kkIZtWTx4pu8rEy/ysKD5PjLC96IohM=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 22055117DE6; Sat,  5 Dec 2026 15:01:44 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.54
X-Spam-Status: No, score=-3.54 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 5SFlk2BIoYDT;
	Sat,  5 Dec 2026 15:01:41 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-377961-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 7E038117D21; Sat,  5 Dec 2026 15:01:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id AF33235439; Sat,  5 Dec 2026 12:01:29 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796472089;
	b=0Njuda8uOPp/GcPl5vUreCIikw39GEKKf7EbOBSgf4/FIhJRsDhkr4ybU0iGT06nsdg0
	 3RHcpQSeVW4MqMylRe+XYN+Buoy2QeA8aHt3vMugCGy/4wXuCTfAmeWIqoB1PGLYsHnMm
	 yKz7J8FNNNEo1n0RmmBz9OPX123qplBM2uUOEf9UEpJNTfHRAQJdkuDSn3SFlg7wF5PWf
	 5I0+sxvqYLA+rKQdBvvyeyUDNM7cukjuCmKXcnzYcUpify50MPDVw3vYIwE7ylKzWoMAB
	 GcXCUzxNplh7W5+MFwyGjvZI/00U317UlKEgtdnlS3XiZf9uwtG5d9A2LqZuJjQnHAQ==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796472089;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Subject:
	 Date:Message-Id:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:
	 In-Reply-To:References:To:Cc:X-Mailer:X-Developer-Signature:
	 X-Developer-Key:X-Endpoint-Received:X-Original-From:Reply-To;
	bh=XdYwsD+h94BQrhympttLenJ69zCCRKU6TzoyC3b+gio=;
	b=no/1iz1F0Sj9MfRT5XXTS5HAQa04XqPgO33dl9VDG1k42xdBiA2ZM0sDqAMtKOCFNi6l
	 EgVaRoT2M51NQlkZaDY1d71c7BpbOask6b4/Apjf83Tj+LDxmkdVeB9HdPtju0AvTKySK
	 7InQkIpsQySuo6JlnuM1jHHGHTcbWCaAY3WsWzFOV5rLtckBoTOq3rY2Oz1OfEdgPbjoJ
	 cvMLj1xyBzz09vyECvqs9Q3qMID6KUoA81lE7Hk8DDVlR5NMzhSx84PVmwY9Ci1pOqN+4
	 ewwnT5KQ5npp6mqFWEDNZSq+q6uLJR2CbfbqtLFBQFJh2A7klMUhXU4oKYVuDr8vWEQ==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FN+Ea4Z9;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 82AA1606A335;
	Sat,  5 Dec 2026 12:01:29 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FN+Ea4Z9
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796472078;
	b=TV94F4bHKh4mIkQGU5BWa3BB0FMi8YsCFIlECqyrHn4CLR76VrWJhQek+h44IkBk0OYR
	 CQZh/G0tHUiUeB9XTvsFxOxRq8Pw5Lf56CcnGQdocR6Zneiq1NVS9bGQ6wutj0RlJVRna
	 XPqb18COEKfQaH0VgeOrOowIVnXORrbKn29Mpms3G6PDkUpWeQlJAMFZKmUqXuNPNOFNh
	 whzLP047ZM/qpo17GgXymknA6a75hB3oR75mIgumTCxavbFtTzuSK9yXaeeVReb1yUBQa
	 bfr1W8OTI3SBxi3Vfqx0BShjETsyGr7QLNF4iY31GQb7mJwYqSsUtdk05vG+E36GI0w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796472078;
	h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id:
	 MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking:
	 X-Change-ID:In-Reply-To:References:To:Cc:X-Mailer:
	 X-Developer-Signature:X-Developer-Key:X-Endpoint-Received:
	 X-Original-From:Reply-To;
	bh=XdYwsD+h94BQrhympttLenJ69zCCRKU6TzoyC3b+gio=;
	b=mhXPkJPUMSAtk+g/JebZ/R8RaMSUws51bVC+bAN0wVaWalfXw8i/oEhKthcXtmgbhHzh
	 0w1/3YqGmBlBfNDLPRDwwuGDtdlWOn+3Mp3fVChh4YU3dj8PUYtSUpyhMT/RzDiGYkxVS
	 nGnKARDGDwGHSHtaawX6WQjz5a1K7BgEhO/4MQybR+XUuSEnpVRjq8IMlxaWDtXld1gdx
	 ThtvjlwspCiN2rRJN2LhahoTp821T19dQWEFCq6yK4jztCe9qbfzilsUDNwpVSSAuEOLz
	 fLYLcq8hdudUhwuGW9OlpIlwn04XoGr5Z1Cwxl0zgNMd9+NfStCYtR6Vxfh3X80O53g==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FN+Ea4Z9;
	arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CD59606A32F;
	Sat,  5 Dec 2026 12:01:18 +0000 (UTC)
X-Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77
X-ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none;
	t=1796472078;
	b=pQktbBKc0Llr80Ul8nCDbN8iXr1dfUuP8B5uXXKqqKhk2P7jxaZUM2dffegzQWmDQ87L
	 4WXWxiTkPQdBne0JjmcTgkGdyWLjivJZS06PnjPjxdZbS5nA8R/bc+L15iZvIgjj7XTo9
	 3J1kG2gLnt02dh0Sj80LjTcbHxPp1JnmW875EDRY9ITej26KS23qHcS8UnSQtRV+SC6ka
	 uQrhL6DXCsezYyWACRjBrbmre9fSh/5Qjjaz324/KAnrEKcp9v+1wQAYc/gW0F/fUvMfL
	 RCbEsH4vbdyPN1d46aJC0B8zI4OgmCirxpiATJg/gS3n4HEV9mcXw8rM26Y2UaA1+JA==
X-ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256;
	c=relaxed/relaxed; t=1796472078;
	h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:
	 In-Reply-To:References:To:Cc:X-Mailer:X-Developer-Signature:
	 X-Developer-Key:X-Endpoint-Received:X-Original-From:Reply-To;
	bh=XdYwsD+h94BQrhympttLenJ69zCCRKU6TzoyC3b+gio=;
	b=VzhoqRQ1AFeYHNKlP1Kb+HVtAFk1+2q1XBlYZaHUsqkn0sLHWfL0RTm/VxLlUYayUeyF
	 GhTUeVF8V4fKtHPCPIvi1hHr5M/snMR9m9mO+nzCmWkTEZfECPfQm3ioAwA5KOylMTml5
	 qNl0FTr5mcGDpKR/1FH+uLYvOLwf6w418rYKunbCwJiTkvmuqWb3f86NzFGSMvuZGQOoV
	 IggHOvPvQaw1n6j4ThLlBYSPnzDUoZouRixoEt9DNHxh19zlKCSWMNjkTUciA23uXFGsT
	 T6+wonlIPvlNbT7pGDxrg1EURJ7aJApeHKv0/6aKsnmxUBj0erl6Gm4zsaHwf/2qujA==
X-ARC-Authentication-Results: i=1; smtp.kernel.org; 
	arc=none smtp.remote-ip=100.80.115.77
X-Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.kernel.org (Postfix) with ESMTPS id AF2281F0092B;
	Sat,  5 Dec 2026 12:01:17 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796472078;
	bh=XdYwsD+h94BQrhympttLenJ69zCCRKU6TzoyC3b+gio=;
	h=From:Subject:Date:In-Reply-To:References:To:Cc:Reply-To;
	b=FN+Ea4Z91QKmQduNyuo18n0PB31kyFYaBod+f5HLYo6Ami6fz4fhAfXTG36bZNtH/
	 uRd6pjEQaraQ0cie9RBjwUTa9IEneyVdDLk/pO8lZ1zJyatNmLWfpMCndFCMomMiW7
	 mtV6BhgPfUXwODb1SEKA9mjhm1gPoLpYj1sCScU/Ts0NQBTplaRP/4IDReiOnd8pJW
	 V5y7VD5BrrA08DWcM8rLc6DbMYQGTF39BwnSM/zxG1bOq7Wx0Q8CFK7A/RhO3hhbyk
	 QY8GGWoQfodxH6y4aEMavx9VYDQBTpktS/mjphsYLq3wfV40Uf268114itYUPBYTQM
	 JkbkWgRV2a5OA==
X-Received: from nexus.subspace.kernel.org (localhost [IPv6:::1])
	by lkml.kernel.org (Postfix) with ESMTP id 440B4502FC;
	Sat,  5 Dec 2026 12:01:17 +0000 (UTC)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-B4-Tracking: v=1; b=H4sIAFz8E2sC/1WNyw7CIBREf6W5a6lcYpH4K40LHrcWQ8BAfaXpv
 wu6cjknM2dWKJQ9FTh1K2R6+OJTrAF3HdhZxwsx72oGwYVEwQc2hfQM2lBgEpVh/IjCHaQa0Am
 oo1umyb++whFkj6p/w/nHy91cyS7N1ppGF2Im62jnhgpFt6QUWOP7/xfYtg+vwSC8qQAAAA==
X-Change-ID: 20261205-flowlabel-618b-0712d46851d2
X-In-Reply-To: <2026051901-actress-ambition-70c4@gregkh>
X-Cc: maoyi.xie@ntu.edu.sg, kuba@kernel.org, willemb@google.com, 
 netdev@vger.kernel.org
X-Mailer: b4 0.16.0
X-Developer-Signature: v=1; a=ed25519-sha256; t=1796471900; l=1392;
 i=dickson.wu@certik.com; s=dickson-b4; h=from:subject:message-id;
 bh=QjvD3HMPyudrgX31vWdodRP62ey/DRQ4JRneOqlpRhg=;
 b=XLSE2GFcn/Tx/B+7HJXpa8yuvyCfhAV1IccpLeZaTR2knHtaMCzRikyL0lFAW9M0J0DsYZ64D
 tXEN8OoA1OrCzew1JEPm2jqQXClxgtfG6Tkq5UJxaezXnhaMciMtIe9
X-Developer-Key: i=dickson.wu@certik.com; a=ed25519;
 pk=fxH7FS4FdojeJSGLJzgKdfO51Rvr4EW30yinj2mc1vg=
X-Endpoint-Received: by B4 Relay for dickson.wu@certik.com/dickson-b4 with
 auth_id=1647
X-Original-From: Dickson Wu <dickson.wu@certik.com>
X-Reply-To: dickson.wu@certik.com