🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #10882

Re: [PATCH net] ipv6: fix cached route reuse for SO_MARK control messages

#10882
From: Xia Yan
Date: Wed, 04 Nov 2026 09:17
27 lines
9841 bytes
Hi,

Thanks for the review. I reproduced the race with a test-only pause
after sk_dst_check() takes a reference to the cached route. Changing
the socket mark to the cmsg mark while the sender is paused still lets
v1 send through the old route.

I've prepared v2 to record whether an SO_MARK cmsg was supplied and use
a fresh route lookup for those UDP and ping sends. With v2, the send
skips the cache helper and returns EACCES. The cache check added in v1
is gone, so the comment there no longer needs the proposed mark update.

The series also adds connected-socket cases to cmsg_so_mark.sh. The
same test fails two IPv6 cases on baseline and passes all 54 with the
fix; the separate UDP/ping route checks pass 50/50.

DSCP and flowlabel remain separate follow-ups, as discussed with Willem:
https://lore.kernel.org/netdev/20261031033159.2712-1-yanxia@cmss.chinamobile.com/
The other port and source-address cases still need checking.

I'll send v2 as a new thread.

Best regards,
Xia Yan

pw-bot: cr
Technical Details
Message-ID: <20261104091737.13469-1-yanxia@cmss.chinamobile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356321-linux-kernel-netdev=dewy.ru
References: <20261030141435.779302-1-yanxia@cmss.chinamobile.com> <179371875338.488856.4546363285391899557@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356321-linux-kernel-netdev=dewy.ru
From: yanxia@cmss.chinamobile.com (Xia Yan)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] ipv6: fix cached route reuse for SO_MARK control messages
Date: Wed,  4 Nov 2026 17:17:37 +0800
Organization: Usenet Network
Message-ID: <20261104091737.13469-1-yanxia@cmss.chinamobile.com>
References: <20261030141435.779302-1-yanxia@cmss.chinamobile.com> <179371875338.488856.4546363285391899557@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3360804"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:01/7ztZQ3ru2p2X/7fmoeNN091k= sha256:ZUyLNAaK4JYRaczujhoAauGKpb26cjJAxyXEjH0L2YM=
	sha1:Clet75KLWlJBDys/vGRH+Oez5lc= sha256:s4KMuD5F4qvAaJYKzWL/zD4twYf0/EYe1vvft/iGlz0=
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 5466A112B5C; Wed,  4 Nov 2026 12:22:38 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.75
X-Spam-Status: No, score=-2.75 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key)
	reason="fail (body has been altered)" header.d=cmss.chinamobile.com
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 6s5IHHPwFfcl;
	Wed,  4 Nov 2026 12:22:32 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-356321-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 296B9112B49; Wed,  4 Nov 2026 12:22:23 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 1CFE12CDB2; Wed,  4 Nov 2026 09:18:01 +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=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793783875;
	b=XhsWABI7DpgIWDvzt2JSau2iocl5hfwuk6E7wCXTDNe5QhyxYM0cYWRUSvMYtHtmKowg
	 8HMxnB0MYUgRFV27fsqeiPeu3Yhs+0S5o4tZMgVnfUrOZFw3Ujr75aeRDdAVE07cbQ5Yx
	 0WWZCbRdi5nT0nnCQIsCF87QK3lnKB2zAZU0A8A7h72OssmpRy+XkhARSqUEqWOpOQOKC
	 85uImRGttGea57m3m/5Ereba+q/r7IqYGUUwt3IAzzSU51YdKq6xxDtETbuKSp209MrGo
	 1MCDztqzg9Lnza+6o3U0bq8Ao3WmAyTLHxDLaHCvKRo3PyUvq+0AIEfHL5bjtoC5Zfg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793783875;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo:
	 X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:
	 Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 In-Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=REYCwLzVTyXXiLUH6Yf4bo3GwRsHUh3qcFy5GtRjoz4=;
	b=WHaAilTOhleWDOW6K4mxCEkEaSAn9bouMGXVlt72969o6eZGJLQRT08GKj3KR8XpggZU
	 CnXwgwzZf53sY5CI8tHFIWMdEbnxW5Buqw37/1QYMx7le2EliWMU9QgaHEVisU783Rt2q
	 qi0SVnRrGoXm2V4M9sjiFX6cprnhtUqCRCUO1eqiOqWqXMmLvyzSZc3P3wKwPyeNZVfSy
	 FOXaRlS/vWBFZmdrOqT8/fkSV1nTAJzVF8mhGRFH4JgUpLtNqEMMCxXB7B6sKh6dbeVPa
	 6cFCcNtq/b+EdphoQNTlqyVnW6TRXL/+35ATSN2/JjvVa1K+AZ21LylJKFadmQnpjqQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=o6Gi+ZDD;
	dmarc=pass header.from=cmss.chinamobile.com;
	spf=pass smtp.mailfrom=cmss.chinamobile.com;
	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 02EC7606A33C;
	Wed,  4 Nov 2026 09:17:55 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=o6Gi+ZDD
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.139
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793783874;
	b=DiRNjFPqSn/YCxzX5hQAp9uzCDTZBJtnExWncVTCFtsCXXebPQZB/x/Qd3GrXqUVNJch
	 pqzAyA+45utjZnKebus8NN8D4sGO6S1z8Kw56SzvWK7LfHAZubHYO/fQNy4lqZGgM8LTR
	 5dnAqnf0bbZNcA5kHUd4Mpul6bftRtjOQW3BwLEPHMJX04fi/Hi7PDDSGqtSAZZuUZgND
	 ljVK/ApOIVdcTBdemxTnP0VPDVxDd7ZRAzFNYlwQBlH1QYBUUBmb9UPdXwYyqWvcUVxsj
	 6OHd3Skspz/9Tc3REnw1qt1C+1qJkF7EiZu5UkVWfRc11Qnm3e3Wr+PWLvLRU+E8jWA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793783874;
	h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:
	 X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From:
	 To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 MIME-Version:Content-Transfer-Encoding;
	bh=REYCwLzVTyXXiLUH6Yf4bo3GwRsHUh3qcFy5GtRjoz4=;
	b=KMVXm/CHTj3mcIKZBsE+Lv6dAMo4bNAWaDVl/wJuvFUsmXJJc2mxbCdh+HUqU6DUDc0G
	 fsp1XRPbBTM76PRawqRzVLVQbNiradZhx5VK3GbYc9jZjno0/XP3ehbojY/V4oZwQOQr3
	 lC3MIR172hIr5R/7g4S19mOzGRR6paTvlkSE9eoiyB2yMpBwxfwtJx7sI/gJa/1HjZgJf
	 1LIHVuUiJdq6QJLYz7K8Xl/fQdkUUsxu99QpmMcrgI8YyDDSvKFREOdc2n8PzBc3B1MSy
	 MkqJa87F4p4+PmWWOKh3GYRc1SkVEzMb8vu4JXWGR/K9TxfDarVU1YrfxyW0OqekR/A==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=cmss.chinamobile.com;
	spf=pass smtp.mailfrom=cmss.chinamobile.com;
	dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=o6Gi+ZDD;
	arc=none smtp.remote-ip=111.22.67.139
X-Received: from cmccmta6.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 51ED2606A328;
	Wed,  4 Nov 2026 09:17:51 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 51ED2606A328
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=cmss.chinamobile.com; s=default; l=0;
	h=from:subject:message-id:to:cc:mime-version;
	bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=;
	b=o6Gi+ZDDRVp+f5lDwn18+MvApvDBwFzjMcuztqFBvUD18adJ/qZ50fJ7cAbjR+txLuQdAs3V9kqb4
	 SU6nvLkSnMoAlzI6OmAJS36v7kNb61NG3+k/mJu/8Pp16U3BrV8xWhn5hEudCkj+aA1tZk6G8EV0yd
	 dRdnOJfwPSbgXkdM=
X-RM-TagInfo: emlType=0                                       
X-RM-SPAM-FLAG: 00000000
X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87])
	by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee96aeaf83eeba-a1e2a;
	Wed, 04 Nov 2026 17:17:50 +0800 (CST)
X-RM-TRANSID: 2ee96aeaf83eeba-a1e2a
X-RM-TagInfo: emlType=0                                       
X-RM-SPAM-FLAG: 00000000
X-Received: from localhost.localdomain (unknown[223.108.79.97])
	by rmsmtp-syy-appsvr01-12001 (RichMail) with SMTP id 2ee16aeaf83da4d-1d1bb;
	Wed, 04 Nov 2026 17:17:50 +0800 (CST)
X-RM-TRANSID: 2ee16aeaf83da4d-1d1bb
X-Cc: netdev@vger.kernel.org,
	dsahern@kernel.org,
	idosch@nvidia.com,
	davem@davemloft.net,
	edumazet@kernel.org,
	kuba@kernel.org,
	pabeni@redhat.com,
	horms@kernel.org,
	willemdebruijn.kernel@gmail.com,
	linux-kernel@vger.kernel.org,
	stable@vger.kernel.org,
	yana06070@163.com,
	shuah@kernel.org,
	linux-kselftest@vger.kernel.org,
	willemb@google.com
X-Mailer: git-send-email 2.43.0
X-In-Reply-To: <179371875338.488856.4546363285391899557@kernel.org>
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