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  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:   Sun, 2 Aug 2020 17:32:42 +0800
From:   Kent Gibson <warthog618@...il.com>
To:     Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v2 05/18] gpiolib: cdev: support GPIO_GET_LINE_IOCTL and
 GPIOLINE_GET_VALUES_IOCTL

On Sun, Aug 02, 2020 at 11:31:58AM +0800, Kent Gibson wrote:
> On Fri, Jul 31, 2020 at 06:05:10PM +0200, Bartosz Golaszewski wrote:
> > On Sun, Jul 26, 2020 at 3:12 AM Kent Gibson <warthog618@...il.com> wrote:
> > >
> > 
> > > >
> > > > > +               dev_dbg(&gdev->dev, "registered chardev handle for line %d\n",
> > > > > +                       offset);
> > > >
> > > > Perhaps tracepoint / event?
> > > >
> > >
> > > Again, a cut-and-paste from V1, and I have no experience with
> > > tracepoints or events, so I have no opinion on that.
> > >
> > > So, yeah - perhaps?
> > >
> > 
> > I think it's a good idea to add some proper instrumentation this time
> > other than much less reliable logs. Can you take a look at
> > include/trace/events/gpio.h? Adding new GPIO trace events should be
> > pretty straightforward by copy-pasti... drawing inspiration from
> > existing ones.
> > 
> 
> You only want tracepoints to replace those dev_dbg()s, so when a line
> is requested? What about the release?  Any other points?
> 

Had a closer look and it seems to me that the correct place to add such
tracepoints would be gpiod_request() and gpiod_free(), so they catch all
requests, not just the cdev ones.  And that moves it outside the scope
of this patch.

I personally don't have any use for the dev_dbg()s here and am happy to
remove them - they were only there to match the behaviour of
linehandle_create as closely as possible.

Cheers,
Kent.

Powered by blists - more mailing lists