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: <044701d82e88$c5edb6f0$51c924d0$@samsung.com>
Date:   Thu, 3 Mar 2022 07:56:37 +0900
From:   장영진/TV S/W Lab(VD)/Staff Engineer/삼성전자 <yj84.jang@...sung.com>
To:     "'Bjorn Helgaas'" <helgaas@...nel.org>,
        "'Greg Kroah-Hartman'" <gregkh@...uxfoundation.org>
Cc:     "'Rafael J. Wysocki'" <rafael@...nel.org>,
        "'Pavel Machek'" <pavel@....cz>,
        "'Len Brown'" <len.brown@...el.com>,
        "'Bjorn Helgaas'" <bhelgaas@...gle.com>,
        <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-pci@...r.kernel.org>, <linux-acpi@...r.kernel.org>,
        <linux-usb@...r.kernel.org>, <js07.lee@...sung.com>
Subject: RE: [PATCH] PM: Add device name to suspend_report_result()

> -----Original Message-----
> From: Bjorn Helgaas <helgaas@...nel.org>
> Sent: Thursday, March 3, 2022 5:16 AM
> To: 'Greg Kroah-Hartman' <gregkh@...uxfoundation.org>
> Cc: �念��/TV S/W Lab(VD)/Staff Engineer/�Z���� <yj84.jang@...sung.com>;
> 'Rafael J. Wysocki' <rafael@...nel.org>; 'Pavel Machek' <pavel@....cz>;
> 'Len Brown' <len.brown@...el.com>; 'Bjorn Helgaas' <bhelgaas@...gle.com>;
> linux-pm@...r.kernel.org; linux-kernel@...r.kernel.org; linux-
> pci@...r.kernel.org; linux-acpi@...r.kernel.org; linux-usb@...r.kernel.org;
> js07.lee@...sung.com
> Subject: Re: [PATCH] PM: Add device name to suspend_report_result()
> 
> On Wed, Mar 02, 2022 at 03:52:51PM +0100, 'Greg Kroah-Hartman' wrote:
> > On Wed, Mar 02, 2022 at 08:00:14PM +0900,  念  /TV S/W Lab(VD)/Staff
> Engineer/ Z     wrote:
> > > > -----Original Message-----
> > > > From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > > > Sent: Wednesday, March 2, 2022 4:58 PM
> > > > To: Youngjin Jang <yj84.jang@...sung.com>
> > > > Cc: Rafael J. Wysocki <rafael@...nel.org>; Pavel Machek
> > > > <pavel@....cz>; Len Brown <len.brown@...el.com>; Bjorn Helgaas
> > > > <bhelgaas@...gle.com>; linux-pm@...r.kernel.org;
> > > > linux-kernel@...r.kernel.org; linux- pci@...r.kernel.org;
> > > > linux-acpi@...r.kernel.org; linux-
> > > usb@...r.kernel.org;
> > > > js07.lee@...sung.com
> > > > Subject: Re: [PATCH] PM: Add device name to
> > > > suspend_report_result()
> > > >
> > > > On Wed, Mar 02, 2022 at 03:49:17PM +0900, Youngjin Jang wrote:
> > > > > From: "yj84.jang" <yj84.jang@...sung.com>
> > > > >
> > > > > currently, suspend_report_result() prints only function
> information.
> > > > > If any driver uses common pm function, nobody knows who called
> > > > > failed function exactly.
> > > > >
> > > > > So, device information is needed to recognize specific wrong
> driver.
> > > > >
> > > > > e.g.)
> > > > > PM: dpm_run_callback(): pm_generic_suspend+0x0/0x48 returns 0
> > > > > PM: dpm_run_callback(): platform_pm_suspend+0x0/0x68 returns 0
> > > > > after patch,
> > > > > PM: dpm_run_callback(): pm_generic_suspend+0x0/0x48 (amba)
> > > > > returns 0
> > > > > PM: dpm_run_callback(): platform_pm_suspend+0x0/0x68 (armv7-pmu)
> > > > > returns 0
> 
> > > > > -		pr_err("%s(): %pS returns %d\n", function, fn, ret);
> > > > > +		pr_err("%s(): %pS (%s) returns %d\n", function, fn,
> > > > > +dev_driver_string(dev), ret);
> > > >
> > > > If you have a struct device, please use dev_err().
> > >
> > > I think dev_err() is nice option, but we can see a minor issue.
> > > Prefix log "PM: " would be lost, If I use dev_err() in this context.
> > > As you know, all logs in power management include "PM :" prefix.
> >
> > Why does that matter?  Fix them all to use the struct device pointer
> > and then they will be properly unified with the rest of the kernel log
> > infrastructure.
> 
> You can #define dev_fmt if you need a prefix.

I tested dev_fmt before, but I feel that not a good solution.
Because the readability is not so great than I expected.
I didn't want to break the PM logging rules.

Anyway, I got you guys opinion.
Let me try second patch with dev_err().


Powered by blists - more mailing lists