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]
Date:	Sun, 14 Feb 2016 18:57:34 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Kan Liang <kan.liang@...el.com>, netdev@...r.kernel.org,
	davem@...emloft.net, bwh@...nel.org
Cc:	andi@...stfloor.org, jesse.brandeburg@...el.com,
	shannon.nelson@...el.com, f.fainelli@...il.com,
	alexander.duyck@...il.com, jeffrey.t.kirsher@...el.com,
	carolyn.wyborny@...el.com, donald.c.skidmore@...el.com,
	mitch.a.williams@...el.com, ogerlitz@...lanox.com,
	edumazet@...gle.com, jiri@...lanox.com, sfeldma@...il.com,
	gospo@...ulusnetworks.com, sasha.levin@...cle.com,
	dsahern@...il.com, tj@...nel.org, cascardo@...hat.com,
	corbet@....net, decot@...glers.com
Subject: Re: [PATCH V4 6/8] i40e: queue-specific settings for interrupt
 moderation

On Mon, 2016-02-08 at 02:45 -0500, Kan Liang wrote:
[...]
> --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> @@ -1849,23 +1849,37 @@ static int i40e_set_phys_id(struct net_device *netdev,
>   * 125us (8000 interrupts per second) == ITR(62)
>   */
>  
> -static int i40e_get_coalesce(struct net_device *netdev,
> -			     struct ethtool_coalesce *ec)
> +static int __i40e_get_coalesce(struct net_device *netdev,
> +			       struct ethtool_coalesce *ec,
> +			       int queue)
>  {
>  	struct i40e_netdev_priv *np = netdev_priv(netdev);
>  	struct i40e_vsi *vsi = np->vsi;
> +	struct i40e_pf *pf = vsi->back;
>  
>  	ec->tx_max_coalesced_frames_irq = vsi->work_limit;
>  	ec->rx_max_coalesced_frames_irq = vsi->work_limit;
>  
> -	if (ITR_IS_DYNAMIC(vsi->rx_itr_setting))
> +	/* rx and tx usecs has per queue value. If user doesn't specify the queue,
> +	 * return queue 0's value to represent.
> +	 */
> +	if (queue < 0) {
> +		queue = 0;
> +	} else if (queue >= vsi->num_queue_pairs) {
> +		netif_info(pf, drv, netdev, "Invalid queue value, queue range is 0 - %d\n",
> +			   vsi->num_queue_pairs - 1);
[...]

Don't log this error message; it allows an unprivileged user to spam
the system log.

Ben.

-- 
Ben Hutchings
Sturgeon's Law: Ninety percent of everything is crap.
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ