Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp348818pxb; Thu, 23 Sep 2021 01:06:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpdoZlSxwxlUnSYzeKRfk2gcUTdfFZTduk9rvnQhuqs7iKc1Mj9CZB6GtzxwLnJZNVSfy8 X-Received: by 2002:a5e:9603:: with SMTP id a3mr2798576ioq.158.1632384413889; Thu, 23 Sep 2021 01:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632384413; cv=none; d=google.com; s=arc-20160816; b=sE25vKZaaYK5yRWLEMFqXtIkXT4jzf4U24sNI5yVOA9rNkVlikKE+R38LNLdzHBUAG 77ZkQftewel7IWsnlVR1r6hMLJmeEGmKqEvWqe2/rnijlS2uC39jM05SwJ/lhwBfxlCG pnVwXsUayPsA3sD4TPWp5iWdcvpujpAEMUhZUy8DxElwWE/NKt11GaixSMHQUzBNvoCi TpBmuih43bR1GmE3m9gAKjFIELNggyDHv5D1HhPRxLWzEjTzMjljDbbcwTlkwhzBisZv kbvWuEEREo4V8P2z03V23LyEqc8ETvUzYkx2kilVjVTRSxRyQJgn3TYMSlDJaY5MVgRB jRKw== 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=fenNopig2uqPhDzaUASFoJ0mAVpiCjBtQrjNJVD3GzA=; b=Snj6vCKtgfwmue7vd24Goq4yY+eNnI4sMXWA5re0IVQShE+lZK7JM88H+U52KReWIO qewuRBuPnD/ee+AXQ6YjlWFKBpuGBj+QrohoIEs+hMkQdm1LxMgciw4+JPXxhyOB0Gas /5NBOZ+JRJcIWOK/mTUpAY3wvbr3q7vIQxA2AWZgiCNWZ1EjtW1I2icIx7znjNb7NwZi qLUahCF5cLljHX4NcB9VJf8DxNuSG2u6ZQ0xRtsljfACvTJT87rcafLkRHS4+4U7LJO5 8Xj6FgYTUJzRY8ECyR+BbTepfepEzMx+tEUdOYePNSIlAbV4+xAkirBP6/BUHAOi8f2N QWgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si3620966ilu.118.2021.09.23.01.06.41; Thu, 23 Sep 2021 01:06:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239857AbhIWIE7 (ORCPT + 99 others); Thu, 23 Sep 2021 04:04:59 -0400 Received: from mga17.intel.com ([192.55.52.151]:11295 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239732AbhIWIDu (ORCPT ); Thu, 23 Sep 2021 04:03:50 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10115"; a="203945187" X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="203945187" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2021 01:02:16 -0700 X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="435729635" Received: from eugenias-mobl.amr.corp.intel.com (HELO ldmartin-desk2) ([10.252.133.66]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2021 01:02:13 -0700 Date: Thu, 23 Sep 2021 01:02:13 -0700 From: Lucas De Marchi To: Luis Chamberlain Cc: Lucas De Marchi , linux-modules , live-patching@vger.kernel.org, fstests@vger.kernel.org, linux-block@vger.kernel.org, hare@suse.de, dgilbert@interlog.com, Jessica Yu , osandov@fb.com, lkml Subject: Re: [PATCH v2 1/3] libkmod: add a library notice log level print Message-ID: <20210923080213.s3zoqcvngvk2h3f7@ldmartin-desk2> References: <20210810051602.3067384-1-mcgrof@kernel.org> <20210810051602.3067384-2-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 21, 2021 at 11:40:52AM -0700, Luis Chamberlain wrote: >On Mon, Sep 20, 2021 at 10:53:53PM -0700, Lucas De Marchi wrote: >> On Mon, Aug 9, 2021 at 11:56 PM Luis Chamberlain wrote: >> > >> > When you use pass the -v argument to modprobe we bump >> > the log level from the default modprobe log level of >> > LOG_WARNING (4) to LOG_NOTICE (5), however the library >> > only has avaiable to print: >> > >> > #define DBG(ctx, arg...) kmod_log_cond(ctx, LOG_DEBUG, ## arg) >> > #define INFO(ctx, arg...) kmod_log_cond(ctx, LOG_INFO, ## arg) >> > #define ERR(ctx, arg...) kmod_log_cond(ctx, LOG_ERR, ## arg) >> > >> > LOG_INFO (6) however is too high of a level for it to be >> > effective at printing anything when modprobe -v is passed. >> > And so the only way in which modprobe -v can trigger the >> > library to print a verbose message is to use ERR() but that >> > always prints something and we don't want that in some >> > situations. >> > >> > We need to add a new log level macro which uses LOG_NOTICE (5) >> > for a "normal but significant condition" which users and developers >> > can use to look underneath the hood to confirm if a situation is >> > happening. >> > >> > Signed-off-by: Luis Chamberlain >> > --- >> > libkmod/libkmod-internal.h | 2 ++ >> > 1 file changed, 2 insertions(+) >> > >> > diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h >> > index 398af9c..2e5e1bc 100644 >> > --- a/libkmod/libkmod-internal.h >> > +++ b/libkmod/libkmod-internal.h >> > @@ -25,10 +25,12 @@ static _always_inline_ _printf_format_(2, 3) void >> > # else >> > # define DBG(ctx, arg...) kmod_log_null(ctx, ## arg) >> > # endif >> > +# define NOTICE(ctx, arg...) kmod_log_cond(ctx, LOG_NOTICE, ## arg) >> > # define INFO(ctx, arg...) kmod_log_cond(ctx, LOG_INFO, ## arg) >> > # define ERR(ctx, arg...) kmod_log_cond(ctx, LOG_ERR, ## arg) >> > #else >> > # define DBG(ctx, arg...) kmod_log_null(ctx, ## arg) >> > +# define NOTICE(ctx, arg...) kmod_log_cond(ctx, LOG_NOTICE, ## arg) >> >> did you mean kmod_log_null()? > >Sure, feel free to change on your end or let me know if you would >prefer if I respin. fixed that and pushed this patch. thanks Lucas De Marchi > > Luis