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
| ||
|
Date: Mon, 18 Apr 2016 21:32:04 -0700 From: Eric Dumazet <eric.dumazet@...il.com> To: David Miller <davem@...emloft.net> Cc: roopa@...ulusnetworks.com, netdev@...r.kernel.org, jhs@...atatu.com, tgraf@...g.ch, nicolas.dichtel@...nd.com Subject: Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats On Mon, 2016-04-18 at 23:41 -0400, David Miller wrote: > > + /* Add a zero length NOP attribute so that the nla_data() > + * of the IFLA_STATS64 will be 64-bit aligned. > + */ > +#ifndef HAVE_EFFICIENT_UNALIGNED_ACCESS > + attr = nla_reserve(skb, IFLA_PAD, 0); > + if (!attr) > + return -EMSGSIZE; > +#endif You must do this only if current skb->data alignment is not correct. (IFLA_ALIAS for example could shift your expectations) Also you probably want to change if_nlmsg_size() to add + nla_total_size(0) /* IFLA_PAD */
Powered by blists - more mailing lists