From patchwork Thu Nov 24 09:58:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 83840 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp60124qgi; Thu, 24 Nov 2016 02:04:01 -0800 (PST) X-Received: by 10.84.197.165 with SMTP id n34mr3727611pld.34.1479981840991; Thu, 24 Nov 2016 02:04:00 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id n23si38586871pfj.268.2016.11.24.02.04.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 02:04:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9qrj-0007x1-Pq; Thu, 24 Nov 2016 10:02:51 +0000 Received: from mail-pg0-x236.google.com ([2607:f8b0:400e:c05::236]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9qoQ-0004TB-JI for linux-arm-kernel@lists.infradead.org; Thu, 24 Nov 2016 09:59:36 +0000 Received: by mail-pg0-x236.google.com with SMTP id x23so17117827pgx.1 for ; Thu, 24 Nov 2016 01:59:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qeFsZ0K2dcpP68d4btvy4DcShi2pSfzLCf+dSMyoxro=; b=ZcmtUxoHnsyppeeenHJWaPkXdkwmKYii4EH6yR25cuEJWalf6r8WjhS9diNbgu06sC sOKcLFdCJb9BDp3wI1VtWWhdIUYUEXU8UmT0rRP0gPjKM9kvZ+D5qPdiNQyXYmMSsprv sB7bfeaieS8PPNC5woNRVPfZ0COUxQ0yr6zgg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qeFsZ0K2dcpP68d4btvy4DcShi2pSfzLCf+dSMyoxro=; b=FAh+KjI9eX1AyhK8/xg2dmLnZ5aH6gRD1QitZKFnQFPo6JS7XCQmYIrlylRZZrBj9H 8d2FEMgQdjh+TcMPa7uK6ylZviIDOGCymbxj0+Jdyx9dnWr2pofFlHYNuzpBoejEmEkS /tM8lD37uTHtD9fBca4a37z7hhj9j1dDEJRaHRokUk18sA03SLpCGOyInMw2wOyCgnJV gf89lTEQZryXba+yyKJDV/rZsJOe5iILBJw9aHJq1LmwSoKqUYIWdm4TSc13sTHjUs9t Iam5SkyIOTTKZP2mffC3vAdRLCO32Sp8uP7lUQC6jT64mgFK398gzh1+CmbA+ALYUzM4 qZ/A== X-Gm-Message-State: AKaTC00f9VJ9H3xkkJhWz+x3SJHa116EwQV5+xZjzlPDhWvhBrvYM9JmO4ELtg+IQApT8Ybk X-Received: by 10.98.99.197 with SMTP id x188mr1423620pfb.179.1479981545585; Thu, 24 Nov 2016 01:59:05 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id m66sm59006117pfm.3.2016.11.24.01.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 01:59:05 -0800 (PST) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH v28 5/9] arm64: kdump: add VMCOREINFO's for user-space tools Date: Thu, 24 Nov 2016 18:58:06 +0900 Message-Id: <20161124095809.7092-4-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161124095523.6972-1-takahiro.akashi@linaro.org> References: <20161124095523.6972-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161124_015927_100709_281FD497 X-CRM114-Status: GOOD ( 10.62 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:236 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, geoff@infradead.org, kexec@lists.infradead.org, AKASHI Takahiro , james.morse@arm.com, bauerman@linux.vnet.ibm.com, dyoung@redhat.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org In addition to common VMCOREINFO's defined in crash_save_vmcoreinfo_init(), we need to know, for crash utility, - kimage_voffset - PHYS_OFFSET to examine the contents of a dump file (/proc/vmcore) correctly due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6. - VA_BITS is also required for makedumpfile command. arch_crash_save_vmcoreinfo() appends them to the dump file. More VMCOREINFO's may be added later. Signed-off-by: AKASHI Takahiro Reviewed-by: James Morse --- arch/arm64/kernel/machine_kexec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.10.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index c60346d..994fe0b 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -17,6 +17,7 @@ #include #include +#include #include #include "cpu-reset.h" @@ -260,3 +261,13 @@ void machine_crash_shutdown(struct pt_regs *regs) pr_info("Starting crashdump kernel...\n"); } + +void arch_crash_save_vmcoreinfo(void) +{ + VMCOREINFO_NUMBER(VA_BITS); + /* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */ + vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n", + kimage_voffset); + vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n", + PHYS_OFFSET); +}