Received: by 10.192.165.148 with SMTP id m20csp194967imm; Thu, 3 May 2018 17:59:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrlRrwk3B6n22qIqt1FoTDfuoVMgyysyPGz9s2Fm0HBVvVhu1gGK3ailqv8TBDPdYSwGqgo X-Received: by 10.98.79.12 with SMTP id d12mr24873811pfb.220.1525395548468; Thu, 03 May 2018 17:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525395548; cv=none; d=google.com; s=arc-20160816; b=ZDGXNrHJTEfQEi3UnWrtRuWkIUBd3EwyMfDyPUf5v4MRv3e2YVrclCEPUR1PsMfmyo 6gD/qjDTkDx3fE3za9PjGcmag7va9ZlDU1EBq3h5c+CRXOebHh0ShpmPFYJ+/NXudTgm Slo5fSsVwB9iDtn0LEsCDpBEPOkXPshrbO3VF9hxy4kuPT8yURgFBbFQBfFcx8qRd2uk TFrWDeVc6jK823FZDY6WPcZDw0qfcac6SA8WV/kaKSWJuLIUBwE5+CKeeOn6dNwLdg4T 2WB6EcrOCINArFVXzq/J0IyvFAkrZUg2gq6zEhWVwM7Ah+U0F9PNdzj8vIAjM2Qh3Avr UWng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=3Fz9IWlgd0XDswPpvkw/wSjjRF44Evde5exW7gDrcak=; b=EW2dYuJyJRon/ShGAWXQpfzIB81HHuMqNXHtxhzjVUOD91BtSbrGXhCt+KSS8WSawe s2FLJpVkjOHUQeC4wbASJ1F2Pcn5yQHkRxHOP1DFVBYyMng76vkkd0JiwiEZLS3fALtm 4kAoFwVHbnMUZm/JO3lo6egC7bAHjIZXEKv+8n0WQ9UDXr6iJH03klUYFqmXYg71gYqY ahtcBSe5ntlldNN2kkRZWO4BIah81sbIuZHMDcgfLDMgBnCcWGuqMjhRbEBao0gl1svw kgOhGbRn+vSxqp2tlQ1rvycTzdYowOipL4N0rPd+aUfI8vlU/pEVTgNqsm5BJu2KI/OI 3o9Q== 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 g89si6733694pfj.349.2018.05.03.17.58.54; Thu, 03 May 2018 17:59:08 -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 S1751278AbeEDA63 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 May 2018 20:58:29 -0400 Received: from ozlabs.org ([203.11.71.1]:56505 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751126AbeEDA62 (ORCPT ); Thu, 3 May 2018 20:58:28 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40cYXy6zlQz9s3D; Fri, 4 May 2018 10:58:26 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Michal =?utf-8?Q?Such=C3=A1nek?= Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, npiggin@gmail.com Subject: Re: [PATCH 4/6] powerpc/64s: Enable barrier_nospec based on firmware settings In-Reply-To: <20180502134128.4a31b0fc@kitsune.suse.cz> References: <20180424041559.32410-1-mpe@ellerman.id.au> <20180424041559.32410-4-mpe@ellerman.id.au> <20180426180258.04e6bee6@kitsune.suse.cz> <87vac7r5px.fsf@concordia.ellerman.id.au> <20180502134128.4a31b0fc@kitsune.suse.cz> Date: Fri, 04 May 2018 10:58:26 +1000 Message-ID: <87bmdw9qz1.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Suchánek writes: > On Tue, 01 May 2018 21:11:06 +1000 > Michael Ellerman wrote: >> Michal Suchánek writes: >> > On Tue, 24 Apr 2018 14:15:57 +1000 >> > Michael Ellerman wrote: >> > >> >> From: Michal Suchanek >> >> >> >> Check what firmware told us and enable/disable the barrier_nospec >> >> as appropriate. >> >> >> >> We err on the side of enabling the barrier, as it's no-op on older >> >> systems, see the comment for more detail. >> >> >> >> Signed-off-by: Michael Ellerman >> ... >> > >> > I am missing the option for the barrier to be disabled by a kernel >> > commandline argument here. >> > >> > It does make sense to add a kernel parameter that is checked on >> > boot to be compatible with other platforms that implement one. >> >> No other platforms have an option to disable variant 1 mitigations, so >> there isn't an existing parameter we can use. > > Right, I was looking at an older implementation which turned off both > v1 and v2 with same parameter. In current kernel the v1 mitigation is > not turned off at all. Ah OK. >> Which is not to say we can't add one, but I wasn't sure if it was >> really worth it. > > The current thinking is that most performance relevant cases are > covered with array_nospec which has little overhead. The less code we > have for this the better ;-) Amen to that :) cheers