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=rNc9/QTLW0DqNY2CyQby6CLUnt4zdMbNxpiJMqrNNgKz21YkVhxNA/ou86ITTvRq1YpH YtlibB6p2sDOqdqpaqZG6YbukNwwpgz0gf6p7EZTLKayAjKR7UtEMCkVa8AxCr4PhqHQt WP4FBSWWeosym7+UamvZjpTGqjna2Ri/7r7KpBUA6AwKuvppP96ZNzdxOLu73RIcHjgB8 1oZBl9VFJKof4GFfi429MP5f+fwAYwLfggTqCDY6mvh0HxhgSBpkTeI+gnFLBm+JqpiQR 7t/f83B5VfXuzD6Gt5+4wMyN9n8vMc8GGalHVrYCPO7i/u4DV7jJeEc9ta9wh98e2Wg== 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=Lv2KOFcaIqRtDTCEObRyAYBfcnSR05bfr1dduTG8cbGOr+E+F2BdINsckknyCRxttgNP t4UcUkF9TUIWr6dY7CIMPk7xS9Si9Rgxmdwq8cm6qOxFi3mVL/X8n88hMceeHgdxwRVS2 4TgR8sDyfEIl5jp6Oo5JW9wZ1WENRyblp3dic2xF/EvtcPxf7oPvYoMB2E/RC/U2JPo2P MIfqAAv8jUX7YKHhscHdIe6z4YjotZryb4GfqPl3F5Aaun6RHjCabtwmgZyK8cimJcm1o +BElauJQ0HDsNItbhuoZmzcczfW2hcBY8smwYI+lWlZBzuAciWS5V05X4Vhe/0VLJGA== 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 F35AF606A32F for ; Fri, 4 Dec 2026 20:01:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F35AF606A32F 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, unprotected) 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-8b4cc095c0bso2968107b3.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=BWkNnVLo7Ll0AjV4t2pKERKtj8GzPz9DwkrlYrMZdL3fRlI0CQAH+oIWUoxXHrnlYe gf0Fw1Xre4nwj00ZGePo20q50XNBXdiA0T/ES+UeweSTfJR5s2FDoyFRi4lU5pdE8oHO 7L7DQQUe9cbB2rocOYOK/Wh2kumHSf/IwFV4S+zYTztfHAfecqqkCiCSkPR/dmtMD4fA k+mc7TEMySsQhTG/tRYRUibh7ZwgAf1Gw2HTbT9J7TsDvEJqbmzJ5c6LZnw26uy5srrl EWi6IAIsLooBqfdPOCs1DxPnXCPGCQIAMdD05WCIeHAPDNPUQ4UPIl28jWWu8spJYpUx +8TA== X-Forwarded-Encrypted: i=1; AL+hErHuGyJiTj81TXrz2/+GPr7f8hasdNF7cL9UbG/LAtEpN4AZ5FIjXlqK7s/3QbtVON+TGaAhH1GBZOw44PR+dLw=@vger.kernel.org X-Gm-Message-State: AB4q+uGawtGRMsA6yt42sR0C1L0d/YxXo2mIb4MGoCIcPko+yaFRGU6B gdHFvM9CURAgcLFNg9sUGNDu32+pL4WBAa3KMKUe9BDcC5sEW7GdNGryZMeh0k1ifKs= X-Gm-Gg: AZFdTZdpiWLN4b+pfbMCFtFJjtvZGb3GwrG46eAxXyyWObnXZ+Hd8WvCqJ6qOOcBRx2 6J1EC6n9Ehl+z1kdqNoJJwNZlJfE0OWEmT6+L1i/I1gAInI3TwddKtSk2lbm1Mt0ie8TNFcyVkK TWnSn9hUPpGG1HIZJWerCZmn5OCIpxRas/L4hWKZ6Yq8BUIN/Sxdo/FUhpkrJR8JLbQVYX1zrsK VK0XCe2kVPRtE6AEsiCAyhV+Q65xGP5aL6+CdmgZ0HxEtrbNMdWgdyK8TnHO3XMBQmilz+C8mLa vokuKPUnLCTCqOZRGNfbke94FCrMmC0TY4lVcCjx3l3nyzjec2jef5ciatlIUbaLfdFzSO+ZdS8 QgZ0/ZoEu61ioOnhdStVKlDJ9agt8UK/3ObCUaQKU/ZRrd1ng6KxEMkpBUa2x0J8L4nyvI6j+jO WP6g7fqa7ECXu4re5LFWkS4+QDjDCxGzsMqqPw/Jfpv/n+BvmvsV+cV+nO60cRuc0zgk4gce8PD k37Ow3n/FY4cPqKsqLfK6fctU3QoZIMTBIWT9T8Hax/gySsKot5fQSoMkVRccElS+nyNFd0rFtS rkM71BJHKcO8Q6R7hdfkyIBGR+Wb9SzX6zO37Nw3ZyTxRxav1LConDcw0jtjQgX5kynqujq06yW JLu4njfvhIGzOVebqtcqRhrigkcTTzRIJfZ2sbSRHWUZKt1PBGBRZS4hXGhLq8nvuXlBAP/wZyO GlsF56L3Y1835mNv7ulZCMmhsthnnHpW/gCJ6iMltivduA3o6rXWvSWqwiNuafcWntoAlrB4UU8 9fUxAu7GuNezP04WZ78bHQ= 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-kselftest@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