Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2009207imm; Tue, 10 Jul 2018 11:31:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdjjoEjDFBKDEMGaOCwaJd4sYI4nEi7X+JnaTgB1rObVHEq1iDXX1l5XnzvluQqUMEfBYCE X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr26004867plb.273.1531247478412; Tue, 10 Jul 2018 11:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531247478; cv=none; d=google.com; s=arc-20160816; b=qG7766E9o0LvVVIdkIn75FQsCmA/vDHTIuYsaB4vW/OprU3G4afRHADZxPWsJlmd76 Ii2IfRStHP9oRP9NMpZEMCXb4fiBpUH+BalGqblX9gKEJUqisQ0q6VZTa/uE/G/0JPsZ Z9EEV19eBWEHUQZ/U/gkdR8+W98CoON/8oKV9/jieSxs9abD7FLS4XpANfb67wujAZUk Js5NkSnXyAesvxDmzsp1IM+oN0Uuym5cbPFKxYvq3/a7RhEZeOSqQUoU8vPFsinj7TJ0 aFF7tyVlfdem/ezY4ju4Jw5HmfbeSY1wuLoXi0tLVSSQsmm1f6QL7tKhUscUXqLB8bJ5 96Ew== 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 :arc-authentication-results; bh=KO5MErKsIN23RXKXCbm5qeBuiOjB4eWMM4GPp0f+nes=; b=KuFld5q4Pu4Pb9v9jEHoYDERMmAla5b6z/mbAlp8AXq+fYz9rLjTrFaIp2XMByDiU2 19APLjV3kvgatIho8dCbqeIDvCUp80TFsDaF3FxSZjsKY11sUq+Yn5RkGZ6rzjW53M1s xc1sYRuALCaLglsoqGIjL2fkO6Tq0ZKskAd0uBNK+vWFBJjSr7viKErefAdTjEge+8kn /M9/+CzkVyhB86/dpqJKc1GcUcI4G00CAtMnMMwNAmJqjQ3qtvf0D5cBpLp1dTsTJn50 RctQ0WmLaSM0fCAiG2epFHALZwBty33PwYEzspZGXRxzI+0lHM+ihQoa1PfH09SdTz51 YW/A== 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 z8-v6si16895544pgr.260.2018.07.10.11.31.02; Tue, 10 Jul 2018 11:31:18 -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 S2387929AbeGJSaE (ORCPT + 99 others); Tue, 10 Jul 2018 14:30:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45484 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732596AbeGJSaD (ORCPT ); Tue, 10 Jul 2018 14:30:03 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0DD5AEC2; Tue, 10 Jul 2018 18:29:51 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver Kurz , =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= , Christian Borntraeger , Hendrik Brueckner , Martin Schwidefsky Subject: [PATCH 4.9 22/52] s390: Correct register corruption in critical section cleanup Date: Tue, 10 Jul 2018 20:24:50 +0200 Message-Id: <20180710182451.558325923@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180710182449.285532226@linuxfoundation.org> References: <20180710182449.285532226@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: Christian Borntraeger commit 891f6a726cacbb87e5b06076693ffab53bd378d7 upstream. In the critical section cleanup we must not mess with r1. For march=z9 or older, larl + ex (instead of exrl) are used with r1 as a temporary register. This can clobber r1 in several interrupt handlers. Fix this by using r11 as a temp register. r11 is being saved by all callers of cleanup_critical. Fixes: 6dd85fbb87 ("s390: move expoline assembler macros to a header") Cc: stable@vger.kernel.org #v4.16 Reported-by: Oliver Kurz Reported-by: Petr Tesařík Signed-off-by: Christian Borntraeger Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky Signed-off-by: Greg Kroah-Hartman --- arch/s390/kernel/entry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -1187,7 +1187,7 @@ cleanup_critical: jl 0f clg %r9,BASED(.Lcleanup_table+104) # .Lload_fpu_regs_end jl .Lcleanup_load_fpu_regs -0: BR_EX %r14 +0: BR_EX %r14,%r11 .align 8 .Lcleanup_table: @@ -1217,7 +1217,7 @@ cleanup_critical: ni __SIE_PROG0C+3(%r9),0xfe # no longer in SIE lctlg %c1,%c1,__LC_USER_ASCE # load primary asce larl %r9,sie_exit # skip forward to sie_exit - BR_EX %r14 + BR_EX %r14,%r11 #endif .Lcleanup_system_call: