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: <CABqG17gXKGSSqjxYKomJKnYAZ6Q3P7+OXMo3=HD=QySuaqU=4Q@mail.gmail.com>
Date:   Thu, 9 Nov 2023 20:51:40 +0530
From:   Naresh Solanki <naresh.solanki@...ements.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     zev@...ilderbeest.net, Liam Girdwood <lgirdwood@...il.com>,
        Patrick Rudolph <patrick.rudolph@...ements.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/regulator: Notify sysfs about status changes

Hi Mark,

On Thu, 9 Nov 2023 at 20:41, Naresh Solanki
<naresh.solanki@...ements.com> wrote:
>
> Hi Mark,
>
>
> On Thu, 9 Nov 2023 at 17:01, Mark Brown <broonie@...nel.org> wrote:
> >
> > On Thu, Nov 09, 2023 at 04:08:06PM +0530, Naresh Solanki wrote:
> > > On Thu, 2 Nov 2023 at 22:20, Mark Brown <broonie@...nel.org> wrote:
> >
> > > > Ah, right.  Everything except for the enable and disable there looks
> > > > like it should be OK since they should normally just not happen but the
> > > > enables and disables might get a bit frequent with runtime PM - not
> > > > *super* frequent like voltage scaling but enough that people could have
> > > > an issue with it.
> >
> > > I aim for a straightforward implementation.
> > > Using attributes such as status or state seems ideal for receiving
> > > notifications.
> > > In my case, the application focuses on status changes—whether it's on, off,
> > > or encountering an error.
> > > These changes are driven by events originating from the regulator.
> > > So below change is what I see fit well.
> > >
> > >         status_events = REGULATOR_EVENT_DISABLE;
> > >         status_events |= REGULATOR_EVENT_ENABLE;
> > >         status_events |= REGULATOR_EVENT_FAIL;
> > >         status_events |= REGULATOR_EVENT_FORCE_DISABLE;
> > >         status_events |= REGULATOR_EVENT_ABORT_DISABLE;
> >
> > In terms of the implementation for delivering uevents this looks fine,
> > my concern here is that for some systems the enable and disable events
> > might happen more often than is really a good fir for delivering via
> > uevents, if a device like say a SD card is getting powered up and down
> > via runtime PM that might happen relatively often and then the system
> > would get a lot of uevents which it would most likely end up ignoring.
> > That could have a noticable impact on power or performance.
>
> May be in that case should we consider adding a kernel parameter or
> some property in sysfs attribute to allow getting events ?
Or may be even Kconfig option ?
>
> Regards,
> Naresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ