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: <1e7e1d4039724eb4bcdd5884a748d880@realtek.com>
Date:   Mon, 24 May 2021 08:54:50 +0000
From:   Hayes Wang <hayeswang@...ltek.com>
To:     Johan Hovold <johan@...nel.org>
CC:     "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        nic_swsd <nic_swsd@...ltek.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "syzbot+95afd23673f5dd295c57@...kaller.appspotmail.com" 
        <syzbot+95afd23673f5dd295c57@...kaller.appspotmail.com>
Subject: RE: [PATCH net v3] r8152: check the informaton of the device

Johan Hovold <johan@...nel.org>
> Sent: Monday, May 24, 2021 4:01 PM
[...]
> >  	/* The vendor mode is not always config #1, so to find it out. */
> >  	udev = interface_to_usbdev(intf);
> >  	c = udev->config;
> >  	num_configs = udev->descriptor.bNumConfigurations;
> > +	if (num_configs < 2)
> > +		return false;
> > +
> 
> Nit: This check looks unnecessary also as the driver can handle a single
> configuration just fine, and by removing it you'd be logging "Unexpected
> Device\n" below also in the single config case.

I just want to distinguish the devices.
It is acceptable if the device contains only one configuration.
A mistake occurs if the device has more configurations and
there is no expected one.
I would remove it if you think it is better.

Best Regards,
Hayes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ