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:	Mon, 15 Jun 2015 13:25:35 +0200
From:	Marcel Holtmann <marcel@...tmann.org>
To:	Bjørn Mork <bjorn@...k.no>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	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: [PATCH] net:usb:cdc_ncm: fix that tag Huawei devices as wwan

Hi Bjorn,

>> we introduced DEVTYPE in uevent a long time ago. That is what
>> userspace should be using and not second guessing on interface names.
> 
> Yes, sorry for confusing this by mentioning the device name.  This is
> really about DEVTYPE.
> 
> usbnet minidrivers use FLAG_WWAN to set both the 'wwanX' device name and
> DEVTYPE=wwan. The question here is whether or not to set that flag for
> Huawei NCM devices.  We can discuss that in the DEVTYPE context if you
> prefer.
> 
>> Why is userspace trying to hack around the kernel anyway.
> 
> Because you can never expect DEVTYPE to be 100% correct. There isn't a
> one-to-one relationship between USB classes and DEVTYPE. So we use a
> default DEVTYPE and exception lists in class drivers like cdc_ether and
> cdc_ncm.  These exception lists will always be incomplete, like any such
> whitelist/blacklist.
> 
> I believe we have discussed this before, and my opinion on DEVTYPE is
> still that it is a best effort thing which we would have been better off
> without.  But it's too late to do anything about that.  Userspace has to
> deal with it.  The kernel provides a hint.  The hint cannot be trusted.

if this is a 2G/3G/LTE or whatever card providing broadband networking then this is DEVTYPE=wwan. It makes no difference if this is NCM or not. It is important to know what this network interface connects to.

>> This never
>> really goes well unless the kernel exposes clear information to
>> identify devices. If there are some weird devices, then work this out
>> in the kernel and have DEVTYPE identity them correctly.
> 
> How?  These devices share device IDs. We do not touch their management
> interfaces from the kernel.  We depend on being able to classify device
> types based on USB descriptors. How can we identify which device is wwan
> and which is not if the descriptors are identical down to the device ID?

What is Huawei building besides broadband cards? Are they in the business of WiFi or Ethernet now?

> It is tempting to say that Huawei knows best for their own devices, if
> you all find the change acceptable.  I most certainly don't know better
> than they do. I would have loved to travel back in time and never submit
> that patch...

I mean if this is about distinguishing their phones from their data cards, then surely the other USB descriptors are different so that the driver can quirk this correctly.

Regards

Marcel

--
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