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]
Date:   Tue, 2 Feb 2021 18:34:48 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Tony Nguyen <anthony.l.nguyen@...el.com>
Cc:     davem@...emloft.net, Eryk Rybak <eryk.roch.rybak@...el.com>,
        netdev@...r.kernel.org, sassmann@...hat.com, bjorn.topel@...el.com,
        maciej.fijalkowski@...el.com, magnus.karlsson@...el.com,
        Aleksandr Loktionov <aleksandr.loktionov@...el.com>,
        Kiran Bhandare <kiranx.bhandare@...el.com>
Subject: Re: [PATCH net-next 6/6] i40e: Log error for oversized MTU on
 device

On Mon,  1 Feb 2021 18:24:20 -0800 Tony Nguyen wrote:
> From: Eryk Rybak <eryk.roch.rybak@...el.com>
> 
> When attempting to link XDP prog with MTU larger than supported,
> user is not informed why XDP linking fails. Adding proper
> error message: "MTU too large to enable XDP".
> Due to the lack of support for non-static variables in netlinks
> extended ACK feature, additional information has been added to dmesg
> to better inform about invalid MTU setting.
> 
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> Signed-off-by: Eryk Rybak <eryk.roch.rybak@...el.com>
> Tested-by: Kiran Bhandare <kiranx.bhandare@...el.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>

> @@ -12459,8 +12460,13 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi,
>  	int i;
>  
>  	/* Don't allow frames that span over multiple buffers */
> -	if (frame_size > vsi->rx_buf_len)
> +	if (frame_size > vsi->rx_buf_len) {
> +		NL_SET_ERR_MSG_MOD(extack, "MTU too large to enable XDP");
> +		dev_info(&pf->pdev->dev,
> +			 "MTU of %u bytes is too large to enable XDP (maximum: %u bytes)\n",
> +			 vsi->netdev->mtu, vsi->rx_buf_len);

Extack should be enough.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ