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: <dedb9926-d4fb-af1a-8dc8-2bc0680d971a@suse.de>
Date:   Thu, 8 Oct 2020 07:54:59 +0200
From:   Hannes Reinecke <hare@...e.de>
To:     tasleson@...hat.com,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Christoph Hellwig <hch@...radead.org>, linux-scsi@...r.kernel.org,
        linux-block@...r.kernel.org, linux-ide@...r.kernel.org,
        pmladek@...e.com, David Lehman <dlehman@...hat.com>,
        sergey.senozhatsky@...il.com, jbaron@...mai.com,
        James.Bottomley@...senPartnership.com,
        linux-kernel@...r.kernel.org, rafael@...nel.org,
        martin.petersen@...cle.com, kbusch@...nel.org, axboe@...com,
        sagi@...mberg.me, akpm@...ux-foundation.org, orson.zhai@...soc.com,
        viro@...iv.linux.org.uk
Subject: Re: [v5 01/12] struct device: Add function callback durable_name

On 10/7/20 10:10 PM, Tony Asleson wrote:
> On 10/1/20 6:48 AM, Greg Kroah-Hartman wrote:
>> On Wed, Sep 30, 2020 at 09:35:52AM -0500, Tony Asleson wrote:
>>> On 9/30/20 2:38 AM, Greg Kroah-Hartman wrote:
>>>> On Tue, Sep 29, 2020 at 05:04:32PM -0500, Tony Asleson wrote:
>>>>> I'm trying to figure out a way to positively identify which storage
>>>>> device an error belongs to over time.
>>>>
>>>> "over time" is not the kernel's responsibility.
>>>>
>>>> This comes up every 5 years or so. The kernel provides you, at runtime,
>>>> a mapping between a hardware device and a "logical" device.  It can
>>>> provide information to userspace about this mapping, but once that
>>>> device goes away, the kernel is free to reuse that logical device again.
>>>>
>>>> If you want to track what logical devices match up to what physical
>>>> device, then do it in userspace, by parsing the log files.
>>>
>>> I don't understand why people think it's acceptable to ask user space to
>>> parse text that is subject to change.
>>
>> What text is changing? The format of of the prefix of dev_*() is well
>> known and has been stable for 15+ years now, right?  What is difficult
>> in parsing it?
> 
> Many of the storage layer messages are using printk, not dev_printk.
> 
So that would be the immediate angle of attack ...

>>>>> Thank you for supplying some feedback and asking questions.  I've been
>>>>> asking for suggestions and would very much like to have a discussion on
>>>>> how this issue is best solved.  I'm not attached to what I've provided.
>>>>> I'm just trying to get towards a solution.
>>>>
>>>> Again, solve this in userspace, you have the information there at
>>>> runtime, why not use it?
>>>
>>> We usually don't have the needed information if you remove the
>>> expectation that user space should parse the human readable portion of
>>> the error message.
>>
>> I don't expect that userspace should have to parse any human readable
>> portion, if they don't want to.  But if you do want it to, it is pretty
>> trivial to parse what you have today:
>>
>> 	scsi 2:0:0:0: Direct-Access     Generic  STORAGE DEVICE   1531 PQ: 0 ANSI: 6
>>
>> If you really have a unique identifier, then great, parse it today:
>>
>> 	usb 4-1.3.1: Product: USB3.0 Card Reader
>> 	usb 4-1.3.1: Manufacturer: Generic
>> 	usb 4-1.3.1: SerialNumber: 000000001531
>>
>> What's keeping that from working now?
> 
> I believe these examples are using dev_printk.  With dev_printk we don't
> need to parse the text, we can use the meta data.
> So it looks as most of your usecase would be solved by moving to 
dev_printk().
Why not work on that instead?
I do presume this will have immediate benefits for everybody, and will 
have approval from everyone.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@...e.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ