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  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]
Date:	Thu, 12 May 2016 11:51:11 -0400 (EDT)
From:	David Miller <>
Subject: Re: [patch net-next 2/4] rtnetlink: add HW/SW stats distinction in

From: Jiri Pirko <>
Date: Thu, 12 May 2016 13:48:48 +0200

>  	sp = nla_data(attr);
>  	dev_get_stats(dev, sp);
> +	err = dev_get_sw_stats(dev, &sw_stats);
> +	if (!err) {
> +		attr = nla_reserve_64bit(skb, IFLA_SW_STATS64,
> +					 sizeof(struct rtnl_link_stats64),
> +					 IFLA_PAD);
> +
> +		if (!attr)
> +			return -EMSGSIZE;
> +
> +		copy_rtnl_link_stats64(nla_data(attr), &sw_stats);
> +	}

Jiri, the whole point of the 64-bit padding stuff is so that we don't
need to copy the stats twice, once onto an on-stack copy and then
again to the attribute.

The way this sw stats stuff is designed you can't do it right.  It is
absolutely essential that the nla_reserve_64bits() call occur first,
and then you pass nla_data(attr) directly into the sw stats NDO operation.

Please rearrange this whole mechanism so that you can pass the NLA
attribute pointer down into the driver rather than doing all of these


Powered by blists - more mailing lists