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]
Date:   Fri, 3 May 2019 14:31:54 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Frederick Lawler <fred@...dlawl.com>
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        mika.westerberg@...ux.intel.com, lukas@...ner.de,
        andriy.shevchenko@...ux.intel.com, keith.busch@...el.com,
        mr.nuke.me@...il.com, liudongdong3@...wei.com, thesven73@...il.com
Subject: Re: [PATCH v2 1/9] PCI/AER: Cleanup dmesg logs

On Thu, May 02, 2019 at 10:59:38PM -0500, Frederick Lawler wrote:
> Cleanup dmesg logs.

To specific, I think you did this:

  - Drop the kzalloc() failure message because those failures are logged
    elsewhere.

  - Convert other printk(KERN_DEBUG) to pci_info() or dev_err() as
    appropriate because printk(KERN_DEBUG) is ugly and don't match the
    other logging.  These could have been converted to pci_dbg() or
    dev_dbg() instead, but that would make them depend on
    CONFIG_DYNAMIC_DEBUG or DEBUG, and these messages are important enough
    that we always want them.

I think the summary (subject line) is something like:

  PCI/AER: Convert printk(KERN_DEBUG) to pci_info() or dev_err()

> Signed-off-by: Frederick Lawler <fred@...dlawl.com>
> ---
>  drivers/pci/pcie/aer.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index f8fc2114ad39..82eb45335b6f 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -964,8 +964,8 @@ static bool find_source_device(struct pci_dev *parent,
>  	pci_walk_bus(parent->subordinate, find_device_iter, e_info);
>  
>  	if (!e_info->error_dev_num) {
> -		pci_printk(KERN_DEBUG, parent, "can't find device of ID%04x\n",
> -			   e_info->id);
> +		pci_info(parent, "can't find device of ID%04x\n",
> +			 e_info->id);
>  		return false;
>  	}
>  	return true;
> @@ -1380,7 +1380,6 @@ static int aer_probe(struct pcie_device *dev)
>  
>  	rpc = devm_kzalloc(device, sizeof(struct aer_rpc), GFP_KERNEL);
>  	if (!rpc) {
> -		dev_printk(KERN_DEBUG, device, "alloc AER rpc failed\n");
>  		return -ENOMEM;
>  	}
>  	rpc->rpd = dev->port;
> @@ -1389,8 +1388,8 @@ static int aer_probe(struct pcie_device *dev)
>  	status = devm_request_threaded_irq(device, dev->irq, aer_irq, aer_isr,
>  					   IRQF_SHARED, "aerdrv", dev);
>  	if (status) {
> -		dev_printk(KERN_DEBUG, device, "request AER IRQ %d failed\n",
> -			   dev->irq);
> +		dev_err(device, "request AER IRQ %d failed\n",
> +			dev->irq);
>  		return status;
>  	}
>  
> @@ -1419,7 +1418,7 @@ static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
>  	pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, reg32);
>  
>  	rc = pci_bus_error_reset(dev);
> -	pci_printk(KERN_DEBUG, dev, "Root Port link has been reset\n");
> +	pci_info(dev, "Root Port link has been reset\n");
>  
>  	/* Clear Root Error Status */
>  	pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, &reg32);
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ