Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3262044rwb; Mon, 15 Aug 2022 22:37:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR4at8U2m5BL7ZS5OOiTdOfxAkMx+Qi8qlSuxLILvTENZuX6pSHS61u4HtRBHXcYA7hP6d5z X-Received: by 2002:a63:d317:0:b0:427:567b:847c with SMTP id b23-20020a63d317000000b00427567b847cmr10760363pgg.4.1660628253483; Mon, 15 Aug 2022 22:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660628253; cv=none; d=google.com; s=arc-20160816; b=wDbyeh6000ss5DryMqWnp6KGwbfTy+yDvPzOs3GgiSPgYqxXvUUkMUvDU6D2V/xyS0 z6tKXa75qN56gNm2cLu0LvNk4Dl+gzPwreUhblgiZqgAMlMcGgniEIQf9qpbeE7tphri bVwV9HYRD6fwbSO4R7sU4Pb1jvjlT2w1fMXWQkT8wQFDgxmU4GihJnqzcf07wFlYn2EW 4hr9U7JMZfc00xW9urte3SHro/Yvy3tGSy9kuRwfevUnIhfWrrxrspZSOjwZc+TyzeCQ 66oaAnH2X7rqv1Ykhcn7qpNv3pZzTHsNOs6K96maehCtxfIehxdCwIfuM1e579OOpbso zoTQ== 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=Ol79HmuvfuKisGRib5QhniwtiU03P2Ksm+29IYvjf+U=; b=t0eV1DvV+/rzE1cJl7vUSV57qjX032kmIHYDhOn/X8qyDpQ+NIJovHv1FC7rCCKFF6 qI0+AlKq8mU0PyRRjScsJGt8+TR5mdnrMqaHa/RLb/xchf0XL4KT3J766tv1A2qX2ZCl nIwtFsT7eaiNhsm1hUGyiEW2BkscG34+NWzp9KxcqP5L02xbxeVmXLkEWGV7hMa8QCmM ZkfrgubknjF5Y3piH+58+4UMgRuidCbIOyQdVnMQ4M6SFkSh1sbi2OkV1ORlFnHqLY01 3ONhU3eDnmZaDD166HWHRen21YYtk3q31ed3nds28cKZJkLsbwQJSFsgqEJyGpPFrXTa zZ+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IclC098B; 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 w24-20020a17090a461800b001f27babb6fbsi10931550pjg.56.2022.08.15.22.37.22; Mon, 15 Aug 2022 22:37:33 -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=IclC098B; 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 S232990AbiHPEuW (ORCPT + 99 others); Tue, 16 Aug 2022 00:50:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233145AbiHPEq2 (ORCPT ); Tue, 16 Aug 2022 00:46:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F451B1B85; Mon, 15 Aug 2022 13:43:26 -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 0938460F60; Mon, 15 Aug 2022 20:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAE22C433D6; Mon, 15 Aug 2022 20:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596204; bh=Tdf9diKd0OE9ak2v8QKqoD6yOoCtqCB/V/b54A8Szlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IclC098BHhSOVZOoXxltUIIalETS9eMYiKu4WiWPdYjn3XAvCt8f2sTH4MxeqkF/B 6tMeIjwmmu/thvviyTUGBa59Z2oW2eAlijq+PAdz15ht1Ik5ElvuNxSbP7YxRBCJ3T dfwueZ0IoEsRNcXLO8kD+AlseA9N2SQD4hE8Y2Ro= 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.19 1004/1157] s390/smp: enforce lowcore protection on CPU restart Date: Mon, 15 Aug 2022 20:06:00 +0200 Message-Id: <20220815180519.959548741@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 0a37f5de2863..1ead1293ba17 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -508,8 +508,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