Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2872312rwb; Mon, 15 Aug 2022 13:03:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR5qkVZh8UMchhwjbm/Z7GkqXf4XSeClFM9fbG/OXEjhEeH9xYHL0/nBRVDveQ+jxsJ+nY0o X-Received: by 2002:a17:907:a057:b0:730:a2d8:d5ac with SMTP id gz23-20020a170907a05700b00730a2d8d5acmr11160668ejc.764.1660593780194; Mon, 15 Aug 2022 13:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660593780; cv=none; d=google.com; s=arc-20160816; b=VbsZyk5SwuhxVrp2W4cAyywvNuRNugCfGFkxQrAsJNf8L1c74r/5KiolmCE680j1ZY +g20nJX6vdQBvv2rf4U4vk9gE+yuADuAxJMP3VGgfUNATced+qzfdbknetWVUGc31iR9 3KUiyx/tPH343y1AdcVpQEXOTHECz7/62WOt46x4ous24LBscm1YdODnwhvxkUu4iJVK aECQDbDyxp06Zm2dkAjZjx/dY2EVmKJWSbl4q5v56s50aYBzq//IZtql4kwekQZbnOGd p7rdZlFvBw5la1sYXyLipqUGcMSTVAqPEwoeCds+YfSd83UYmcE2wUA+3qesXDvuUJbr pRJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MpytIChhtJpwGN+iJp5gQSnSpx5y3dxfh/DMpAc3qmY=; b=Gyp13dmFrbo04F/9cDXa07aCrQCBD2mrQB+IEzMj2f0tMarF0ckWPc/sq/0iXwiLzq 2qxqYtIq49slJjv+aQuwes015fl0r7t7B+yFZjK5ymMPb8FJTgky++FWZVFmmdPGMKb9 BTjptZiZiL+AeD6afmPUMqXS21eK9oPqrHwVPQyBpYCpPEXY79NSnC6HMPWWdy4ZB3jn 3PxHsScIsnLqQliQJ7Ct03uE+6yhz7LZWyvvcBKU3Xk1TRbkEmTz5azu75jWVHVde9AB sKGK/DOrFzuD7vWrEkrSj077Bl6JnU0E3RXCtltM9PxJw6dTC+WiWLqlxBqM0Yg9+CXt 1l1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wn0ToYUw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w25-20020a170906b19900b0072b11a2a2afsi7660752ejy.57.2022.08.15.13.02.34; Mon, 15 Aug 2022 13:03:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wn0ToYUw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344393AbiHOTnH (ORCPT + 99 others); Mon, 15 Aug 2022 15:43:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245185AbiHOTig (ORCPT ); Mon, 15 Aug 2022 15:38:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 031503FA21; Mon, 15 Aug 2022 11:46:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 95131611DB; Mon, 15 Aug 2022 18:46:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82347C433D6; Mon, 15 Aug 2022 18:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589199; bh=2c/eqYOdA18TAZX5IpO0DONV+1HCzEmfBOAB1tPKM0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wn0ToYUw+Ytllbe4HS/Gus45W2OjNakQjscBc7DM5NS2h3kRN4wSInxSx4igzyU7g ysSNV+hOksmU9bbirfjamgWSJi7M7Sjvq0+x1UNVUIFKocLey4n8LciQs6LEqDIX9K 1rGSrTDLufoMBkLjcnT8Ap26vuAQ2EHzlQZsoG/I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heiko Carstens , Alexander Gordeev , Sasha Levin Subject: [PATCH 5.15 644/779] s390/smp: enforce lowcore protection on CPU restart Date: Mon, 15 Aug 2022 20:04:48 +0200 Message-Id: <20220815180404.884030334@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Gordeev [ Upstream commit 6f5c672d17f583b081e283927f5040f726c54598 ] As result of commit 915fea04f932 ("s390/smp: enable DAT before CPU restart callback is called") the low-address protection bit gets mistakenly unset in control register 0 save area of the absolute zero memory. That area is used when manual PSW restart happened to hit an offline CPU. In this case the low-address protection for that CPU will be dropped. Reviewed-by: Heiko Carstens Fixes: 915fea04f932 ("s390/smp: enable DAT before CPU restart callback is called") Signed-off-by: Alexander Gordeev Signed-off-by: Sasha Levin --- arch/s390/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 6b1a8697fae8..c8e7b3db82e2 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -507,8 +507,8 @@ static void __init setup_lowcore_dat_on(void) S390_lowcore.svc_new_psw.mask |= PSW_MASK_DAT; S390_lowcore.program_new_psw.mask |= PSW_MASK_DAT; S390_lowcore.io_new_psw.mask |= PSW_MASK_DAT; - __ctl_store(S390_lowcore.cregs_save_area, 0, 15); __ctl_set_bit(0, 28); + __ctl_store(S390_lowcore.cregs_save_area, 0, 15); put_abs_lowcore(restart_flags, RESTART_FLAG_CTLREGS); put_abs_lowcore(program_new_psw, lc->program_new_psw); for (cr = 0; cr < ARRAY_SIZE(lc->cregs_save_area); cr++) -- 2.35.1