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:   Tue, 13 Nov 2018 13:38:24 +0000
From:   John Garry <john.garry@...wei.com>
To:     Joe Perches <joe@...ches.com>, <jejb@...ux.vnet.ibm.com>,
        <martin.petersen@...cle.com>
CC:     <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>
Subject: Re: [PATCH] scsi: libsas: Remove pcidev reference

On 12/11/2018 19:52, Joe Perches wrote:
> On Mon, 2018-11-12 at 19:31 +0000, John Garry wrote:
>> On 12/11/2018 18:58, Joe Perches wrote:
>>>>> +#define pr_fmt(fmt) "sas: " fmt
>>>>>
>>>>> Some other subsystem may try to include this header, and gets its
>>>>> message prefix overwritten. Just a consequence for doing something bad,
>>>>> right?
>>> Right.
>>>
>>> And as this file is internal to drivers/scsi/libsas
>>> that seems very unlikely to occur.
>>>
>>> It also might useful to use the common debugging
>>> mechanisms and convert SAS_DPRINTK to pr_debug
>>> which would use the same #define pr_fmt.
>>>
>>

We have almost 100 references to SAS_DPRINTK. So when we replace with 
pr_debug, we will frequently have to realign the indentation. I'm 
beginning to think it's not worth the churn to remove SAS_DPRINTK.

However, with regards to using pr_debug(), there are loops to jump 
through to ensure any output at all:
- ensure DEBUG is defined or DYNAMIC DEBUG enabled
- ensure current loglevel is high enough

Having said that, there are actually lots of logs in libsas where debug 
level is too low (at pr_debug), and these could be upgraded.

So I think I will just go through the code and revise these levels.

>> OK, I will try to put this all together as a marginally wider scope tidy-up.
>
> Thanks.
>
> Another thing that could be done is to change
> the #define pr_fmt(fmt) to KBUILD_MODNAME as
> that would prefix "libsas" instead of just "sas".
>

I think "sas" makes more sense, as this is the technology, as opposed to 
"libsas", which is just the software framework name.

> I think that would be better but I didn't do that
> as it should be in a separate patch.
>

Cheers,
John



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ