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:   Thu, 20 Dec 2018 13:27:40 +0100
From:   Andrzej Hajda <a.hajda@...sung.com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        javierm@...hat.com,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Russell King - ARM Linux <linux@...linux.org.uk>
Subject: Re: [PATCH v4 2/3] driver core: add deferring probe reason to
 devices_deferred property

On 20.12.2018 12:04, Rafael J. Wysocki wrote:
> On Thu, Dec 20, 2018 at 11:23 AM Andrzej Hajda <a.hajda@...sung.com> wrote:
>> /sys/kernel/debug/devices_deferred property contains list of deferred devices.
>> This list does not contain reason why the driver deferred probe, the patch
>> improves it.
>> The natural place to set the reason is probe_err function introduced recently,
>> ie. if probe_err will be called with -EPROBE_DEFER instead of printk the message
>> will be attached to deferred device and printed when user read devices_deferred
>> property.
>>
>> Signed-off-by: Andrzej Hajda <a.hajda@...sung.com>
>> Reviewed-by: Mark Brown <broonie@...nel.org>
>> Reviewed-by: Javier Martinez Canillas <javierm@...hat.com>
>> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
>> ---
>> v4:
>>   - removed NULL check before kfree,
>>   - coding style tweaking.
>> v3:
>>   - adjusted deferred_devs_show, to accept newline ended messages,
>>   - changed conditonal check to positive,
>>   - added R-b by Andy.
>> v2:
>>   - changed __deferred_probe_set_msg args - like in __dev_printk, fits better,
>>   - use kasprintf instead of bunch of code,
>>   - keep consistent format of devices_deferred lines,
>>   - added R-Bs (again I hope changes above are not against it).
>> ---
>> ---
>>  drivers/base/base.h |  3 +++
>>  drivers/base/core.c |  9 +++++----
>>  drivers/base/dd.c   | 21 ++++++++++++++++++++-
>>  3 files changed, 28 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/base/base.h b/drivers/base/base.h
>> index 7a419a7a6235..effbd5e7f9f1 100644
>> --- a/drivers/base/base.h
>> +++ b/drivers/base/base.h
>> @@ -75,6 +75,7 @@ struct device_private {
>>         struct klist_node knode_driver;
>>         struct klist_node knode_bus;
>>         struct list_head deferred_probe;
>> +       char *deferred_probe_msg;
> Many drivers will never use this, so is the memory overhead justified?


I can try to move it somewhere else if it is a problem.

Putting it here seems quite natural - near deferred_probe field which
should have similar number of users.


Regards

Andrzej


>
>>         struct device *device;
>>  };
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ