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:	Mon, 15 Jun 2015 12:22:27 +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,

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

we introduced DEVTYPE in uevent a long time ago. That is what userspace should be using and not second guessing on interface names.

Why is userspace trying to hack around the kernel anyway. 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.

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