Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751787AbeADAje (ORCPT + 1 other); Wed, 3 Jan 2018 19:39:34 -0500 Received: from mail-it0-f49.google.com ([209.85.214.49]:36941 "EHLO mail-it0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750945AbeADAjc (ORCPT ); Wed, 3 Jan 2018 19:39:32 -0500 X-Google-Smtp-Source: ACJfBov4cJvhrg0Q5X30ZfOv06eSKw5YV+bOLfPzwJZynLNtw39vMZ+zWlGA957tPZ3JWjm+hiUC4B6RGeAX5uiF82s= MIME-Version: 1.0 In-Reply-To: <151502463248.33513.5960736946233335087.stgit@dwillia2-desk3.amr.corp.intel.com> References: <20180103223827.39601-1-mark.rutland@arm.com> <151502463248.33513.5960736946233335087.stgit@dwillia2-desk3.amr.corp.intel.com> From: Linus Torvalds Date: Wed, 3 Jan 2018 16:39:31 -0800 X-Google-Sender-Auth: Wbnf0fUNPzThpiW2ahxtUQYkgvY Message-ID: Subject: Re: [RFC PATCH] asm/generic: introduce if_nospec and nospec_barrier To: Dan Williams Cc: Linux Kernel Mailing List , Mark Rutland , linux-arch@vger.kernel.org, Peter Zijlstra , Greg KH , Thomas Gleixner , Elena Reshetova , Alan Cox Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 3, 2018 at 4:15 PM, Dan Williams wrote: > The 'if_nospec' primitive marks locations where the kernel is disabling > speculative execution that could potentially access privileged data. It > is expected to be paired with a 'nospec_{ptr,load}' where the user > controlled value is actually consumed. I'm much less worried about these "nospec_load/if" macros, than I am about having a sane way to determine when they should be needed. Is there such a sane model right now, or are we talking "people will randomly add these based on strong feelings"? Linus