Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1437379rdb; Mon, 2 Oct 2023 09:26:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH0fei735AR5TpmDcRinkQtG2ZFYKLXvFD66M0gzJFljCl07qxXGcRmkTGvJMnNoPeTW71U X-Received: by 2002:a17:903:1251:b0:1c5:59ea:84de with SMTP id u17-20020a170903125100b001c559ea84demr12184651plh.29.1696263987685; Mon, 02 Oct 2023 09:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696263987; cv=none; d=google.com; s=arc-20160816; b=HhoSE39EfCvc3+qSbmmJx5aHe6URNHlqTUbwahLmqA6dgqYhesIJlpKm+k36WDkPEI Iq+dNkA+ObHbPk78evTAZKweF/LN4gwXlGNRRn08numoxeqNBfHw57678DRpddq3VfDP vAsMBFVLFv4IPgldyepdJZkajn1g8l8D8iGRf26ve+MYp0JFF+vUdfoMqxzJDQ8eIbGZ PWPvsgLVOCnlVdAfDGmEp/xg9f4sbH0kof3UV9JW4GtjWyBKjTAhdqxolcupNZP3U5mo nUZRunvMVs/Ja6lrwzxZGtR6UebaWLP77QV2jMoz7T+4yYBFQH2doRuF47O2N4dAgnSn mWzA== 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 :message-id:date:subject:cc:to:from; bh=CupPcUlQycCtq5LF2h/9frfQ4ms2uZQt+PNe4MPVspc=; fh=Y8M2sZ2XO+pZt/BBlIAACnnh4xUE6kU0kxeA2C14q1Q=; b=iXwFMLeDy3pvnC687mluyJ0+WCdbfHje0Dm0jxHpHMnBPWwaAPhegBKXqIkxfTBN0v jtcR9xy4cUnIvRAiBoUxcTzNXwbWb0QZ9oqAqIRaeHJ9tCHZIpiSPM7Ee9wqhBgKJSX0 BuXNY1PkF7T69w2HkkM98O5edSxW9vBEoEoq4qq24QZ9JNvGH/q1WvBDyx7Frdw5ExRO NSBLcgEBlR+YFVaRUkKQzf7AHWYcEEll+8AJ4drOkEesCDyE4yGH4eOAjj/TDlEuemKN Ey4uvu+0tupE/A/2myEh4icDVxVLyhe3bC/vqe8vFdWHvV14F6WE1TF2m7LojOv0qFZg 5zXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id y9-20020a17090264c900b001c5fd2a242asi22854600pli.363.2023.10.02.09.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 09:26:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 222ED806AFFF; Mon, 2 Oct 2023 08:56:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238285AbjJBPzp (ORCPT + 99 others); Mon, 2 Oct 2023 11:55:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238273AbjJBPzn (ORCPT ); Mon, 2 Oct 2023 11:55:43 -0400 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB337D3; Mon, 2 Oct 2023 08:55:39 -0700 (PDT) Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-9adca291f99so2297230966b.2; Mon, 02 Oct 2023 08:55:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696262138; x=1696866938; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CupPcUlQycCtq5LF2h/9frfQ4ms2uZQt+PNe4MPVspc=; b=UAmke+VRDE5iNbSult56dfmU9+sKKaKmnF/2rDik88+0kAih1uVUE1+GAV+b1y9Ud+ ovosolgYbVW5UQbEPLPrdOsHe92AlriU+toklAOwfqGbqhF6oxHnVTnYPt8boZzrZI0V UPEsjqFzZSVLm9lZbzytThetjax4xDzpCxUS3Z1MYEPpGT9fA0/thdYMsZl27jKP5yx0 zpCEC+MMANbEz3dSn9w1rn14SlcJEMykDa0PMOPz/Po9PCaevBUn1AcVvSJtk3pDfyuX yRq4WpFXUSuLG93Q6Xw7cpfIAOwR1sIHK5vFmVJ3QkQYmrxKKNj//zQOeWINdidinlRN +NkA== X-Gm-Message-State: AOJu0YwBFuIXW7bApEf2ywMSXC9FNyRH01j3Ko6EwzUy9zTB/D3OuZ+9 z3yRHqOInyLCnGzGihAafY8= X-Received: by 2002:a17:906:29e:b0:9b0:552c:b36c with SMTP id 30-20020a170906029e00b009b0552cb36cmr11400180ejf.21.1696262137932; Mon, 02 Oct 2023 08:55:37 -0700 (PDT) Received: from localhost (fwdproxy-cln-012.fbsv.net. [2a03:2880:31ff:c::face:b00c]) by smtp.gmail.com with ESMTPSA id i2-20020a170906444200b0099cb0a7098dsm17380398ejp.19.2023.10.02.08.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 08:55:37 -0700 (PDT) From: Breno Leitao To: jlbec@evilplan.org, kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com Cc: hch@lst.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org Subject: [PATCH 0/3] net: netconsole: configfs entries for boot target Date: Mon, 2 Oct 2023 08:53:46 -0700 Message-Id: <20231002155349.2032826-1-leitao@debian.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 02 Oct 2023 08:56:01 -0700 (PDT) There is a limitation in netconsole, where it is impossible to disable or modify the target created from the command line parameter. (netconsole=...). "netconsole" cmdline parameter sets the remote IP, and if the remote IP changes, the machine needs to be rebooted (with the new remote IP set in the command line parameter). This allows the user to modify a target without the need to restart the machine. This functionality sits on top of the dynamic target reconfiguration that is already implemented in netconsole. The way to modify a boot time target is creating special named configfs directories, that will be associated with the targets coming from `netconsole=...`. Example: Let's suppose you have two netconsole targets defined at boot time:: netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc;4444@10.0.0.1/eth1,9353@10.0.0.3/12:34:56:78:9a:bc You can modify these targets in runtime by creating the following targets:: $ mkdir cmdline1 $ cat cmdline1/remote_ip 10.0.0.3 $ echo 0 > cmdline1/enabled $ echo 10.0.0.4 > cmdline1/remote_ip $ echo 1 > cmdline1/enabled Breno Leitao (3): netconsole: Initialize configfs_item for default targets netconsole: Attach cmdline target to dynamic target Documentation: netconsole: add support for cmdline targets Documentation/networking/netconsole.rst | 21 ++++++++-- drivers/net/netconsole.c | 51 ++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 5 deletions(-) -- 2.34.1