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: <20190429001302.GL14616@google.com>
Date:   Sun, 28 Apr 2019 19:13:02 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     fred@...dlawl.com, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, mika.westerberg@...ux.intel.com,
        lukas@...ner.de, keith.busch@...el.com, mr.nuke.me@...il.com,
        liudongdong3@...wei.com, thesven73@...il.com
Subject: Re: [PATCH 3/4] PCI: pciehp: Remove unused macro definitions

On Sun, Apr 28, 2019 at 06:55:36PM +0300, Andy Shevchenko wrote:
> On Sat, Apr 27, 2019 at 02:13:03PM -0500, fred@...dlawl.com wrote:
> > Now that all uses for the ctrl_*() printk wrappers are removed from
> > files and replaces with pci_*() or pr_*() printk wrappers, remove the
> > unused macro definitions. In addition to that, remove the MY_NAME macro.
> 
> >  extern bool pciehp_debug;
> 
> How it's used after all?
> 
> > -#define dbg(format, arg...)						\
> > -do {									\
> > -	if (pciehp_debug)						\
> > -		printk(KERN_DEBUG "%s: " format, MY_NAME, ## arg);	\
> > -} while (0)
> 
> > -#define ctrl_dbg(ctrl, format, arg...)					\
> > -	do {								\
> > -		if (pciehp_debug)					\
> > -			dev_printk(KERN_DEBUG, &ctrl->pcie->device,	\
> > -					format, ## arg);		\
> > -	} while (0)
> 
> Besides ruining the pciehp_debug support this will make unequivalent behaviour.

I'm not super attached to pciehp_debug.  But perhaps pciehp is one
place where it would make sense to use pci_dbg().

There are a lot of uses of ctrl_dbg() and some of them look like
they're too low-level to just convert to pci_info(), e.g., info about
every command we write to the controller.  We probably don't need all
that info all the time.

But if we want to keep it, maybe we could convert it to use pci_dbg()
and the dynamic debug stuff.  I'm pretty sure the dyndbg syntax is
complicated enough to enable pciehp logging specifically.  Then we
could use that instead of the pciehp-specific module parameter.

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ