From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net 1/2] ptp: check that rsv field is zero in struct ptp_sys_offset_extended Date: Mon, 07 Jan 2019 09:13:34 -0800 (PST) Message-ID: <20190107.091334.2284395715402499091.davem@davemloft.net> References: <20190107152229.GA17925@asgard.redhat.com> <20190107.082938.1649593594398135118.davem@davemloft.net> <20190107165741.GD27782@localhost> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: esyr@redhat.com, netdev@vger.kernel.org, richardcochran@gmail.com, jacob.e.keller@intel.com, mtosatti@redhat.com To: mlichvar@redhat.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:58836 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbfAGRNf (ORCPT ); Mon, 7 Jan 2019 12:13:35 -0500 In-Reply-To: <20190107165741.GD27782@localhost> Sender: netdev-owner@vger.kernel.org List-ID: From: Miroslav Lichvar Date: Mon, 7 Jan 2019 17:57:41 +0100 > On Mon, Jan 07, 2019 at 08:29:38AM -0800, David Miller wrote: >> From: Eugene Syromiatnikov >> Date: Mon, 7 Jan 2019 16:22:29 +0100 >> >> > Otherwise it is impossible to use it for something else, as it will break >> > userspace that puts garbage there. >> > >> > The same check should be done in other structures, but the fact that >> > data in reserved fields is ignored is already part of the kernel ABI. >> > >> > Signed-off-by: Eugene Syromiatnikov >> >> I think the opportunity to enforce this has passed and you will break >> userspace by doing this. > > FWIW, this ioctl wasn't present in a stable Linux release yet and the > two applications that I know that support it both zero the rsv field, > so I think at least this patch is very unlikely to break anything. > > Anyway, thanks to Eugene for catching the issues. Oh, this ioctl went into this merge window didn't it. Ok. I'll keep reviewing this then.