Article View: linux.kernel.netdev
Article #20969Re: [PATCH net v3 2/2] bonding: don't let an 802.3ad slave change its type
From: Nikolay Aleksandrov
Date: Mon, 23 Nov 2026 12:43
Date: Mon, 23 Nov 2026 12:43
30 lines
12527 bytes
12527 bytes
On 23/11/2026 06:29, Kyuwon Cho wrote: > On Mon, Nov 23, 2026 at 11:25:37AM +0800, Hangbin Liu wrote: >> Hmm, I personally prefer the approach used by vlan and team, which disallows >> changing the slave type after enslavement. If you think we should only disable >> the 802.3ad-specific part, this change should be merged with patch 1, as they >> address the same issue. > > For net I would keep it to 802.3ad, where the type change leads to the > out-of-bounds read, and merge it into patch 1 as you suggest. Refusing > the type change in every mode would also make the enslave of the nlmon > device in bond-eth-type-change.sh fail. The test would still pass, as > it does not check that enslave, but it would no longer change the type > it is there to test, so that change seems better made in net-next. > > Nikolay, would you rather have the general check? > > I will send v4 with the two patches merged once this is settled. > > Thanks, > Kyuwon Cho Since this requires purposefully breaking the bond with CAP_NET_ADMIN, I'd go for net-next. About the general check - unfortunately I don't think we can do it at all due to one, rather weird, use case that comes to mind - nested bonds. There are setups which use bonds of bonds and that will put ordering on the setup, potentially could break scripts. Cheers, Nik
Technical Details
Message-ID:
<9a533d71-7c7f-4946-9f5b-444db8737547@blackwall.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369346-linux-kernel-netdev=dewy.ruReferences:
<179535729502.2645501.5219010464870440@gmail.com> <179535729502.2645501.271186140389290426@gmail.com> <20261123032537.GE10218@Liu-laptop> <179540710966.3093990.1416762538136490909@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369346-linux-kernel-netdev=dewy.ru
From: razor@blackwall.org (Nikolay Aleksandrov)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v3 2/2] bonding: don't let an 802.3ad slave change its
type
Date: Mon, 23 Nov 2026 14:43:06 +0200
Organization: Usenet Network
Message-ID: <9a533d71-7c7f-4946-9f5b-444db8737547@blackwall.org>
References: <179535729502.2645501.5219010464870440@gmail.com>
<179535729502.2645501.271186140389290426@gmail.com>
<20261123032537.GE10218@Liu-laptop>
<179540710966.3093990.1416762538136490909@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="3877285"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:l0g2zHjkMKHIyZg1c7ZVr6Nwy/A= sha256:s1WiEL1YLkXoEfl3vkVq6ZEAPv9pklfuZ449atJ0fDY=
sha1:CbXS0LjtYETZuXsweB/TnBd32Rg= sha256:/8mpO7RmuzEnVGyFvv2Dt0Ahn6PAeOkIafV18vzVF9w=
Content-Language: en-US, bg
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 6F3A8125DAF; Mon, 23 Nov 2026 15:43:26 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-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] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=blackwall.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 6PpM82ndnb2y;
Mon, 23 Nov 2026 15:43:23 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-369346-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=blackwall.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id DCB5E125DAD; Mon, 23 Nov 2026 15:43:12 +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 AFD802BF4E; Mon, 23 Nov 2026 12:43:10 +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=1795437790;
b=vG6A2HeHuofajmuWDofbE9Y/A+T/q9M+f14A6iefSvrVD9KXpEJKFXiFABRBni3zKBa5
8QU5o5XIUapqrjRWIThavkw7SSVUXC6/3HbsAHbVTztjrIiwNg5SrkbJHpcGY1oH/B1Pz
O1TC7d9OlLlyzHxX1ckyARz9LfE1ULpzsmhycthTRI6VSV4TdVxLoDeW+KN+aK6A3nZ9X
iZmznK5XDBlITaz4cHpioe6N7cuilskmR1k2zkqzgciSJ4t4BLg9g/AVZopyVFE1R5Ez4
PF2IRdfLoOKQBZCIaYdrM9xC0+nxaagEAkQ9xgmx8gDZX1ZOkh41Onwc4EH5wDjP0Uw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795437790;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
User-Agent:Subject:Content-Language:To:Cc:References:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding;
bh=4xkXXEJqgLnZoxd90O2Whf+Ji223F+h94sIuB6UxenM=;
b=s36eLVZrM0tKgtHksY45uz161Ggm1RWs2fF1Uq8tWmOgALN9EjQl+AbpQlzZnt1ckbSN
fZX7NjV5VY4upGUJMvF0KIt77INBVtE7bVUqe2x36VmU4l+6yeo9ThfgCzw6CgKlmTN2E
N7Sipu5mx5zBXH49iLP3d7PMIZEW5mWDFj3SB2Ut9oK/OY0HBuDLARs/Alrbvap8NsJNK
SfxkmIypbg7VdCTtgdkIShuuLO9dNptfKyW7obRO2bLOXO8gW8YEwojQxxSmVcYxl34JY
Wm0Uy6BQj0ZQIDqfVMPAu3aekajeEdj4sOu5QvAmxx9trRoxHP6yHjF5nGvalrqpO0A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=blackwall.org header.i=@blackwall.org header.a=rsa-sha256 header.s=google header.b=oAkrxzwW;
dmarc=none header.from=blackwall.org;
spf=none smtp.mailfrom=blackwall.org;
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 8618F606A32D;
Mon, 23 Nov 2026 12:43:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=blackwall.org header.i=@blackwall.org header.a=rsa-sha256 header.s=google header.b=oAkrxzwW
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.49
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795437789;
b=tUMcOH8VA4TZoHSgWUmNkATl9irojypmJSquxJ3bvmi2DndcrNbJdbzfRcaXGa7vhBsT
xRSfjXGKLNn1AvidLoaGri3gS/WGFkaP9uTp7/GMXfwH9jt6AQ4GTMJp+srgzvgqjaEsQ
eNUUuN1L0ZADeW9UpN8BGevS2WbNG9ziDyM1Pz8BbcoIC8FXd7M5+1iJjLykwGh285dHN
xC7BCXT65sd3sa4UQmIFLC71E8uIVHKg/QnDGd3ZabocI73B9AvwzFhGFM0V1Oyl+HVkq
2oliot7plqDcI4Hwi2bdYItSS+afBcf9frGw36PGIAccvLJ+SKpJA+I2g0aqbVUDjag==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795437789;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date:
MIME-Version:User-Agent:Subject:Content-Language:To:Cc:References:
From:In-Reply-To:Content-Type:Content-Transfer-Encoding;
bh=4xkXXEJqgLnZoxd90O2Whf+Ji223F+h94sIuB6UxenM=;
b=INB/J9V3meR0vrcHmYRK0sAQGzHp9OKAbYlSVPCGMkG4Bmdwcr7IbRwjVJK9gh6wQfOu
DMzNtDjJb1wooaCb7eYZoN1k/jxX3VfRxyjlD80zszqx/Am/F116YlSeGGmJt7j8byEGa
MMvorrH7gSs2W59ce0LoNTUN8nHlC+VnekYuXhoVBofxRLhkHooJDTBV5pxL1uldLtkFy
Sjr8PsOVXzgy8lk/p6b3AuorJ25jn6bUtOpAKzFpDmy11Mv2kTBzTBKKmiu/K8v4Oqm4e
neEYrB6vQM9Vm0Ymx+bLMsOQPvReACEqu3fCDggyaiCZ6h2s8w/r2znakQSedmUMR5A==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=none header.from=blackwall.org;
spf=none smtp.mailfrom=blackwall.org;
dkim=pass header.d=blackwall.org header.i=@blackwall.org header.a=rsa-sha256 header.s=google header.b=oAkrxzwW;
arc=none smtp.remote-ip=209.85.128.49
X-Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EFFF606A31E
for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 12:43:09 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3EFFF606A31E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=blackwall.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=blackwall.org
X-Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4bb55cda775so20382575e9.0
for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 04:43:08 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=blackwall.org; s=google; t=1795437787; x=1796042587; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:in-reply-to:from:references
:cc:to:content-language:subject:user-agent:mime-version:date
:message-id:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=4xkXXEJqgLnZoxd90O2Whf+Ji223F+h94sIuB6UxenM=;
b=oAkrxzwW2AC2GeZjCTeqiCWp/cBSSAdEnow0hL04h44Tcn9a8XsDQa2SoKxkvHqiIM
Tb1LbgZ7g+30rJjB7YHtH0D3e2+vDDxMhIHfZrKW7jcMU7Ml+N/wterxIl1liu8Tues3
Of84sU862kuAwb8uEo+wGuicYDIGNSJDA+mzQKZVL96sLdnyecIpTWPX0/yK79iCCbnL
JzvMiAYm6Oaq0p7AlMcXBGTcn1Y7hkJOEsHQuOldkj5++aFxjP+b0aDrzl6pg9Dm+8iz
Am4d8H/+H1Yg8bAzVlxz0Ii2aNsPvsuFpP8b1NyhP0+wOUvcxllWfdjap/9MTiKGIds9
q7zg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795437787; x=1796042587;
h=content-transfer-encoding:content-type:in-reply-to:from:references
:cc:to:content-language:subject:user-agent:mime-version:date
:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=4xkXXEJqgLnZoxd90O2Whf+Ji223F+h94sIuB6UxenM=;
b=XDNNz01I/iVJkclqRWSSJt6eO0G5XwW6XOY5JV1+inHzzhvDBC6twWJ7diol1QQwLF
Ge34VRZ1JWkn+Bs56hm7oDU86IjUGSq/CMeihJyPQXCjl565EstSBKwAYzBbRb5x8pe+
RIoQJ+KwrwACZ1NxGh5Md3XXoNIPpv7pU0IxSkbr54WM+SAFkq27MlA2SRRXstMHMu+k
L7U30VEq/DE3JiBtEngBhCcrnz2Hda6F6tSmS71IPQpHBXczt3eYLhOrugHIV9M26g2X
rTWiM5cOxVT6fZ6Ucfp9qFxo+eVk/ushxNixKyqTmevQccvKU08hdH8VOAQQ0PwWKdyT
M+7A==
X-Gm-Message-State: APuU4Z+GZSqLrUp2pp4QyQSxUoX7EyT4+R80ZZ+V7qBx60PHjgT7w4qj
dMuvOlRj5AmXxGt/+lvfmyIq7LJvInT1WyqrSdoAkQOFCRltIuoqkHTPzLWfdyWRAWE=
X-Gm-Gg: AZFdTZdP1ykLFfIr/Rm0Yfo15tyjU00VMm39vGyNRBQhyVotuOadbBJRAsEjSy/Nliu
jbM7L5jVsjjlXB9Yko7/CSdPDdmf0WzryRqwvKQraoiVC/J/2zH9BK7SvF8Ks6QVhciJW51vzTp
r+IWtkBtn6EnMPVQtUfE5mzIKi8iIXPVZeeMYM5SGAHalj42VEtiWqpZ+5/OqqXwAYUDGb1q4NS
61yzm5PTbcYaYa8JPr31qTMeuJlB6qAn+kPohYF+Sn9iyHyEsQrs53bpbFIonyLOUKSk7DnizXA
1AhMg8gab/rWVtFoLUevFDfdV3r1X9ALK75skwe9zHOhgVWnPKwrz/J3EaZUrrxrBfzdkwB51pl
hxYrM/YcQQ+Xwxz0AbsW+kKCfgiBGBohy2/IKvvmRjwfZPB6yG5WyA4BIHGwYXKn4KEMmqbJrsD
WyDlVjeRxB8Gnv7mbv95kUF7iODb/wRwgWvaE7gqljhyjyHZZFB8VoKRzsCdJXmz/tgcEbd3Ux5
x/0FwGv02EdjEWmQHc72+gvi1EM5QHP4/UM2iHerBw+gyD6Rbsav3f16jrxEFr1bjK0Q4SbCn3O
uYvdxiArbcaBz4egUtNoJLc5crxFI+lAsHia0AXIgGpQN0qU7ZtBOmDn/H7Ug8FDR6AkpvGtQ3w
RPB0d
X-Received: by 2002:a05:600c:3547:b0:4a1:c27d:e1a8 with SMTP id 5b1f17b1804b1-4bb8880b88fmr227420305e9.10.1795437787370;
Mon, 23 Nov 2026 04:43:07 -0800 (PST)
X-Received: from [192.168.0.161] (78-154-14-127.ip.btc-net.bg. [78.154.14.127])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb906c089dsm170500135e9.1.2026.11.23.04.43.06
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Mon, 23 Nov 2026 04:43:06 -0800 (PST)
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-User-Agent: Mozilla Thunderbird
X-Cc: netdev@vger.kernel.org, Jay Vosburgh <jv@jvosburgh.net>,
Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller"
<davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
X-In-Reply-To: <179540710966.3093990.1416762538136490909@gmail.com>