From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Cochran Subject: Re: [PATCH net 1/2] ptp: check that rsv field is zero in struct ptp_sys_offset_extended Date: Mon, 7 Jan 2019 21:19:23 -0800 Message-ID: <20190108051923.2ozbytxqorxzpad5@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, mlichvar@redhat.com, netdev@vger.kernel.org, jacob.e.keller@intel.com, mtosatti@redhat.com To: David Miller Return-path: Received: from mail-pl1-f195.google.com ([209.85.214.195]:36776 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbfAHFT0 (ORCPT ); Tue, 8 Jan 2019 00:19:26 -0500 Received: by mail-pl1-f195.google.com with SMTP id g9so1294960plo.3 for ; Mon, 07 Jan 2019 21:19:26 -0800 (PST) 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. Does this seriously mean that the 'rsv' field in struct ptp_extts_request { unsigned int index; /* Which channel to configure. */ unsigned int flags; /* Bit field for PTP_xxx flags. */ unsigned int rsv[2]; /* Reserved for future use. */ }; can never be extended with some semantics? Thanks, Richard