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]
Message-ID: <ee90e43b-eee5-34d6-598c-27ffaf593dc3@det.uvigo.gal>
Date:   Wed, 4 Jul 2018 16:41:02 +0200
From:   Miguel Rodríguez Pérez <miguel@....uvigo.gal>
To:     oliver@...kum.org, linux-usb@...r.kernel.org,
        netdev@...r.kernel.org, gregkh@...uxfoundation.org
Subject: Re: [PATCH v4 3/4] Add .ndo_set_rx_mode to cdc_ncm_netdev_ops

This is another alternative, but it would require exporting
usbnet_set_rx_mode. The main drawback of this approach is that it would
need to make use that net_device_ops copy in cdc_ncm remains updated,
should usbnet.c version change.
On the other hand, the structure can be kept const.

Which alternative do you think is best?

On 04/07/18 16:32, Miguel Rodríguez Pérez wrote:
> The cdc_ncm driver overrides the net_device_ops structure used by usbnet
> to be able to hook into .ndo_change_mtu. However, the structure was
> missing the .ndo_set_rx_mode field, preventing the driver from
> hooking into usbnet's set_rx_mode. This patch adds the missing callback to
> usbnet_set_rx_mode in net_device_ops.
> 
> Signed-off-by: Miguel Rodríguez Pérez <miguel@....uvigo.gal>
> ---
>  drivers/net/usb/cdc_ncm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
> index 9e1b74590682..342bf9bb91b5 100644
> --- a/drivers/net/usb/cdc_ncm.c
> +++ b/drivers/net/usb/cdc_ncm.c
> @@ -755,6 +755,7 @@ static const struct net_device_ops cdc_ncm_netdev_ops = {
>  	.ndo_stop	     = usbnet_stop,
>  	.ndo_start_xmit	     = usbnet_start_xmit,
>  	.ndo_tx_timeout	     = usbnet_tx_timeout,
> +	.ndo_set_rx_mode     = usbnet_set_rx_mode,
>  	.ndo_get_stats64     = usbnet_get_stats64,
>  	.ndo_change_mtu	     = cdc_ncm_change_mtu,
>  	.ndo_set_mac_address = eth_mac_addr,
> 

-- 
Miguel Rodríguez Pérez
Laboratorio de Redes
EE Telecomunicación – Universidade de Vigo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ