Received: by 10.213.65.68 with SMTP id h4csp148124imn; Thu, 15 Mar 2018 12:19:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELvTQtcM1sH8uMRg0MGazi+x7EnXy6Wx1/id75l3d2J6GgODHVOAPgBq0F3fHCoUXEZB2YqQ X-Received: by 2002:a17:902:c1:: with SMTP id a59-v6mr9220237pla.284.1521141564451; Thu, 15 Mar 2018 12:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521141564; cv=none; d=google.com; s=arc-20160816; b=K4LbEao/yZPdwFgn+KpQlajEt6htoVyY1zCb2B6jn/9nrz9hUxXBfGNwhtp2nIWtex Y5xx5o6KZtNl7fPDQZZE3868Ki2CCcvASnPR+EulpyfVobpu6o7jLyg3HTtLBqwiaFee HS+8w9sFUug5JcNsQ8VEEfrrYZRs3OhhsjvlgqHLY6Drml4qYxkFIAIRMQz8TA3T4fnD r1/zLRKTUD3Wm9UHKQKQpMrcHSbxZhu815DdWcPr80r8TPdhoR/J1S8ZjeaZdKHqSuEy higOHrRdlETLpSuZRBYnTBKf5FssYaL6e7Pz4WjmTi1PVJGdWpNUl1c8AO98d8c9WVK4 upHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3QUYJirZMKT0LZMvYQm8l4VppfjJ2dhpcmjDpYwyky0=; b=vXquuDsug4KNQU6OAQUq9s1B0Sl9bqZ22D6iZ2BIcXN5k+o16zZjrHT1H0YM7d6I7E RX/yimt7Yt5jNjZcpAzt8T9M5ooVPjghPm3Htiuky+37SyEsQRXh5+6o+m54pg2NQIfR ftPz4W+hdWUKfstw1N6ovNzQ4TaPCwX4tj6tAwN/mx6IKB2EB6PvFLFHkASat60QpzWa J/3QqVs9IM+gmgMEdsPrg1ic3LiXpyrRUHppCnM8/g1YrhSLAUoCJjaAT9rzPNtFJz20 DwpQRxfpBQz7zGMak/bOgAFCTeTNw/MCt0vDoDMTtY2LyvL3ehD30XLmbEQk1v6FQQaB x+OA== 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 g11-v6si4465590plt.580.2018.03.15.12.19.10; Thu, 15 Mar 2018 12:19:24 -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 S932693AbeCOTSP (ORCPT + 99 others); Thu, 15 Mar 2018 15:18:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:45184 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbeCOTQX (ORCPT ); Thu, 15 Mar 2018 15:16:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2904AAEB3; Thu, 15 Mar 2018 19:16:22 +0000 (UTC) From: Michal Suchanek To: linuxppc-dev@lists.ozlabs.org Cc: Kate Stewart , Madhavan Srinivasan , Paul Mackerras , Michael Neuling , "Bryant G. Ly" , Mahesh Salgaonkar , "Naveen N. Rao" , Daniel Axtens , Nicholas Piggin , Al Viro , David Gibson , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Sergey Senozhatsky , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Masami Hiramatsu , Andrew Donnellan , Philippe Ombredanne , Joe Perches , Oliver O'Halloran , Andrew Morton , "Tobin C. Harding" , Michal Suchanek Subject: [PATCH RFC rebase 3/9] powerpc/64: Use barrier_nospec in syscall entry Date: Thu, 15 Mar 2018 20:15:52 +0100 Message-Id: X-Mailer: git-send-email 2.13.6 In-Reply-To: References: <20180313200108.GA4082@hirez.programming.kicks-ass.net> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On powerpc syscall entry is done in assembly so patch in an explicit barrier_nospec. Signed-off-by: Michal Suchanek --- arch/powerpc/kernel/entry_64.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 2cb5109a7ea3..7bfc4cf48af2 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -36,6 +36,7 @@ #include #include #include +#include #include #ifdef CONFIG_PPC_BOOK3S #include @@ -159,6 +160,7 @@ system_call: /* label this so stack traces look sane */ andi. r11,r10,_TIF_SYSCALL_DOTRACE bne .Lsyscall_dotrace /* does not return */ cmpldi 0,r0,NR_syscalls + barrier_nospec bge- .Lsyscall_enosys .Lsyscall: @@ -319,6 +321,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR) ld r10,TI_FLAGS(r10) cmpldi r0,NR_syscalls + barrier_nospec blt+ .Lsyscall /* Return code is already in r3 thanks to do_syscall_trace_enter() */ -- 2.13.6