Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbeADEof (ORCPT + 1 other); Wed, 3 Jan 2018 23:44:35 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:50428 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813AbeADEod (ORCPT ); Wed, 3 Jan 2018 23:44:33 -0500 Date: Thu, 4 Jan 2018 04:44:24 +0000 From: Al Viro To: "Williams, Dan J" Cc: "torvalds@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "peterz@infradead.org" , "tglx@linutronix.de" , "alan@linux.intel.com" , "Reshetova, Elena" , "mark.rutland@arm.com" , "gnomes@lxorguk.ukuu.org.uk" , "gregkh@linuxfoundation.org" , "jikos@kernel.org" , "linux-arch@vger.kernel.org" Subject: Re: [RFC PATCH] asm/generic: introduce if_nospec and nospec_barrier Message-ID: <20180104044424.GC21978@ZenIV.linux.org.uk> References: <20180103223827.39601-1-mark.rutland@arm.com> <151502463248.33513.5960736946233335087.stgit@dwillia2-desk3.amr.corp.intel.com> <20180104010754.22ca6a74@alans-desktop> <1515035438.20588.4.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515035438.20588.4.camel@intel.com> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 03:10:51AM +0000, Williams, Dan J wrote: > diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h > index 1c65817673db..dbc12007da51 100644 > --- a/include/linux/fdtable.h > +++ b/include/linux/fdtable.h > @@ -82,8 +82,10 @@ static inline struct file *__fcheck_files(struct files_struct *files, unsigned i > { > struct fdtable *fdt = rcu_dereference_raw(files->fdt); > > - if (fd < fdt->max_fds) > + if (fd < fdt->max_fds) { > + osb(); > return rcu_dereference_raw(fdt->fd[fd]); > + } > return NULL; > } ... and the point of that would be? Possibly revealing the value of files->fdt? Why would that be a threat, assuming you manage to extract the information in question in the first place?