Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756177AbeAIWXz (ORCPT + 1 other); Tue, 9 Jan 2018 17:23:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41844 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755966AbeAIWXw (ORCPT ); Tue, 9 Jan 2018 17:23:52 -0500 Date: Tue, 9 Jan 2018 16:23:48 -0600 From: Josh Poimboeuf To: Dan Williams Cc: Linus Torvalds , Linux Kernel Mailing List , linux-arch@vger.kernel.org, Andi Kleen , Arnd Bergmann , Greg Kroah-Hartman , Peter Zijlstra , Network Development , the arch/x86 maintainers , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Alan Cox Subject: Re: [PATCH 06/18] x86, barrier: stop speculation for failed access_ok Message-ID: <20180109222348.twmw62qwfhefqpoe@treble> References: <151520099201.32271.4677179499894422956.stgit@dwillia2-desk3.amr.corp.intel.com> <151520102670.32271.8447983009852138826.stgit@dwillia2-desk3.amr.corp.intel.com> <20180109214149.yo3tnjesezgz63x4@treble> <20180109214902.2d4ptkld2bof3js7@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 09 Jan 2018 22:23:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 09, 2018 at 01:59:04PM -0800, Dan Williams wrote: > > Right, but what's the purpose of preventing speculation past > > access_ok()? > > Caution. It's the same rationale for the nospec_array_ptr() patches. > If we, kernel community, can identify any possible speculation past a > bounds check we should inject a speculation mitigation. Unless there's > a way to be 100% certain that the first unwanted speculation can be > turned into a gadget later on in the instruction stream, err on the > side of shutting it down early. I'm all for being cautious. The nospec_array_ptr() patches are fine, and they make sense in light of the variant 1 CVE. But that still doesn't answer my question. I haven't seen *any* rationale for this patch. It would be helpful to at least describe what's being protected against, even if it's hypothetical. How can we review it if the commit log doesn't describe its purpose? -- Josh