Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1528978rdb; Wed, 20 Sep 2023 11:37:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUvGZAQsOreo7KRZeFCQdVtK1gMrRyvpx8kLFSGQH9CGuJ0DBPRmlIPNNNe+5Tr2XnUI8c X-Received: by 2002:a17:903:184:b0:1c5:61a6:7267 with SMTP id z4-20020a170903018400b001c561a67267mr3128213plg.29.1695235030926; Wed, 20 Sep 2023 11:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695235030; cv=none; d=google.com; s=arc-20160816; b=YPWF7xayz8B3goqAHP4cnZPj4Q/1owlywUmCYLnHt/cug6a4oIEC1DS0e+V3gvnFz5 GFQbSAykm8w5E5+XrxF4+BSe2p8qNvBaeyTWZr+WxCCeipYgGRlC1Luw445UaHHXZSzY hGeJo2Nnrkj3rRDB5s7EuK6A6VEGgczBc8RKl7Oym744fFelqkp/zS+m6qT2g1xgXSiM u5VnMlNHpaa5Y3NNZA/m3fMFrHyf9d3xs1vCmVam1ffIeRivcluuB1yMcM6zNqtdS2vh Va1SKAqKa7a7YE0x3ZFAgG/ERY3cRUHkRmsS3VplPrF82WYU09P+X5Ey8a6zKhuSD3Bw c9vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=1t+EHZZa+DoV/W1tEtqY5C53ytLGnx5U13L/26n+omc=; fh=r8zpVSSoSO6PfqQy7ooLS7GpPkua5AzwTepuYCrhBPo=; b=JQG/7JEJi2SoeFH+eO/O44tNwij2B8FWy0dXZS/1+Sm68Qn3/ixMLnAZ0BYkPtO9LI oUnGRiMcQvtzMNWY4UmFsvXWBdSLTL99se6hmvdlWf9wj0FvXl1AIdSlcajpB1Qg+V1f fmAIDQCum2lHUJkHTeIHnqhwuDcCv0A3HzJxhb+hv9Xqd1C3+zd/w6G7LuLSsdCUXPiE V4eDvqzZcTc8PTas0TrYtRVUilU5RcfVYxdS+WxaJ6xWh9RGiw3J1HVY0cn0CroXV1hg tpp2YVtnAUI2KqT481M0M3TX6ztpaUD9mk//QdXcpT6WVPYNT82xE9JvlfKZ1zERQmo3 D4mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@blackwall-org.20230601.gappssmtp.com header.s=20230601 header.b=dihsdjvT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id e10-20020a17090301ca00b001c3b4eb2135si12685708plh.463.2023.09.20.11.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 11:37:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@blackwall-org.20230601.gappssmtp.com header.s=20230601 header.b=dihsdjvT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 008CF82922C0; Wed, 20 Sep 2023 03:47:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234421AbjITKqz (ORCPT + 99 others); Wed, 20 Sep 2023 06:46:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234368AbjITKqe (ORCPT ); Wed, 20 Sep 2023 06:46:34 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 426AD196 for ; Wed, 20 Sep 2023 03:46:07 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-986d8332f50so923417566b.0 for ; Wed, 20 Sep 2023 03:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20230601.gappssmtp.com; s=20230601; t=1695206764; x=1695811564; darn=vger.kernel.org; h=content-transfer-encoding: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; bh=1t+EHZZa+DoV/W1tEtqY5C53ytLGnx5U13L/26n+omc=; b=dihsdjvTnuQYMVrQxu4XvEe5UUGzkdkX1xMIDEIyoiJ5MUUGHoxrtS5OFHB+QGNLR8 OZKCASHQ1EOpebv9O2YOnX9E2oPft2dRhZnuo7xLPfwndswi1cm/nAkWaIhzastVT5JR XMB2I+wSWXwwfCOkwQGmg6siCJMZGdapZ4GaXpBkpScOpKqf5hr4ZUhBWvQIJcOR24oP Wz/qlovKaRrEW4E8TcunpnmqowIv66sPyaYizBxKaDkI49Q3whEtdMBgyepmETQgkSoP IkZizwj3T32xwdDSH7uPq8pd3RLlmpsyC0o080c2F16HJ9gdpfszY13Ur2jI9GupJXTs KqOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695206764; x=1695811564; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1t+EHZZa+DoV/W1tEtqY5C53ytLGnx5U13L/26n+omc=; b=KXRUJl+VjxgNkwXoCYYX6QfEdCOfVGPUbeOU+3joRdkKx92KG/5ZHFRx//OzHaLr7m I9qjNQYPY/iQObe1YJn27t6nQNPUpW3YPgSnhW+vv6TKQJz8rlyvU17RrHgAfipsa9N/ 83sPYjwKAgplx2UxBffVDoEVcZ71PysmEKkrGdhYOWajAMRRfNs/sKKZ4MnOqc4M73B4 xRnTcw7KbmcxUeTmU/AKwTI1cy/7sNl1bOlI0smPZCbvB7DlHQS6jngmQ7aTpf3UR6OR GQUmnI5veULXRZvVmYZd7y6st21eYL0O13W7y2mtSAvIHLwUoo/HMlgHR5iIAycrO5iI fNAQ== X-Gm-Message-State: AOJu0YwOp989LneT+A/LVbD1GKE3VFLyD5xsQbgFOWGXsdWj/YVY72si pyLf/8uZ7x/lf8wRN6n3wOpqGg== X-Received: by 2002:a17:907:77ca:b0:9a2:19ea:88f7 with SMTP id kz10-20020a17090777ca00b009a219ea88f7mr1801929ejc.64.1695206764525; Wed, 20 Sep 2023 03:46:04 -0700 (PDT) Received: from [192.168.0.105] (haunt.prize.volia.net. [93.72.109.136]) by smtp.gmail.com with ESMTPSA id qx9-20020a170906fcc900b0099d0a8ccb5fsm9183266ejb.152.2023.09.20.03.46.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Sep 2023 03:46:04 -0700 (PDT) Message-ID: <1c12b8f2-b28b-f326-b24f-f1ea602832d7@blackwall.org> Date: Wed, 20 Sep 2023 13:46:02 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH net-next v4 2/6] net: bridge: Set strict_start_type for br_policy Content-Language: en-US To: Johannes Nixdorf , "David S. Miller" , Andrew Lunn , David Ahern , Eric Dumazet , Florian Fainelli , Ido Schimmel , Jakub Kicinski , Oleksij Rempel , Paolo Abeni , Roopa Prabhu , Shuah Khan , Vladimir Oltean Cc: bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20230919-fdb_limit-v4-0-39f0293807b8@avm.de> <20230919-fdb_limit-v4-2-39f0293807b8@avm.de> From: Nikolay Aleksandrov In-Reply-To: <20230919-fdb_limit-v4-2-39f0293807b8@avm.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 03:47:15 -0700 (PDT) On 9/19/23 11:12, Johannes Nixdorf wrote: > Set any new attributes added to br_policy to be parsed strictly, to > prevent userspace from passing garbage. > > Signed-off-by: Johannes Nixdorf > --- > net/bridge/br_netlink.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c > index 10f0d33d8ccf..505683ef9a26 100644 > --- a/net/bridge/br_netlink.c > +++ b/net/bridge/br_netlink.c > @@ -1229,6 +1229,8 @@ static size_t br_port_get_slave_size(const struct net_device *brdev, > } > > static const struct nla_policy br_policy[IFLA_BR_MAX + 1] = { > + [IFLA_BR_UNSPEC] = { .strict_start_type = > + IFLA_BR_MCAST_QUERIER_STATE + 1 }, > [IFLA_BR_FORWARD_DELAY] = { .type = NLA_U32 }, > [IFLA_BR_HELLO_TIME] = { .type = NLA_U32 }, > [IFLA_BR_MAX_AGE] = { .type = NLA_U32 }, > instead of IFLA_BR_MCAST_QUERIER_STATE + 1, why not move around the patch and just use the new attribute name? These are uapi, they won't change.