Received: by 10.192.165.148 with SMTP id m20csp833714imm; Fri, 27 Apr 2018 08:13:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo6E/8dxOd3bLPrzfSFLNDoA1sZT2L2yYcWChbMdTb6zE0mN9X1e4+f3czZ9LhqgyFGqBFq X-Received: by 2002:a17:902:ab86:: with SMTP id f6-v6mr2182455plr.185.1524842034834; Fri, 27 Apr 2018 08:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524842034; cv=none; d=google.com; s=arc-20160816; b=reufapk5IZk4WsFRWOCkm+c1jYJxW+sFTerls757KKEu5bNP9vhc/OyuMYtxeT9UPz S5D9eCSt396jFaR9zsQaV9aCdnRpTbfl/OYjjeNIBsxt60WkBe03CjfFT56TRrtXdXt/ zCPC+kXUxAbqd1efjhpY9tlydWuT85udxg2O0uA9U1FtLsnxkCihhcXdxBkw/PmlL55W 5rTuNyWEEv2P/cODLPBvZIrIqwv0J0dm5CmidV2QfuD1qc7yEnHXg9/8emX/Jwk0zFcv 7FXZiJhWD/6gFRQlFsRjV79T58qkCGKUHCulLeVTqNcVtMM4plWJdjus4XEckB/NmXJa eyvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=4iVmRO6Aq5mi3UYQJ43xmeeLBAdEDpgw1/dtQ45aXBQ=; b=EXlYqm1b7vzlbrg46qjPWFk97ZN54QAkcjp56PWT+zAD8dorhlgMvtma23UgjB229S lBgKvZP6SpowABiiZ6Vy+TD9Szf8BFjnVomFUKmhE6nEbLeB+MfNuS+EBTD6+ovxR5Wt AYtUIw7se+pRWw5TBfAUoclHjyUi3QO4y/eFrMnmZtB38HMJVlhp99Lb5yeHwzIWR7f3 Yct99VI0bf7vM8oCvhaluvIgtIDI1ZuFKRI2ZNIitTdjfDat0FohKbpIdftd7sa7GNmd mr8Jl9tnDkvrgwS2YPAxuMNU+X0sROFb5pJafuwRRNPWUrSg4nENn0abEjawo3wdK+t6 Dwtg== 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 w2-v6si1456834plz.226.2018.04.27.08.13.40; Fri, 27 Apr 2018 08:13:54 -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 S933657AbeD0OEK (ORCPT + 99 others); Fri, 27 Apr 2018 10:04:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:50530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933596AbeD0OEI (ORCPT ); Fri, 27 Apr 2018 10:04:08 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8AE9F21890; Fri, 27 Apr 2018 14:04:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AE9F21890 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Schwidefsky Subject: [PATCH 4.9 39/74] s390: do not bypass BPENTER for interrupt system calls Date: Fri, 27 Apr 2018 15:58:29 +0200 Message-Id: <20180427135711.547413426@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135709.899303463@linuxfoundation.org> References: <20180427135709.899303463@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martin Schwidefsky [ Upstream commit d5feec04fe578c8dbd9e2e1439afc2f0af761ed4 ] The system call path can be interrupted before the switch back to the standard branch prediction with BPENTER has been done. The critical section cleanup code skips forward to .Lsysc_do_svc and bypasses the BPENTER. In this case the kernel and all subsequent code will run with the limited branch prediction. Fixes: eacf67eb9b32 ("s390: run user space and KVM guests with modified branch prediction") Signed-off-by: Martin Schwidefsky Signed-off-by: Greg Kroah-Hartman --- arch/s390/kernel/entry.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -1316,7 +1316,8 @@ cleanup_critical: srag %r9,%r9,23 jz 0f mvc __TI_last_break(8,%r12),16(%r11) -0: # set up saved register r11 +0: BPENTER __TI_flags(%r12),_TIF_ISOLATE_BP + # set up saved register r11 lg %r15,__LC_KERNEL_STACK la %r9,STACK_FRAME_OVERHEAD(%r15) stg %r9,24(%r11) # r11 pt_regs pointer