From patchwork Tue Jul 12 05:05:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 71785 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp276140qga; Mon, 11 Jul 2016 22:02:29 -0700 (PDT) X-Received: by 10.98.207.6 with SMTP id b6mr9345572pfg.25.1468299749823; Mon, 11 Jul 2016 22:02:29 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id oi7si2038852pab.13.2016.07.11.22.02.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jul 2016 22:02:29 -0700 (PDT) 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 1bMpp1-00050G-Un; Tue, 12 Jul 2016 05:01:27 +0000 Received: from mail-pa0-x22b.google.com ([2607:f8b0:400e:c03::22b]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bMpoq-0004aV-Cw for linux-arm-kernel@lists.infradead.org; Tue, 12 Jul 2016 05:01:20 +0000 Received: by mail-pa0-x22b.google.com with SMTP id hu1so2458703pad.3 for ; Mon, 11 Jul 2016 22:00:56 -0700 (PDT) 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=/FPfmAAJG7R9mCli4ZR8ayUGAdWaNX4oOp3vX9Zknv0=; b=ejvWx6gw4E/MRSwhm5FMTcCm5iQHDEjqvy1O2a5Dfd5MyDU5f8XVsmh2lKhY4IbaU0 AI7pyUF2nULassnmH6wCm7Sn6N4AJQyDP3KGCdWFJn8z9Q3piLuVY87xP3z0bLHcMcwG 3mpjioya0MIywLBqAqXPF/WqiRRdayya5HthQ= 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=/FPfmAAJG7R9mCli4ZR8ayUGAdWaNX4oOp3vX9Zknv0=; b=VG9lFZB+pnQNZU9y810gwLVtUHInjK/VG6Y1dtYxY5XL7ouYJ/SDKmRVQNgH42dQPV 2fEUqzsdIFqRAyiT6mQZg8lOMr0JK+Go/qAf9W64ZY/ukLcXmtGV4swgk9jqfjfnsvn2 0g/HCATkwdIhelzkVDkbjWP1fkm9jvf0gAY/AJGjSvu+3RgE2YFBsjfk1rpac9ouH1TQ ib5bZq1zNB1xRPYF74J1ZbQtsQLulG9wRBnXIqdULaxieOAXKraGKQ8gztSGX/iHFMKv C0WCxA/a/Qag1/rxCDFxXqmq1vCKeWLkTWdwil3htvw8b3Y6WqJR5z8C13Pe1Q8Ji5Mn GcjQ== X-Gm-Message-State: ALyK8tL/f2xziohWkpi82Tzi4i54amlxDQa2n8q2ZZcM6MIGvn5HDPvDhpzLE8HQbfl/HF/H X-Received: by 10.66.11.234 with SMTP id t10mr541125pab.66.1468299655806; Mon, 11 Jul 2016 22:00:55 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id br6sm6577054pac.0.2016.07.11.22.00.54 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 11 Jul 2016 22:00:55 -0700 (PDT) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH v22 5/8] arm64: kdump: add VMCOREINFO's for user-space coredump tools Date: Tue, 12 Jul 2016 14:05:11 +0900 Message-Id: <20160712050514.22307-6-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160712050514.22307-1-takahiro.akashi@linaro.org> References: <20160712050514.22307-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160711_220116_934959_62104685 X-CRM114-Status: GOOD ( 10.46 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c03:0:0:0:22b 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 , robh+dt@kernel.org, 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 For the current crash utility, we need to know, at least, - kimage_voffset - PHYS_OFFSET to handle the contents of core dump file (/proc/vmcore) correctly due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6. This patch puts them as VMCOREINFO's into the file. - VA_BITS is also added for makedumpfile command. More VMCOREINFO's may be added later. Signed-off-by: AKASHI Takahiro --- arch/arm64/kernel/machine_kexec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.9.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 8ac9dba8..38b4411 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); +}