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:   Fri, 02 Jul 2021 09:32:28 +0200
From:   Bjørn Mork <bjorn@...k.no>
To:     Stefan Brüns <stefan.bruens@...h-aachen.de>
Cc:     Johan Hovold <johan@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Daniele Palmas <dnlplm@...il.com>
Subject: Re: [PATCH v2] USB: serial: qcserial: Support for SDX55 based
 Sierra Wireless 5G modules

Stefan Brüns <stefan.bruens@...h-aachen.de> writes:

> On Donnerstag, 24. Juni 2021 13:15:07 CEST Bjørn Mork wrote:
>> Johan Hovold <johan@...nel.org> writes:
>> > Could you please also post the output of usb-devices (or lsusb -v) for
>> > this device in MBIM mode?
>> 
>> Yes, this would be nice to have.
>
> See below.
>  
>> I suspect that this device is like other SDX55 devices we've seen, using
>> class/subclass/function to map the vendor specific functions
>> too. Dropping static interface numbers.  If correct, then the patch is
>> bogus and the interface numbers might change based on firmware version
>> and configuration.
>
> Do you really expect Sierra do to something sensible? According to their 
> documentation functions are matched by interface numbers.

Well... I expect them to be as sensible as any other vendor.  And I
expect docs to be intendend as guidance only ;-)

> They still use broken interface descriptors with holes in interface numbering 
> (i.e. interface number 2 does not exist, which violates the USB standard).

Right. Wrt the violation, I think that train left a decade ago.  

>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        3
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      0 
>       bInterfaceProtocol      0 
[..]
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        4
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass    255 Vendor Specific Subclass
>       bInterfaceProtocol     48 


So Sierra do follow the same pattern we've seen on other X55 devices:

ff/00/00 - AT
ff/ff/30 - QCDM

See commits

 accf227de4d2 ("USB: serial: option: Add support for Quectel RM500Q")
 d6c1ddd938d8 ("USB: serial: option: add Quectel EM160R-GL")

for other examples.

This obviously doesn't make any difference if your configuration is the
only one.  But I believe that is unlikely.  There are probably ways the
layout can be changed, even if currenly not documented.  The advantage
of class/subclass/protocol matching to function is that it works
regardless of the number of functions and their interface number.


Bjørn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ