From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH v1 net-next 02/14] net: Add a new socket option for a future transmit time. Date: Wed, 27 Jun 2018 15:16:59 -0700 Message-ID: References: <20180627215950.6719-1-jesus.sanchez-palencia@intel.com> <20180627215950.6719-3-jesus.sanchez-palencia@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: tglx@linutronix.de, jan.altenberg@linutronix.de, vinicius.gomes@intel.com, kurt.kanzenbach@linutronix.de, henrik@austad.us, richardcochran@gmail.com, levi.pearson@harman.com, ilias.apalodimas@linaro.org, ivan.khoronzhuk@linaro.org, mlichvar@redhat.com, willemb@google.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, Richard Cochran To: Jesus Sanchez-Palencia , netdev@vger.kernel.org Return-path: Received: from mail-pg0-f67.google.com ([74.125.83.67]:46008 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965728AbeF0WRF (ORCPT ); Wed, 27 Jun 2018 18:17:05 -0400 Received: by mail-pg0-f67.google.com with SMTP id z1-v6so1512648pgv.12 for ; Wed, 27 Jun 2018 15:17:04 -0700 (PDT) In-Reply-To: <20180627215950.6719-3-jesus.sanchez-palencia@intel.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 06/27/2018 02:59 PM, Jesus Sanchez-Palencia wrote: > From: Richard Cochran > > 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. This means that your implementation of getsockopt(... SO_TXTIME ) is probably leaking two bytes of kernel stack to user space.