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: <4a960952-1283-275d-f2f9-1311c9468813@cogentembedded.com>
Date:   Fri, 16 Feb 2018 22:43:56 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Florian Fainelli <f.fainelli@...il.com>,
        Niklas Söderlund 
        <niklas.soderlund+renesas@...natech.se>,
        "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Cc:     linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH v2] ravb: add support for changing MTU

Hello!

On 02/16/2018 10:42 PM, Florian Fainelli wrote:

>> Allow for changing the MTU within the limit of the maximum size of a
>> descriptor (2048 bytes). Add the callback to change MTU from user-space
>> and take the configurable MTU into account when configuring the
>> hardware.
>>
>> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
>> ---
> 
>>  
>> +static int ravb_change_mtu(struct net_device *ndev, int new_mtu)
>> +{
>> +	if (netif_running(ndev))
>> +		return -EBUSY;
>> +
>> +	ndev->mtu = new_mtu;
>> +	netdev_update_features(ndev);
> 
> Don't you somehow need to quiesce the RX DMA and make sure you that you
> re-allocate all RX buffers within priv->rx_skb[q][entry] such that they
> will be able to accept a larger buffer size?
> 
> If we put the ravb interface under high RX load and we change the MTU on
> the fly, can we crash the kernel?

   I thought the netif_running() check guards against that. Does it not?
 
MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ