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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a8af665d-8248-4315-fe03-0ac91a1f4230@sberdevices.ru>
Date:   Thu, 25 Aug 2022 21:16:42 +0000
From:   Martin Kurbanov <MMKurbanov@...rdevices.ru>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     Pavel Machek <pavel@....cz>,
        Raphael Teysseyre <rteysseyre@...il.com>,
        Baolin Wang <baolin.wang@...aro.org>,
        Linux LED Subsystem <linux-leds@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        kernel <kernel@...rdevices.ru>
Subject: Re: [PATCH v1] leds: trigger: pattern: notify userpace if pattern
 finished

Hi. Thank you for quick reply.

On 2022-08-24 18:51, Andy Shevchenko wrote:
...
>> +static void pattern_trig_remove_pattern_ended(struct led_classdev *led_cdev)
>> +{
>> +       struct pattern_trig_data *data = led_get_trigger_data(led_cdev);
>> +
>> +       sysfs_put(data->pattern_ended);
>> +       device_remove_file(led_cdev->dev, &dev_attr_pattern_ended);
>> +}
> 
> I'm wondering if you can always have a file and instead provide a
> value there, so user space may use epoll() mechanism on that. It will
> simplify your code here.
> 
Do you mean to add 'dev_attr_pattern_ended' to 'pattern_trig_attrs',
and use 'sysfs_notify' instead of 'sysfs_notify_dirent' call'?

-- 
Best Regards,
Kurbanov Martin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ