Hi Eric,
On 06/27/2018 03:16 PM, Eric Dumazet wrote: > > > On 06/27/2018 02:59 PM, Jesus Sanchez-Palencia wrote: >> From: Richard Cochran <rcoch...@linutronix.de> >> >> This patch introduces SO_TXTIME. User space enables this option in >> order to pass a desired future transmit time in a CMSG when calling >> sendmsg(2). The argument to this socket option is a 6-bytes long struct >> defined as: >> >> struct sock_txtime { >> clockid_t clockid; >> u16 flags; >> }; > > Note that sizeof(struct sock_txtime) is 8, not 6, because of alignments. Oh yeah, sure. > > This means that your implementation of getsockopt(... SO_TXTIME ) > is probably leaking two bytes of kernel stack to user space. I'm failing to see how... There is a memset() in sock.c:1147 clearing all the 8 bytes that we later use to (explicitly) assign each member of the struct. Aren't the 2 extra bytes sanitized, then? What have I missed? Thanks, Jesus