[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e559e87385254ad1a0fdc5f36bdde44a@AcuMS.aculab.com>
Date: Mon, 29 Apr 2019 13:19:34 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Willem de Bruijn' <willemdebruijn.kernel@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"ebiederm@...ssion.com" <ebiederm@...ssion.com>,
Willem de Bruijn <willemb@...gle.com>
Subject: RE: [PATCH net] packet: in recvmsg msg_name return at least
sockaddr_ll
> Can then also change memset to zero only two bytes in the Ethernet case.
>
> + if (msg->msg_namelen < sizeof(struct sockaddr_ll)) {
> + msg->msg_namelen = sizeof(struct sockaddr_ll);
> + memset(msg->msg_name + copy_len, 0,
> + msg->namelen - copy_len);
copy_len not defined ....
> + }
Except that has to be a real memset() not an inlined direct
write of an 8byte register (or 2 writes on a 32bit systems).
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists