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, 2 Nov 2023 21:03: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, 2 Nov 2023 at 20:31, Mark Brown <broonie@...nel.org> wrote:
>
> On Thu, Nov 02, 2023 at 08:17:35PM +0530, Naresh Solanki wrote:
> > On Thu, 2 Nov 2023 at 18:36, Mark Brown <broonie@...nel.org> wrote:
> > > On Thu, Nov 02, 2023 at 05:35:42PM +0530, Naresh Solanki wrote:
>
> > > > > We probably should filter the events more, there's events for pre and
> > > > > post voltage change for example which aren't status changes so would be
> > > > > spurious.  It ought not to break anything but we should still avoid
> > > > > unneeded work.
>
> > > > Can you please provide me inputs on the additional filtering needed for this.
> > > > Like some list of events for notify on status?
>
> > > I think I'd start off with just reporting things that are obviously
> > > errors and not things that should ever go off during normal operation.
>
> > This is what I could come up with:
> >         if (event & REGULATOR_EVENT_VOLTAGE_CHANGE) {
> >                 name = dev_attr_microvolts.attr.name;
> >                 sysfs_notify(&rdev->dev.kobj, NULL, name);
> >         } else if (event & (REGULATOR_EVENT_DISABLE | REGULATOR_EVENT_ENABLE)){
> >                 name = dev_attr_status.attr.name;
> >                 sysfs_notify(&rdev->dev.kobj, NULL, name);
> >         }
>
> That's the opposite sense to what I was thinking of - we're reporting
> voltage changes and enables to userspace rather than just errors.  My
> concern here is that this could generate an awful lot of notificaitons
> for normal operation on systems that don't use the uevents, I was
> expecting this to be used for errors.  Could you remind me what the use
> case is here, I think I might've got myself confused sorry?
Sorry for confusion caused because I should first described my application
requirements.
Currently my application is interested in know regulator status i.e.,
ENABLE, DISABLE or ERROR.
Also events are needed specifically to get them logged like
UNDER_VOLTAGE, OVER_CURRENT, REGULATION_OUT,
OVER_TEMP.


Regards,
Naresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ