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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Jun 2015 10:58:07 +0200
From:	Bjørn Mork <bjorn@...k.no>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Aleksander Morgado <aleksander@...ksander.es>,
	Dan Williams <dcbw@...hat.com>,
	Oliver Neukum <oliver@...kum.org>,
	Ben Hutchings <ben.hutchings@...ethink.co.uk>,
	USB list <linux-usb@...r.kernel.org>,
	Network Development <netdev@...r.kernel.org>,
	xiaomao <xiaomao0213@...mail.com>
Subject: Re: Fwd: [PATCH] net:usb:cdc_ncm: fix that tag Huawei devices as wwan

Linus Torvalds <torvalds@...ux-foundation.org> writes:

> Hmm. Oliver is marked as the maintainer of the USB CDC code, but
> others have touched it more recently. So I'm just wildly adding people
> to the cc to comment on this patch and maybe apply it.
> Oliver/David/Ben/Bjørn?

Adding Aleksander and Dan, too.  The 'wwanX' vs 'usbX' distinction is a
hint for userspace and nothing more. We try our best to make this hint
as precise as possible, but there has never been any guarantee that it
is 100% correct.  So userspace will have to deal with hints being wrong.
This has been discussed before:
http://lists.freedesktop.org/archives/modemmanager-devel/2014-April/001068.html

What makes the Huawei NCM devices special is that the same ID is reused
for both types of devices, making it impossible to achieve perfect
hinting by adding exceptions to the generic rule.  We can choose between
wrong towards 'wwanX' or wrong towards 'usbX'.  But the hint WILL be
wrong in some cases no matter what we do.

The 12d1:1506 device ID is a perfect example.  Here's a report of a
Huawei E5776 which should be used as a plain 'usbX' NCM device:
http://lists.freedesktop.org/archives/modemmanager-devel/2014-April/001040.html
And here's a report of a Huawei E3276 which needs wwan management and
therefore should be hinted as a 'wwanX' NCM device:
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=764920

So which of the two wrongs should we choose?

Huawei wanting this changed is a strong argument for the 'usbX'
direction, of course.  But this will be a user visible change which is
likely to break currently working devices until userspace adapts.  And
that will normally trump almost any other argument.  I don't think we
can change this now.  I sincerely apologise about having added the
generic rule in the first place, but I don't see how I can go back and
change that.

I believe we have to follow the path of least surprise: Keeping what we
have.

But we should definitely work with userspace to ensure that a wrongly
flagged 'wwanX' device is usable without any wwan management.
Preferably without the user really noticing anything different (except
possibly the device name).



Bjørn

> ---------- Forwarded message ----------
> From: xiaomao <xiaomao0213@...mail.com>
> Date: Sun, Jun 14, 2015 at 1:18 PM
> Subject: [PATCH] net:usb:cdc_ncm: fix that tag Huawei devices as wwan
>
>
> Form: Qianni Mamaqianni@...wei.com
>
> Huawei devices is the gereric CDC_NCM devices, but not is WWAN
> devices. In the patch, we deleted the code about tagging Huawei
> devices as WWAN.
> ---
>
> Signed-off-by:Qianni Mamaqianni@...wei.com
>
> --- linux-3.19/drivers/net/usb/cdc_ncm.c.orig	2015-06-15 01:29:52.354238079 +0800
> +++ linux-3.19/drivers/net/usb/cdc_ncm.c	2015-06-15 01:31:04.074236246 +0800
> @@ -1573,12 +1573,12 @@ static const struct usb_device_id cdc_de
>  	},
>  
>  	/* tag Huawei devices as wwan */
> -	{ USB_VENDOR_AND_INTERFACE_INFO(0x12d1,
> +	/*{ USB_VENDOR_AND_INTERFACE_INFO(0x12d1,
>  					USB_CLASS_COMM,
>  					USB_CDC_SUBCLASS_NCM,
>  					USB_CDC_PROTO_NONE),
>  	  .driver_info = (unsigned long)&wwan_info,
> -	},
> +	},*/
>  
>  	/* Infineon(now Intel) HSPA Modem platform */
>  	{ USB_DEVICE_AND_INTERFACE_INFO(0x1519, 0x0443,
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ