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]
Message-ID: <87a8w1kz3a.fsf@nemi.mork.no>
Date:	Mon, 15 Jun 2015 13:09:13 +0200
From:	Bjørn Mork <bjorn@...k.no>
To:	Marcel Holtmann <marcel@...tmann.org>
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

Marcel Holtmann <marcel@...tmann.org> writes:

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

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

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


Bjørn
--
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