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]
Message-ID: <loom.20160602T023221-736@post.gmane.org>
Date:	Thu, 2 Jun 2016 01:47:48 +0000 (UTC)
From:	Grant Grundler <grundler@...omium.org>
To:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] r8152: modify rtl_ops_init

Hayes Wang <hayeswang <at> realtek.com> writes:
> Replace using VID/PID with using tp->version to initialize the ops.

Hayes,
This patch breaks new HW with existing drivers. more below.

> 
> Signed-off-by: Hayes Wang <hayeswang <at> realtek.com>
> ---
>  drivers/net/usb/r8152.c | 79 ++++++++++++++++++--------------------------
-----
>  1 file changed, 28 insertions(+), 51 deletions(-)
> 
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 4b6db8a..cf1b8a7 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
>  <at>  <at>  -3742,66 +3742,43  <at>  <at>  static void 
rtl8153_unload(struct r8152 *tp)
>  	r8153_power_cut_en(tp, false);
>  }
> 
> -static int rtl_ops_init(struct r8152 *tp, const struct usb_device_id *id)
> +static int rtl_ops_init(struct r8152 *tp)
>  {
>  	struct rtl_ops *ops = &tp->rtl_ops;
> -	int ret = -ENODEV;
> -
> -	switch (id->idVendor) {
> -	case VENDOR_ID_REALTEK:
> -		switch (id->idProduct) {
...
>  	default:
> +		ret = -ENODEV;
> +		netif_err(tp, probe, tp->netdev, "Unknown Device\n");

This hunk causes r8152 driver to refuse to bind to a device that was working 
(AFAICT) before this change.  This means every new version of the HW 
requires a driver update for every kernel in every distribution that 
incorporates this patch.

I've tried to "align" chromeos-3.18 branch with kernel.org r8152 driver:

I'm getting this output in dmesg:
r8152 2-1:1.0 (unnamed net_device) (uninitialized): Unknown version 0x6010
r8152 2-1:1.0 (unnamed net_device) (uninitialized): Unknown Device

Could you take a look at the hack I've uploaded for chromeos-3.18 kernel:
    https://chromium-review.googlesource.com/348951

cheers,
grant



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ