Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1062413rwb; Fri, 28 Jul 2023 04:18:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJBPKAVlS1XNhOQe/HSwsgMlx9w5L9/Q8PLBKZBO+aZncYVi03UVJ1HeH0bbqyoDJ6QoS7 X-Received: by 2002:a17:90b:101:b0:268:5431:f2a7 with SMTP id p1-20020a17090b010100b002685431f2a7mr1080305pjz.28.1690543095702; Fri, 28 Jul 2023 04:18:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690543095; cv=none; d=google.com; s=arc-20160816; b=FSwo8BthqHwXP6LrqlowPcGiuImXW5thixeNcMgCwtZfvrE92ffJOcsUHIlwAOKlG6 893SLWaYvHgnpul670cwqwQ95bQGYubmNdAiNv7IZhinHqFDYwzARJBCH2dyPuhYPBtK JzIJZLY0iHDrrOk4HPljoIOWFbOdhg9X/Rp4c4q17TRi0FZiKgoScPzbgeZz+MyBYhvX eOG2k8yrmeJzjYvVb3uHI2WyF8VL6Lpai8JNPMe9OkK0LT+Mbjv75idM82PRlgNeBR9j QyZsNm/NZGfJifJVG+JHuCe9auyd8iS6GSpg4BanANveYqEoBwL7E2MA9+zLnmFuzQz7 De5w== 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:date; bh=LVIaQsb7ph4vtvvBb5aH72jSkwPqs8dOlQZNLadpB5k=; fh=hESf54Tt9zFz//yqoHQOzspFdVpNpOQEW7mJmdF8e2A=; b=p5grC3RnTobOADlkVJqkE1mf43njGvtnLSar+iureV50jVtOzQRMxbeKIaXRGwxLKh b9s1tRitum2cOganglYWVn/5541npJYzNeLdZQRnX4av8e7QodBGDjlDcq6OfO05+rsm OwlhC6Y35h0P/WGU+nqozSiCY0/JXRRREsDjflxASad97j29AdrTeVNx6Y/j9w+FzHrJ GCGSV2L25/x+vDfmxl17oQNeJ0ru7br8Iz6UasjnDWQnnD4m9tcy9ebcIeeOVVhl9Xj+ I5/VspeRpXi9ovTFRISA3v9rB4b33lu14rfx+PudylIHf0KJ0e1KhT2x3phQf+ywSwu0 lNWA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h4-20020a17090a710400b00250331e6044si2958605pjk.25.2023.07.28.04.18.02; Fri, 28 Jul 2023 04:18:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235679AbjG1Ktw (ORCPT + 99 others); Fri, 28 Jul 2023 06:49:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbjG1Ktu (ORCPT ); Fri, 28 Jul 2023 06:49:50 -0400 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D0ED1BC3; Fri, 28 Jul 2023 03:49:49 -0700 (PDT) Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5227e5d9d96so2536349a12.2; Fri, 28 Jul 2023 03:49:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690541387; x=1691146187; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LVIaQsb7ph4vtvvBb5aH72jSkwPqs8dOlQZNLadpB5k=; b=UIa+dmT13DH5sXYhbYjswUqU4RrToNk3RD0kGRxfBF2rVCWZ9crS61BSgWwBeBXeGY AQ1NDLvx2XmCcXB5u6660oQ82TDMFSf0L6aUec6RhR1MJ+QM0ER7qWvUueDnML8D3L+Y W9kV79IW8NVGuGnWyAFaaD989n1BPIzov4AKrXklb6AkXkA+pW6KYw31YiovuRPfDLNB +1/4DNgXgkYGPXUDid8H+gDsgdPA4lpT71CMxOXGhZJZ/suyAl4G5Bc/zlBWmiaiTCy9 9ycUayC0tcQiPr8o66hBVg+4VTOU9SkLrhnfd+UNR+hwdLzcqysmOyaYY62qzcEKvCbB 8mVQ== X-Gm-Message-State: ABy/qLb4oUggvCZJQDnzGizpcGsP0dEeaO4vUT5YG7n+ApG0NZ5WimYc rcuQuKFNUG9h6rj8NAfqhg5pR1cV99o= X-Received: by 2002:a50:fa8d:0:b0:522:38cb:d8cb with SMTP id w13-20020a50fa8d000000b0052238cbd8cbmr1282442edr.20.1690541387204; Fri, 28 Jul 2023 03:49:47 -0700 (PDT) Received: from gmail.com (fwdproxy-cln-005.fbsv.net. [2a03:2880:31ff:5::face:b00c]) by smtp.gmail.com with ESMTPSA id i23-20020aa7c717000000b0051bed21a635sm1663576edq.74.2023.07.28.03.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 03:49:46 -0700 (PDT) Date: Fri, 28 Jul 2023 03:49:45 -0700 From: Breno Leitao To: Benjamin Poirier Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , leit@meta.com, "open list:NETWORKING DRIVERS" , open list Subject: Re: [PATCH net-next] netconsole: Enable compile time configuration Message-ID: References: <20230727163132.745099-1-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, Jul 27, 2023 at 02:47:45PM -0400, Benjamin Poirier wrote: > On 2023-07-27 09:31 -0700, Breno Leitao wrote: > > Enable netconsole features to be set at compilation time. Create two > > Kconfig options that allow users to set extended logs and release > > prepending features enabled at compilation time. > > > > Right now, the user needs to pass command line parameters to netconsole, > > such as "+"/"r" to enable extended logs and version prepending features. > > > > With these two options, the user could set the default values for the > > features at compile time, and don't need to pass it in the command line > > to get them enabled. > > > > Signed-off-by: Breno Leitao > > diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig > > index 368c6f5b327e..4d0c3c532e72 100644 > > --- a/drivers/net/Kconfig > > +++ b/drivers/net/Kconfig > > @@ -332,6 +332,26 @@ config NETCONSOLE_DYNAMIC > > at runtime through a userspace interface exported using configfs. > > See for details. > > > > +config NETCONSOLE_EXTENDED_LOG > > + bool "Enable kernel extended message" > > + depends on NETCONSOLE > > + default n > > + help > > + Enable extended log support for netconsole. Log messages are > > + transmitted with extended metadata header in the following format > > + which is the same as /dev/kmsg. > > + See for details. > > + > > +config NETCONSOLE_APPEND_RELEASE > ^ PREPEND > > > + bool "Enable kernel release version in the message" > > + depends on NETCONSOLE_EXTENDED_LOG > > + default n > > + help > > + Enable kernel release to be prepended to each netcons message. The > > + kernel version is prepended to the first message, so, the peer knows what > ^ each > > > + kernel version is send the messages. > > "kernel release" is one thing and "kernel version" is another: > root@vsid:~# uname --kernel-release > 6.5.0-rc2+ > root@vsid:~# uname --kernel-version > #37 SMP PREEMPT_DYNAMIC Thu Jul 27 14:20:44 EDT 2023 > > This option relates to the kernel release so please use the correct > name consistently in the help text. Good point. I will fix it in v2. > > + See for details. > > + > > config NETPOLL > > def_bool NETCONSOLE > > > > diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c > > index 87f18aedd3bd..3a74f8c9cfdb 100644 > > [...] > > Why is it needed to change the default for these parameters? Is there a > case where it's not possible to specify those values in the netconsole= > parameter? > > If the default is set to on, there is no way to disable it via the > command line or module parameter, right? This patch shouldn't be chagning the default value at all. The default value should be =n, as it is today. Where do you see the default being changed? This is what the patch does, setting "default n". +config NETCONSOLE_EXTENDED_LOG + bool "Enable kernel extended message" + depends on NETCONSOLE + default n and +config NETCONSOLE_APPEND_RELEASE + bool "Enable kernel release version in the message" + depends on NETCONSOLE_EXTENDED_LOG + default n Thanks for the review.