Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32546754rwd; Fri, 7 Jul 2023 16:16:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlHLwEdTDY1NHHxo9EdkRf3olQth6j94wmbIE5O5pTP7Z5LMd6KV3fNrnyWNHRVh4rTkYpY/ X-Received: by 2002:aa7:c0d9:0:b0:51e:126a:403a with SMTP id j25-20020aa7c0d9000000b0051e126a403amr4551951edp.13.1688771773665; Fri, 07 Jul 2023 16:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688771773; cv=none; d=google.com; s=arc-20160816; b=WhsmsaepWpTJsT3KoVQtjffKeT6WOI3TrNf5jOjN27Hw0cGIVd1kj6XqvHOe3UVEON R8cn3EtqZqeBRzrQEsLqQ/f1dF6Pj8yrx8uuNMhh4CA80lp9WFZCqE6LG4kMaVSA5goZ bhzT3d86VniCEBzg4yktzF6eqrTn2Z+wAGVeFhET2u4BiwvdNBWyQobpqymdEXnRQTgL 2qh1nm2KNkqJls+gUS2Y4dtZsJbM5WCehIahXcGkazOafz92w6bXtwHGTTEtuQaqVEjx pKL0JyOniHJt2kMKAsMICR0MNcJJpkhQE7+x1ygdkJ5uZ+69wdhJH2w9khzvF9J0j4Tq eIYA== 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=9t8oBleiNzYuh62QYGYETDBt83vOKowEbaC9TrHcNWE=; fh=2OeXk8iDrwnpD1Z5teVgzwsQ3HtZhW3FFK1rjrOjyA8=; b=iT3to+dG68rKY1zVM7+/g+0XAiBtA01R3s0IrbP3yGo4SW8mYgha4v2lSYOv2yVp7m Q5BHSyHTrzFCOB7dvcS+R3jCZPCgEvr1SjkQ6u6H7F6gpxDNVJh+DLHxAnmtYy6bFKgP DjODm+cg3ohUdh4KSd1RFCQWEBMhnTeKHcMudtxeuunvHOe1Roc8wYaiENS3qH70CVo7 GiWTIyqKf5pNC59VvqX6XIANy1e+AAl2uHfqwm4Wmpj2rmZg2yiY9NiXkrw6sLca+7ok kolKHpN6FQoC79+l9wqjjrBxkNirwepRxeaugYEXmWTUWEcH4sZnGumcyqsFbjulUbzI 4Ntg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YOzvootF; 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 m5-20020a50ef05000000b0051e03cd3ad6si2729374eds.302.2023.07.07.16.15.49; Fri, 07 Jul 2023 16:16:13 -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=YOzvootF; 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 S231150AbjGGXKz (ORCPT + 99 others); Fri, 7 Jul 2023 19:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjGGXKx (ORCPT ); Fri, 7 Jul 2023 19:10:53 -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 C9D9E1FEC; Fri, 7 Jul 2023 16:10:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5E8F861ABC; Fri, 7 Jul 2023 23:10:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65D18C433C8; Fri, 7 Jul 2023 23:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688771451; bh=epNAr2DDyGPShAjRJk+xhNsNY5DucIhhIQhO0oT11n4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YOzvootFxD46KcjzgYrtI2oxMbaSldAb75HMTQdUCLpDzul5OTrFWcH1CGmcfMwBZ pbZeyIc4tkoY4udUKoiIop3n+IDcu23uzomggPH8iypEASs8GGNDc49LwAQcqpkKM8 JtUUXhU7QsMuvPokTSfZC3iegHb/9l2EAAml232xt1rZuqHg6E1LppiKm3ZrWivA3m 6hIHpF1F9sux+gOVX8BlTagqYkOUPl4ZLwoKiy583hM6eu4M+VsVt9Cp49f9D4Z1m2 oVXmTvzq6qG7C6ui8Iih9aWdTpmemfvTrrq6iJBx/vGJsQp1ts+F2ZpeIaGxrD2GSj YOviVzQzXjLFg== Date: Fri, 7 Jul 2023 16:10:50 -0700 From: Jakub Kicinski To: Breno Leitao Cc: "David S. Miller" , Eric Dumazet , Paolo Abeni , Jonathan Corbet , sergey.senozhatsky@gmail.com, pmladek@suse.com, tj@kernel.org, stephen@networkplumber.org, Dave Jones , netdev@vger.kernel.org (open list:NETWORKING [GENERAL]), linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH v2] netconsole: Append kernel version to message Message-ID: <20230707161050.61ec46a8@kernel.org> In-Reply-To: <20230707132911.2033870-1-leitao@debian.org> References: <20230707132911.2033870-1-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Fri, 7 Jul 2023 06:29:11 -0700 Breno Leitao wrote: > Create a new netconsole runtime option that prepends the kernel version in > the netconsole message. This is useful to map kernel messages to kernel > version in a simple way, i.e., without checking somewhere which kernel > version the host that sent the message is using. > > If this option is selected, then the "," is prepended before the > netconsole message. This is an example of a netconsole output, with > release feature enabled: > > 6.4.0-01762-ga1ba2ffe946e;12,426,112883998,-;this is a test > > Calvin Owens send a RFC about this problem in 2016[1], but his > approach was a bit more intrusive, changing the printk subsystem. This > approach is lighter, and just append the information in the last mile, > just before netconsole push the message to netpoll. > > [1] Link: https://lore.kernel.org/all/51047c0f6e86abcb9ee13f60653b6946f8fcfc99.1463172791.git.calvinowens@fb.com/ > > Cc: Dave Jones > Signed-off-by: Breno Leitao Looks good! net-next is closed for the duration of the merge window so you'll need to repost next week, and please put [PATCH net-next v3] as the subject prefix while at it. > @@ -332,6 +350,11 @@ static ssize_t enabled_store(struct config_item *item, > } > > if (enabled) { /* true */ > + if (nt->release && !nt->extended) { > + pr_err("release feature requires extended log message\n"); > + goto out_unlock; > + } This is the only bit that gave me pause - when parsing the command line you ignore release if extended is not set (with an error/warning). Does it make sense to be consistent and do the same thing here? Or enabling at runtime is fundamentally different?