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: <CAO-hwJLXAHvjYKxu8pyqMPCNgMrN-H8bGWudVqCaRFnWODHPVQ@mail.gmail.com>
Date:   Mon, 1 Mar 2021 15:27:22 +0100
From:   Benjamin Tissoires <benjamin.tissoires@...hat.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Ronald Tschalär <ronald@...ovation.ch>,
        Jiri Kosina <jikos@...nel.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-input <linux-input@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>
Subject: Re: [PATCH 3/5] HID: core: Export some report item parsing functions.

On Mon, Mar 1, 2021 at 3:18 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Sun, Feb 28, 2021 at 3:30 AM Ronald Tschalär <ronald@...ovation.ch> wrote:
> >
> > These are useful to drivers that need to scan or parse reports
> > themselves.
>
> ...
>
> > -       while ((start = fetch_item(start, end, &item)) != NULL)
> > +       while ((start = hid_fetch_item(start, end, &item)) != NULL)
> >                 dispatch_type[item.type](parser, &item);
>
> > -       while ((next = fetch_item(start, end, &item)) != NULL) {
> > +       while ((next = hid_fetch_item(start, end, &item)) != NULL) {
> >                 start = next;
>
> I don't see the full picture, but perhaps you may also introduce
> for_each_hid_item() or so.

Same here, I don't see the full picture, but I would suggest to not
export those functions at all.

>From 4/5, I can see that you are using them in
appleib_find_collection(), which is only called by
appleib_add_device(), which in turn is always called with a parsed and
started HID device. Why can you not rely on the core parsing and
iterate over the already parsed hid_field?

Cheers,
Benjamin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ