Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94A6DC43381 for ; Tue, 2 Apr 2019 06:20:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6AB4E20840 for ; Tue, 2 Apr 2019 06:20:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728678AbfDBGT7 (ORCPT ); Tue, 2 Apr 2019 02:19:59 -0400 Received: from ozlabs.org ([203.11.71.1]:37279 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728627AbfDBGT7 (ORCPT ); Tue, 2 Apr 2019 02:19:59 -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 44YJwF0hTGz9sTK; Tue, 2 Apr 2019 17:19:57 +1100 (AEDT) From: Michael Ellerman To: Joakim Tjernlund , "stable\@vger.kernel.org" , "gregkh\@linuxfoundation.org" Cc: "linuxppc-dev\@ozlabs.org" , "diana.craciun\@nxp.com" , "msuchanek\@suse.de" Subject: Re: [PATCH stable v4.14 13/32] powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E In-Reply-To: <763028d666042f5642104b42aaa416c2867baa31.camel@infinera.com> References: <20190329112620.14489-1-mpe@ellerman.id.au> <20190329112620.14489-14-mpe@ellerman.id.au> <763028d666042f5642104b42aaa416c2867baa31.camel@infinera.com> Date: Tue, 02 Apr 2019 17:19:56 +1100 Message-ID: <87imvxorn7.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Joakim Tjernlund writes: > On Fri, 2019-03-29 at 22:26 +1100, Michael Ellerman wrote: >> From: Diana Craciun >> >> commit ebcd1bfc33c7a90df941df68a6e5d4018c022fba upstream. >> >> Implement the barrier_nospec as a isync;sync instruction sequence. >> The implementation uses the infrastructure built for BOOK3S 64. >> >> Signed-off-by: Diana Craciun >> [mpe: Split out of larger patch] >> Signed-off-by: Michael Ellerman > > What is the performanc impact of these spectre fixes? I've not seen any numbers from anyone. It will depend on the workload, it's copy to/from user that is most likely to show an impact. We have a context switch benchmark in tools/testing/selftests/powerpc/benchmarks/context_switch.c. Running that with "--no-vector --no-altivec --no-fp --test=pipe" shows about a 2.3% slow down vs booting with "nospectre_v1". > Can I compile it away? You can't actually, but you can disable it at runtime with "nospectre_v1" on the kernel command line. We could make it a user selectable compile time option if you really want it to be. cheers