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: <CAHp75Ve8_obbSA-24RXd1p4W4NQg9VEBwGC4W9pYSwrY0RRCHg@mail.gmail.com>
Date:   Mon, 21 Nov 2022 15:24:06 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Martin Kurbanov <MMKurbanov@...rdevices.ru>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
        kernel <kernel@...rdevices.ru>, Pavel Machek <pavel@....cz>,
        Raphael Teysseyre <rteysseyre@...il.com>
Subject: Re: [PATCH v2 2/2] leds: trigger: pattern: notify usespace if pattern finished

On Mon, Nov 21, 2022 at 2:44 PM Martin Kurbanov
<MMKurbanov@...rdevices.ru> wrote:
> On 21.11.2022 15:38, Martin Kurbanov wrote:

> In the previous patch series feedback you mentioned two main problems:
> sysfs node creation time and life cycle, and sysfs node creation method.
> Let me explain why I didn't fix the above items.
>
> 1) About sysfs node creation time and its life cycle. In my opinion,
> sysfs node should exist only when user has activated pattern explicitly;
> otherwise, it will mislead potential user in the case when pattern is
> not activated, but sysfs node existed.

OK.

> 2) About pattern_trig_attrs. We need to use sysfs_notify_dirent()
> instead of sysfs_notify(), cause sysfs_notify() can sleep on the lock,
> but it's not acceptable for the pattern code in the timer context.
> Considering this, we have to create sysfs node in the
> pattern_trig_activate() directly and retrieve kernfs_node for required
> sysfs_notify_dirent() routine.

Is there a guarantee that nobody is using the removed node?
If no, what would be the problems with that if any?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ