From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.132 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796414513; b=lakzogcW6J3lPGCrNJ1BgPUN0qRMhAXv2qvMHztuebm/y+Lh4ulmyAW2/PfsuBYLdpAy pLdm9Mc08ZPysDyBPhwVoqIr1FIi0ByVGLnU3vxGVzFlwWgDjVKs5BK12VkRBy5heyW96 Qlm0QahOwSMUIqX7CdBOBzlL+gyN4EaYqfFrq3YCnRWQvurHtafAh/cQ7O7PXB0WIjkOm +GIh6vgKSG/ldbRvLTpBR1PJsD0cNS/h8EjdBt1P9JsVeuuxLr7yr6UD2as7tAcCq/XmQ ZE//kpTMGGrjQ2CpZ4Wtg3jJVx0ePCVZweA4T6+8xXVltPYLvevNVdYkMRkSPalPZeA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796414513; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:Message-ID:From:Subject:To:Cc:MIME-Version:Content-Type: Content-Disposition:User-Agent; bh=otv9ZuxucfiEl1v6Bc3ndsCkvqCr9xFUCmWr+eX/FNk=; b=QCmCm8qHKYEloZcA3oZejU4yYU+3DjmYDZ0/E1ohgzID50ocr/H3OvapPjz6HGfHXJgN +1RaK6mJiPBFmMzXJf2F8O6byLmlNqdmhleF98cy4uAYpKMbUgg6jt0JKUwgD4Vo5K6gf 4JGQAjiKv/qZPLFHvWP9HKOtAFEuf+VrY3sqdUVDbY7dFwfFbJe261QW4Cp278pKv3VzD /ytFx5Omdr8liJ4bpukUTuK8k5F1gTwVUAfIpzWZwaxwx9qW2a7AJja4RuTH6zuIUzzOc wrolFaFdR/1oHTtafDwv2NAZWZg03RHMx7ZyWTXPfG81iY94XvhL0CAeRuek/i5IHOQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=chrisdown.name; spf=pass smtp.mailfrom=chrisdown.name; dkim=pass header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=SvjoFnBE; arc=none smtp.remote-ip=74.125.224.132 Received: from mail-yx2-f4.google.com (mail-yx2-f4.google.com [74.125.224.132]) (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 F352A606A32D for ; Fri, 4 Dec 2026 20:01:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F352A606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=SvjoFnBE Received: by mail-yx2-f4.google.com with SMTP id 00721157ae682-8b4cc095c0bso2968077b3.1 for ; Fri, 04 Dec 2026 12:01:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1796414512; x=1797019312; darn=vger.kernel.org; h=user-agent:content-disposition:content-type:mime-version:cc:to :subject:from:message-id:date:from:to:cc:subject:date:message-id :reply-to:content-type; bh=otv9ZuxucfiEl1v6Bc3ndsCkvqCr9xFUCmWr+eX/FNk=; b=SvjoFnBEcxtxDOc+Hqq1ejCnFJWjAAqLJUY0zY0SXsCCR3oeGIe6Gbb9ei1aDTi+PN fPvqzCQ37x1SbJmbOeO9jMJUYJadU6VE7aEt47JLtYCEA6DkIqrf0hD2wdjdlINDKhfW fMRZ3QwGUFsKfjkAz0uV0X4ED5jbaKLjDW6/8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796414512; x=1797019312; h=user-agent:content-disposition:content-type:mime-version:cc:to :subject:from:message-id:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=otv9ZuxucfiEl1v6Bc3ndsCkvqCr9xFUCmWr+eX/FNk=; b=C+J5oFVeupCfGHTBScZ87DlZW8eHelCmIUpbE1iJg57MxGLZedM1Q1ws5oPYCRquuW CK18NafvkYo5ld5LU/p83G6lKEr4PCtTOtaiguoGQQqIbHrngjpoRq8QpqSHa+kyc4BA SCTWBj4Q+64hCmE9LmBO9H06w9j7d/6/eTF+7TBEKJUpkJ8oJNbn6C626oZGuJmyCYf/ 9vlgmNK3sibNXBQIKOyiW2UoOxvzth4guQNGCBfYO8P3KfEZOUk8OslXFTzAehl+TFTc W9ZCImLVu3zcsP/6kzBD8hy1hW62G2KGTZ1FMjnJ9C3fexkFP9p4pgG/RMwhEH4psMjM bQOA== X-Forwarded-Encrypted: i=1; AL+hErGI+siXIvwbnOPrrXwClibhSKP+dN/cYZep9DlMi9DZbmeti20i3q4cTG2NDM9mc0TR6G0DhiA59mb8LfA=@vger.kernel.org X-Gm-Message-State: AB4q+uGjGLHXmFBL4oT5nhulKNF8x9dAUR2PaVFoCo0G3MnbJaD5l0FP 2XWevVe1QYcoeWf1WR4grkLL5waSKJ5PrFDZo2/GkrdFeWXBAf1cqBEsTrIdIFyZziw= X-Gm-Gg: AZFdTZelp65P5N1+PZeFafs1+aX67KRnsW6chiTzJ0OIuHQS652iX+6wrbSt4wQoCIs M79TsSodAfZCInXYoYl75jRw0hq6vPe83R2TIIlMlgaOsH6CvCAjhH9STJk9mwCoPUmO8e2TKrq T2rD39RydsXly7ea0OZ+VBzV71JNDUZ3RrDbOfaec9bADWk96kdzjwpbPoDs9yvEE1r7se+SnLq DOH/tsfJKK7AZ5HpgzovT7i1IEz+aNgwg6UdZzhLKMNt9rmAiW55C7+cAu4laz3Lohbu1WR3lnd C2SpdTBDSuR+pHVEY4/dP0WcUsL2oVz0BQafBDFwLHB7FEXupbiscTcx4ZI29iB4wL+FISQ99qk fA0Q1a2kkB6b9oBHrBArPeHKqO1DAuklwRW8LR30yvoq316QABsaly41lNIzFe+cxevTiGIx47v 8z2cjBi3mLvfUEqIFoU2kcb01T4WTB3I5PAu+fBKI2WtKzLCsXvoJyPSJ5JbQoJ8uHGifP1QbJk SJpf4sPZPU0zhZIKnL6yU4YnhrTK+qGe2Npmg66h7Wh9SWUHveM/lMoVFiM3+dVxxMbk2g/N2Y5 /52cA7guLxM5GmPVT1hpgqJvB9AZfMgr0E3WKtwiEqGPO+V3Yfn/GebIznF7JL0/oJGnICnA15+ IDchF3ml2XVYcXDVDyB4VsKxf7kAHekzyYJZocIOeqfosFL7a0i32GO4ntTfVXUnEX8bdiYIQbr D1V0rGj3f/WTM1sRRsBfimu6+ns3nwYrW3e8WU7yk2yyRkpmSF3RgmeXbEtkAHRBKc8keM8UGdS ZhiIucXaMFdrnpyCttVc34= X-Received: by 2002:a05:690c:4cbc:b0:8b4:c991:47b1 with SMTP id 00721157ae682-8b660d9e3e1mr12389257b3.59.1796414511725; Fri, 04 Dec 2026 12:01:51 -0800 (PST) Received: from [172.18.0.2] (c-73-207-185-9.hsd1.ga.comcast.net. [73.207.185.9]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8b660d846besm14125527b3.25.2026.12.04.12.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 12:01:51 -0800 (PST) Date: Fri, 04 Dec 2026 12:01:48 -0800 Message-ID: From: Chris Down Subject: [PATCH 0/2] netconsole: give the console of each target a unique name To: Breno Leitao , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Shuah Khan , Shuah Khan , Gustavo Luiz Duarte , linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, pmladek@suse.com, john.ogness@linutronix.de, printk@lists.linux.dev, kernel-team@meta.com X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/2.4.3 (cc9e3943) (2026-10-09) 0d97bae9abbe ("netconsole: register one console per target") calls the console of a target netcons_, but only 15 characters of that fit and a target made through configfs always has index 0, so targets whose names start with the same seven characters all register a console with the same name and index. At the moment that only means that /proc/consoles can't tell them apart, but with the per-console loglevel series [0] applied on top, the second such target fails to get its directory in /sys/class/console, and the replay trigger planned for netconsole [1] would go by the same names. Patch 1 gives a new target the lowest index which no other target with the same console name has. Two such targets then become, say, netcons_target_0 and netcons_target_1, and a target with a short name like foo is still netcons_foo0. Patch 2 adds a selftest which creates two such targets and checks that /proc/consoles lists a different console for each, since no test looks at the console names so far. Breno, 0d97bae9abbe says that names can collide, so you may well have your own plans for this already. Patch 1 keeps the names you chose and only uses the index to tell them apart, but please do tell me if you'd rather go about it another way. This is based on net-next, since nothing else has 0d97bae9abbe yet. [0]: https://lore.kernel.org/r/84b8d91693e56f6026271bc40553bcb6657ab24d.1764272407.git.chris@chrisdown.name [1]: https://lore.kernel.org/r/at84qygscue8crQi@gmail.com Chris Down (2): netconsole: give the console of each target a unique name selftests: netconsole: check that targets get distinct console names drivers/net/netconsole.c | 43 +++++++++++- .../selftests/drivers/net/netconsole/Makefile | 1 + .../net/netconsole/netcons_console_name.sh | 70 +++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletion(-) create mode 100755 tools/testing/selftests/drivers/net/netconsole/netcons_console_name.sh base-commit: d5cf954cebe4f175dfd834e1dc471a3aa203ec7d -- 2.56.1