From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miroslav Lichvar Subject: Re: [PATCH net 1/2] ptp: check that rsv field is zero in struct ptp_sys_offset_extended Date: Mon, 7 Jan 2019 17:57:41 +0100 Message-ID: <20190107165741.GD27782@localhost> References: <20181109101449.15398-4-mlichvar@redhat.com> <20190107152229.GA17925@asgard.redhat.com> <20190107.082938.1649593594398135118.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: esyr@redhat.com, netdev@vger.kernel.org, richardcochran@gmail.com, jacob.e.keller@intel.com, mtosatti@redhat.com To: David Miller Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32790 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbfAGQ5o (ORCPT ); Mon, 7 Jan 2019 11:57:44 -0500 Content-Disposition: inline In-Reply-To: <20190107.082938.1649593594398135118.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: 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. -- Miroslav Lichvar