Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3973768yba; Wed, 17 Apr 2019 01:42:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhpNR8xmoYK6peDCwnjin/wVTRe1OnN2W8JuhBxsiITeHr7vGFqIrOZq174dAH8LJEet3J X-Received: by 2002:a17:902:e01:: with SMTP id 1mr88437358plw.128.1555490565697; Wed, 17 Apr 2019 01:42:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555490565; cv=none; d=google.com; s=arc-20160816; b=KH1U+8EGI+c8ft4k+z5/lvjHc61H4ywXSbb9DWkXTGZwRQZm20Ld/mc4nvfxoMwIuX K1zygBHatyEHwL3avIvVPcBvnY0EkBQcOXbNp9uC7nwfiOQupFURn4h3ZORLAkJ+xTrT Xo0cThgow8WihvbKJ1fHohsrOzoKvOZYbR6nTSCkqHdisEtAx+hXShVWfKR/MGAGi16O x8pLQcHLTVj8xy+5bnNlrEhiRq5Q3TlGhnsGtR3GlIiTlx7CXPaFSo9wISd31IkXsjvs rf599LU5lSy2PQiocbdbnxlWIQy2nyEHbi4dVIMcqfC7fWFmU8icQjuLZDypKbLkzcYh tJXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=MjwWu6H2TmpUbnCXSSzSv5IVh0zCJqSGbvMsLerIpb0=; b=Ku8IG6NSGlSW1cQpU5KTrHRjx0Y7zdtnFo6vG/MafbF/fY/7NFWLWRynhEEjkDVLLu CpxP5xQefxPq0/lelEngUJSVxWIQWpSj39Gi8WvBN+wL1B5oZi8SCTSbN6BLLS7RR6Dk lcfxDPR3lDOCMWgkV0yeaNxQzfvXy/HTD0s/WIexvkG3qH+azECSm/iF+l/Fk9zIQKF+ gsz0ktisWGJTTcJvtJYllWvPR9MHBUx5v3zM6iDfHguDvmNEdTYREN21q/RTwKqUE4HI N/C004zAsq96eGd974UbJXVIu/HimQW0N1LQC/V9FF+2eGHcaoWKsVAoJC1TQtr9kPsM aJ2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9si50672699plo.49.2019.04.17.01.42.30; Wed, 17 Apr 2019 01:42:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729771AbfDQIlZ (ORCPT + 99 others); Wed, 17 Apr 2019 04:41:25 -0400 Received: from ozlabs.org ([203.11.71.1]:40889 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726895AbfDQIlZ (ORCPT ); Wed, 17 Apr 2019 04:41:25 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 44kbLV67Gvz9s4Y; Wed, 17 Apr 2019 18:41:22 +1000 (AEST) From: Michael Ellerman To: Diana Madalina Craciun , Greg Kroah-Hartman , "linux-kernel\@vger.kernel.org" Cc: "stable\@vger.kernel.org" , Sasha Levin Subject: Re: [PATCH 4.9 20/76] powerpc/64: Disable the speculation barrier from the command line In-Reply-To: References: <20190415183707.712011689@linuxfoundation.org> <20190415183712.869759410@linuxfoundation.org> Date: Wed, 17 Apr 2019 18:41:20 +1000 Message-ID: <87ef61uiq7.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Diana Madalina Craciun writes: > Hi, > > I have tested the patches on NXP platforms and they worked as expected. Thanks Diana. cheers > On 4/15/2019 9:45 PM, Greg Kroah-Hartman wrote: >> commit cf175dc315f90185128fb061dc05b6fbb211aa2f upstream. >> >> The speculation barrier can be disabled from the command line >> with the parameter: "nospectre_v1". >> >> Signed-off-by: Diana Craciun >> Signed-off-by: Michael Ellerman >> Signed-off-by: Sasha Levin >> --- >> arch/powerpc/kernel/security.c | 12 +++++++++++- >> 1 file changed, 11 insertions(+), 1 deletion(-) >> >> diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c >> index bf298d0c475f..813e38ff81ce 100644 >> --- a/arch/powerpc/kernel/security.c >> +++ b/arch/powerpc/kernel/security.c >> @@ -17,6 +17,7 @@ >> unsigned long powerpc_security_features __read_mostly = SEC_FTR_DEFAULT; >> >> bool barrier_nospec_enabled; >> +static bool no_nospec; >> >> static void enable_barrier_nospec(bool enable) >> { >> @@ -43,9 +44,18 @@ void setup_barrier_nospec(void) >> enable = security_ftr_enabled(SEC_FTR_FAVOUR_SECURITY) && >> security_ftr_enabled(SEC_FTR_BNDS_CHK_SPEC_BAR); >> >> - enable_barrier_nospec(enable); >> + if (!no_nospec) >> + enable_barrier_nospec(enable); >> } >> >> +static int __init handle_nospectre_v1(char *p) >> +{ >> + no_nospec = true; >> + >> + return 0; >> +} >> +early_param("nospectre_v1", handle_nospectre_v1); >> + >> #ifdef CONFIG_DEBUG_FS >> static int barrier_nospec_set(void *data, u64 val) >> { >> -- >> 2.19.1 >> >> >> >>