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: <6e6b78a2-6354-5c5b-b0d8-711be24000b8@oracle.com>
Date:   Wed, 27 May 2020 19:18:48 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Juergen Gross <jgross@...e.com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH 1/2] xen-pciback: Use dev_printk() when possible

On 5/27/20 6:50 PM, Bjorn Helgaas wrote:
> On Wed, May 27, 2020 at 03:34:26PM -0700, Boris Ostrovsky wrote:
>> On 5/27/20 1:43 PM, Bjorn Helgaas wrote:
>>> @@ -155,8 +157,8 @@ int xen_pcibk_config_read(struct pci_dev *dev, int offset, int size,
>>>  	u32 value = 0, tmp_val;
>>>  
>>>  	if (unlikely(verbose_request))
>>> -		printk(KERN_DEBUG DRV_NAME ": %s: read %d bytes at 0x%x\n",
>>> -		       pci_name(dev), size, offset);
>>> +		dev_printk(KERN_DEBUG, &dev->dev, "read %d bytes at 0x%x\n",
>>> +			   size, offset);
>>
>> Maybe then dev_dbg() ?
> printk(KERN_DEBUG) always produces output, so I used
> dev_printk(KERN_DEBUG) to retain that behavior.
>
> dev_dbg() does not always produce output, since it depends on DEBUG or
> CONFIG_DYNAMIC_DEBUG and the dynamic debug settings.


Oh, I didn't realize it needs either of these.


>
> If dev_dbg() seems like the right thing, I would probably add a
> separate patch on top to convert dev_printk(KERN_DEBUG) to dev_dbg().


I think anyone who wants to see those messages ought to have at least
CONFIG_DYNAMIC_DEBUG, especially since they are under verbose_request
(which also should go away IMO). In fact, I wonder whether this code
predates dynamic debugging, it's been there for almost 10 years.


I'll leave it to you whether you want to add another patch.


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ