Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp955758rwb; Tue, 4 Oct 2022 13:08:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+CAjCYUAvfKPcd7feZePP2P5DxtWrLhWMelkgJaGq/Spdxr363lqQBEdXzsqiE+2ZI2az X-Received: by 2002:a63:581d:0:b0:42b:399:f15a with SMTP id m29-20020a63581d000000b0042b0399f15amr24749339pgb.337.1664914127205; Tue, 04 Oct 2022 13:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664914127; cv=none; d=google.com; s=arc-20160816; b=URa/hw74H6FRuWLP9xI0G0qOPhPbl1FamVqFDUWqpxO1za1t43J7Q4dzhoYFy2hguU mL3N+Q3DFXsfTtgUYMUZNQihnDxEkNXRzhLompKebNIELCLeK8lZVH2AStdwK8CKmFyC dBpiiLMeX765tJrhwuNBYGvXq7GmHClv3byw3THQ7czdIixwaQaEa7k0Ajh69zsMN2jz t+bTZ4szsaQTFRzWjLBqg+M2517jelik0797pY87eeQ5TJnO71S+QXtyVf3RGLtMGMXh hgDYM6ZFY6qjVA2phckanzgtiKN4d9Kb8lKrPjSe8S2c03D56F7wr60hH9qBKO+9z90h UtPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=6LPO3Lk5Ieo1wunGNcPbosyHljsF6b0YBn1p3gFSjx0=; b=0aQTDeexERv9gBoBj3a5AFLPpb3IEsHm3YjFIPfZi/0HTxxArqDs31k6e8WYDne6vs 9QruWiqS0PR0aKzxh1m3L4g4H2z8wLHZ944+uqaKmeIABh8IZP5cQfzo6y1aaCtVnuhE gfYvhaEYaGj8Asraet1J6mQ+68y32ECpU1WR4c93/xAdCXCdIk0YWBHoHwfw0+rZrzKy 9r2KnfDeq3vlw11NB6kF01cIbGEUwLPcAIgmH124JBx6JstPHacFrbrLfq7aIz00PvYG pRkbmzFq6G2pjgerM86X0ve7zMLolK+vbMNZIIZA77py4khCLOujMVVvB49CTFMbUrUJ G1pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HE34e9c1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u27-20020a63471b000000b0043bd846491fsi13995267pga.320.2022.10.04.13.08.35; Tue, 04 Oct 2022 13:08:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HE34e9c1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229790AbiJDTwB (ORCPT + 99 others); Tue, 4 Oct 2022 15:52:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbiJDTv7 (ORCPT ); Tue, 4 Oct 2022 15:51:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 406036B156; Tue, 4 Oct 2022 12:51:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C5A2B6141B; Tue, 4 Oct 2022 19:51:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A435C433C1; Tue, 4 Oct 2022 19:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664913109; bh=TeN6ehnVEox16o2vQmBTliyjz88d8D/mx70KrdN795g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HE34e9c12tSg4Qi6lrUFpmw592Qbhct2z2qjumi34iWrQzXW68Os8/HzunByR4uU2 kSnSQpc9tRGS1Axi0mWLmI3RTN5V511XEVv6arsnCf9ROZZJ1KMCsdasrue6BSXT3H aAVbErjXfW/OnU7+ir6uxXUTzaxWm0lZlAs9C6a/koE5kygTmfo5alE0bv56GhC8DA 110PiR49JR35hSuwqef1ajI8Lajml2kBwHWwfIIzyDCHZTO6/RbGLYDoJhrUaBnnUe CMF2o0QA9ILreyif3wN/2cqcjI3wzyWoZ4pnY6r/xGXav4AMxOJOfHngHgTE62c2mL hVCTG1bN97SYw== Date: Tue, 4 Oct 2022 12:51:47 -0700 From: Jakub Kicinski To: Petr Machata Cc: Daniel Machon , , , , , , , , , , , , , , , , Subject: Re: [PATCH net-next v2 1/6] net: dcb: add new pcp selector to app object Message-ID: <20221004125147.7f76d409@kernel.org> In-Reply-To: <87v8ozx3hb.fsf@nvidia.com> References: <20220929185207.2183473-1-daniel.machon@microchip.com> <20220929185207.2183473-2-daniel.machon@microchip.com> <87leq1uiyc.fsf@nvidia.com> <20220930175452.1937dadd@kernel.org> <87pmf9xrrd.fsf@nvidia.com> <20221003092522.6aaa6d55@kernel.org> <87zgebx3zb.fsf@nvidia.com> <87v8ozx3hb.fsf@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 4 Oct 2022 12:52:35 +0200 Petr Machata wrote: > > The question is whether it's better to do it anyway. My opinion is that > > if a userspace decides to make assumptions about the contents of a TLV, > > and neglects to validate the actual TLV type, it's on them, and I'm not > > obligated to keep them working. We know about this case, but really any > > attribute addition at all could potentially trip some userspace if they > > expected something else at this offset. > > And re the flag: I think struct dcbmsg.dcb_pad was meant to be the place > to keep flags when the need arises, but it is not validated anywhere, so > we cannot use it. It could be a new command, but I'm not a fan. So if we > need to discriminate userspaces, I think it should be a new attribute. All good points. I'm fine with not gating the attributes if that's your preference. Your call.