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] [day] [month] [year] [list]
Date:   Fri, 22 Feb 2019 17:00:40 -0800
From:   Brian Norris <briannorris@...omium.org>
To:     Joe Perches <joe@...ches.com>
Cc:     Andy Whitcroft <apw@...onical.com>,
        Linux Kernel <linux-kernel@...r.kernel.org>,
        devicetree@...r.kernel.org
Subject: Re: [PATCH] checkpatch: don't complain about "undocumented" USB VID

On Fri, Feb 22, 2019 at 4:52 PM Joe Perches <joe@...ches.com> wrote:
>
> On Fri, 2019-02-22 at 14:55 -0800, Brian Norris wrote:
> > Documentation/devicetree/bindings/usb/usb-device.txt describes the
> > 'usbVID,...' compatible format, where VID is hexadecimal, with leading
> > zeroes suppressed. Allow it here without complaining.
> []
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > @@ -3012,6 +3012,8 @@ sub process {
> >                               }
> >
> >                               next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
> > +                             # USB VIDs don't need special vendor prefix documentation.
> > +                             next if $compat =~ /^usb[1-9a-f][0-9a-f]{0,3},/;
>
> Maybe check the PID too?
>
>                                 next if $compat =~ /^usb[1-9a-f][0-9a-f]{0,3},[1-9a-f][0-9a-f]{0,3}\b/;

Ah, good point. I shouldn't be allowing, e.g.,
"usb123,something-that's-not-a-PID".

> Maybe add a test for uses of the leading 0?

I suppose that'd be good too. Would help catch problems with the PID,
at least. (VID problems would fall into the "invalid vendor prefix"
check that's already present.)

Thanks,
Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ