Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp698680rwi; Wed, 2 Nov 2022 17:25:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4h/QVJ84mNSnFVqlBIqrjIJ2CyuD81EltuOwWLKY8TWIqUI4x7P1Ao8Kj6tJRrmMlj6Eqc X-Received: by 2002:a63:5c08:0:b0:46e:e211:5694 with SMTP id q8-20020a635c08000000b0046ee2115694mr23886273pgb.441.1667435138019; Wed, 02 Nov 2022 17:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667435138; cv=none; d=google.com; s=arc-20160816; b=tTtTBhtOLh8Fs0BoDWHtDQM7NALRiNA+047M7ehmsNGrVeF3ooe60rJdqpePol43NU bRIwI8+NSjzMtbs8voMG2bPmloTx0AQWKVMRJ1RKeftJg4LPjLJHUGsTMeS3zw3GZLIC MuWPNtvWXTpniItqsEIYRD3ldJi7D3Sg4lCBE+68znrYSGka9G1axmrxpkjMdT8NKUzp ygtdba+eu2jThXsNL2HM2YaWnW59Id4vK71iuValX4Wbaz0bAzmJI2djBJ8nMAq2m+po m6yT/OVnbwuCbiYZiobAHkHmwDjoYwEzp1xNKYwaSEsQiiec2Md6fZ9hXPhTzfeJhDrZ jQ1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=aIozy4Ujz7Z2c69qFsPkkFtnJ9hdh3LiSwrKTFpiRvQ=; b=snP4KPTmUUjctYTASx5gV/vzek4W7w1l2Man50Q/GxjXKHLht/KUndo8ASQVVbguse 0K+gRLdEgEYsOaS720eAfjwsMYjLwtbfsESnqfllbD8Yq9I+ofC+Z1JEyQ2/qJ/YKimZ hf1yN9ND3gTONtE67aj6Ms2mxdI5TST9OPloxA+aJ/UusTooeORlpwwrXTcsmf71Rzwu qVn26UtCpvoprsjOFIAJOsIrJ9fQA2eodfrGEl7VhjWmOz0FCNyGH5Hbi1VwobT6Lws5 Usybcs8QC1nAppwcfhUu1tLbqHs0qGN09dINjwWkLtmmVuU9e7ZzMhzQtEdyjoYqWxQ2 f66Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DgLbHAsL; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a056a00180b00b00563653bc151si20089453pfa.110.2022.11.02.17.25.25; Wed, 02 Nov 2022 17:25:38 -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=@linux.dev header.s=key1 header.b=DgLbHAsL; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231217AbiKCAI5 (ORCPT + 97 others); Wed, 2 Nov 2022 20:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbiKCAI4 (ORCPT ); Wed, 2 Nov 2022 20:08:56 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7AFF6331; Wed, 2 Nov 2022 17:08:54 -0700 (PDT) Date: Wed, 2 Nov 2022 17:08:32 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1667434133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aIozy4Ujz7Z2c69qFsPkkFtnJ9hdh3LiSwrKTFpiRvQ=; b=DgLbHAsLaCguIy0yqRz54f/htsOrLHkRG82+AISqC+6I57/JxLvtZbdjW7cPqrcIz2xFdg mXZIOLVyssiat6QSG4GmU0LCDVrkLvI355jgG4u7AXfUlYLMCmMyHxb6r1h3TUclGnNF/U 8lDLXWV9HQtNr1twgZNpwLH1nAYYQwk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Jakub Kicinski Cc: Andrew Lunn , Andy Ren , netdev@vger.kernel.org, richardbgobert@gmail.com, davem@davemloft.net, wsa+renesas@sang-engineering.com, edumazet@google.com, petrm@nvidia.com, pabeni@redhat.com, corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, David Ahern , Stephen Hemminger , Ido Schimmel Subject: Re: [PATCH net-next v2] netconsole: Enable live renaming for network interfaces used by netconsole Message-ID: References: <20221102002420.2613004-1-andy.ren@getcruise.com> <20221101204006.75b46660@kernel.org> <20221102125418.272c4381@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221102125418.272c4381@kernel.org> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, 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 Wed, Nov 02, 2022 at 12:54:18PM -0700, Jakub Kicinski wrote: > On Wed, 2 Nov 2022 10:14:38 -0700 Roman Gushchin wrote: > > > Agreed. BTW I wonder if we really want to introduce a netconsole > > > specific uAPI for this or go ahead with something more general. > > > > Netconsole is a bit special because it brings an interface up very early. > > E.g. in our case without the netconsole the renaming is happening before > > the interface is brought up. > > > > I wonder if the netconsole-specific flag should allow renaming only once. > > > > > A sysctl for global "allow UP rename"? > > > > This will work for us, but I've no idea what it will break for other users > > and how to check it without actually trying to break :) And likely we won't > > learn about it for quite some time, asssuming they don't run net-next. > > Then again IFF_LIVE_RENAME_OK was added in 5.2 so quite a while back. > > > > We added the live renaming for failover a while back and there were > > > no reports of user space breaking as far as I know. So perhaps nobody > > > actually cares and we should allow renaming all interfaces while UP? > > > For backwards compat we can add a sysctl as mentioned or a rtnetlink > > > "I know what I'm doing" flag? > > > > > > Maybe print an info message into the logs for a few releases to aid > > > debug? > > > > > > IOW either there is a reason we don't allow rename while up, and > > > netconsole being bound to an interface is immaterial. Or there is > > > no reason and we should allow all. > > > > My understanding is that it's not an issue for the kernel, but might be > > an issue for some userspace apps which do not expect it. > > There are in-kernel notifier users which could cache the name on up / > down. But yes, the user space is the real worry. > > > If you prefer to go with the 'global sysctl' approach, how the path forward > > should look like? > > That's the question. The sysctl would really just be to cover our back > sides, and be able to tell the users "you opted in by setting that > sysctl, we didn't break backward compat". But practically speaking, > its a different entity that'd be flipping the sysctl (e.g. management > daemon) and different entity that'd be suffering (e.g. routing daemon). > So the sysctl doesn't actually help anyone :/ Yeah, I agree, adding another sysctl for this looks like an overkill. > > So maybe we should just risk it and wonder about workarounds once > complains surface, if they do. Like generate fake down/up events. > Or create some form of "don't allow live renames now" lock-like > thing a process could take. > > Adding a couple more CCs and if nobody screams at us I vote we just > remove the restriction instead of special casing. Great, thanks! Let's do this and if there will be serious concernes raised, let's fallback to the netconsole-specific thing (maybe with the "allow single renaming" semantics). Thanks, Roman