lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <582c718e-568d-7f70-aef7-b0206600d3a3@linux.intel.com>
Date: Fri, 14 Feb 2025 16:37:30 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Bjorn Helgaas <helgaas@...nel.org>
cc: Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org, 
    Karolina Stolarek <karolina.stolarek@...cle.com>, 
    LKML <linux-kernel@...r.kernel.org>, linuxppc-dev@...ts.ozlabs.org, 
    Mahesh J Salgaonkar <mahesh@...ux.ibm.com>, 
    Oliver O'Halloran <oohall@...il.com>
Subject: Re: [PATCH 3/4] PCI: shpchp: Cleanup logging and debug wrappers

On Thu, 13 Feb 2025, Bjorn Helgaas wrote:

> On Mon, Dec 16, 2024 at 06:10:11PM +0200, Ilpo Järvinen wrote:
> > The shpchp hotplug driver defines logging wrappers ctrl_*() and another
> > set of wrappers with generic names which are just duplicates of
> > existing generic printk() wrappers. Only the former are useful to
> > preserve as they handle the controller dereferencing (the latter are
> > also unused).
> > 
> > The "shpchp_debug" module parameter is used to enable debug logging.
> > The generic ability to turn on/off debug prints dynamically covers this
> > usecase already so there is no need to module specific debug handling.
> > The ctrl_dbg() wrapper also uses a low-level pci_printk() despite
> > always using KERN_DEBUG level.
> 
> I think it's great to get rid of the module param.  Can you include
> a hint about how users of shpchp_debug should now enable debug prints?
> 
> The one I have in my notes is to set CONFIG_DYNAMIC_DEBUG=y and boot
> with 'dyndbg="file drivers/pci/* +p"'.

Sure, I'll add the info and split the change as you suggested below.

> > Convert ctrl_dbg() to use the pci_dbg() and remove "shpchp_debug" check
> > from it.
> > 
> > Removing the non-ctrl variants of logging wrappers and "shpchp_debug"
> > module parameter as they are no longer used.
> 
> > -#define dbg(format, arg...)						\
> > -do {									\
> > -	if (shpchp_debug)						\
> > -		printk(KERN_DEBUG "%s: " format, MY_NAME, ## arg);	\
> > -} while (0)
> > -#define err(format, arg...)						\
> > -	printk(KERN_ERR "%s: " format, MY_NAME, ## arg)
> > -#define info(format, arg...)						\
> > -	printk(KERN_INFO "%s: " format, MY_NAME, ## arg)
> > -#define warn(format, arg...)						\
> > -	printk(KERN_WARNING "%s: " format, MY_NAME, ## arg)
> 
> The above are unused, aren't they?  Can we make a separate patch to
> remove these, for ease of describing and reviewing?

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ