Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9093706pxu; Mon, 28 Dec 2020 06:29:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqPwjs9zj0Fj7zhwCBOK4O0eFgxoZJtNNqnDtNruD4F6xYcbWhYKufHIy1B+2MgljRVEaU X-Received: by 2002:a05:6402:46:: with SMTP id f6mr42483544edu.163.1609165773117; Mon, 28 Dec 2020 06:29:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165773; cv=none; d=google.com; s=arc-20160816; b=Y23YdjfLYS1sBfMXQimiENHGg5Mkr3X1A6gXXIAcIGzxbHdfDIXX4v/esqCDguVXld z/d5XBXtGxaEGHhF9kAs6bruUE020m0fqDWFdG5h+eitqKzRW6TszfSgiQxTar1f5faZ p0/DiBLS6o88XBPRq0bdcFNOW6wPQ5XirTbQ+zNhAuDfaVTx2tafN5c4GFHNj+L9rJUD ew+eCfdCtnlGcKW2eFoBYTK5WVpg9Zcm61D5xoUhNf3M4Dpndy5+kfO6/KXQjwa3XVbZ Ji45VQ/xvpFtZ4rupvOpMI9KdCVf8lHQe3F3XRu6zzVn9dBRXQoj4m/xcj1PAWDLSzaP jXiQ== 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=HbVMv7FJYnvBnYWW0j4mNh3SIFnmpD6+/m2PnS4jAjE=; b=eEjaUC5OLcEF5hCG070VE236BIdfDy3Rc38XIOlRzIS2gMLjBwnoMgE/7b4lk9J9BA BbIBt+/XAXfW1RD+T9UzlPU6j5E1aleC2xPB2Qqol4GIHBtOJI89fIdj4XT8oci2fC6C MDKuqP3B60byrCKEGIO3k5TvzrHS01jDZ3rtujKMwprOJvsiXo6/7OgAvh55DXSHIcom Q72/jZAp+iFZmSSFAGc4gEHPy3SMtE+ADJCdIVSo88w16HBSg5OsVJMwVUYSAOJmkEm2 T0HppIpf697nvmaRX9VXcDB8YVkXz2FH5m0mXoYL1WQuE9ppU65Hd1mdPrTT83GpOi2G /ufQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jfm5VxLL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr1si18895068ejc.474.2020.12.28.06.29.09; Mon, 28 Dec 2020 06:29:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jfm5VxLL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2503253AbgL1OZj (ORCPT + 99 others); Mon, 28 Dec 2020 09:25:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:33542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503235AbgL1OZf (ORCPT ); Mon, 28 Dec 2020 09:25:35 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7BCF720715; Mon, 28 Dec 2020 14:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165495; bh=zhsGXA6SJ+1ImAgzlI7jwTdc5LjYtY66jcdT1t/BwLU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jfm5VxLLgh28uksZwEwA6zlRGAkDq5qO4mMoGbL+WM0hkyfrExm4qPIFf7DPbNtYe s6ncn43Zm+Six/BW2QVffuvv4mnMDpefL99vrwcQlLeo4WJ75G93lqQreKSIoP062Q 1l90uB+HkbmWZBRpJvPFqm+3sZi3sGlZvkB9WCYY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Philipp Rudo , Xiaoying Yan , Lianbo Jiang , Heiko Carstens Subject: [PATCH 5.10 552/717] s390/kexec_file: fix diag308 subcode when loading crash kernel Date: Mon, 28 Dec 2020 13:49:10 +0100 Message-Id: <20201228125047.382031421@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Philipp Rudo commit 613775d62ec60202f98d2c5f520e6e9ba6dd4ac4 upstream. diag308 subcode 0 performes a clear reset which inlcudes the reset of all registers in the system. While this is the preferred behavior when loading a normal kernel via kexec it prevents the crash kernel to store the register values in the dump. To prevent this use subcode 1 when loading a crash kernel instead. Fixes: ee337f5469fd ("s390/kexec_file: Add crash support to image loader") Cc: # 4.17 Signed-off-by: Philipp Rudo Reported-by: Xiaoying Yan Tested-by: Lianbo Jiang Signed-off-by: Heiko Carstens Signed-off-by: Greg Kroah-Hartman --- arch/s390/purgatory/head.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- a/arch/s390/purgatory/head.S +++ b/arch/s390/purgatory/head.S @@ -62,14 +62,15 @@ jh 10b .endm -.macro START_NEXT_KERNEL base +.macro START_NEXT_KERNEL base subcode lg %r4,kernel_entry-\base(%r13) lg %r5,load_psw_mask-\base(%r13) ogr %r4,%r5 stg %r4,0(%r0) xgr %r0,%r0 - diag %r0,%r0,0x308 + lghi %r1,\subcode + diag %r0,%r1,0x308 .endm .text @@ -123,7 +124,7 @@ ENTRY(purgatory_start) je .start_crash_kernel /* start normal kernel */ - START_NEXT_KERNEL .base_crash + START_NEXT_KERNEL .base_crash 0 .return_old_kernel: lmg %r6,%r15,gprregs-.base_crash(%r13) @@ -227,7 +228,7 @@ ENTRY(purgatory_start) MEMCPY %r9,%r10,%r11 /* start crash kernel */ - START_NEXT_KERNEL .base_dst + START_NEXT_KERNEL .base_dst 1 load_psw_mask: