From patchwork Wed Dec 16 04:45:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 11976515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FB56C4361B for ; Wed, 16 Dec 2020 04:45:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F06FE2312E for ; Wed, 16 Dec 2020 04:45:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F06FE2312E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 84F886B0085; Tue, 15 Dec 2020 23:45:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 826D78D000E; Tue, 15 Dec 2020 23:45:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 764258D0002; Tue, 15 Dec 2020 23:45:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id 622596B0085 for ; Tue, 15 Dec 2020 23:45:34 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2AEE7181AEF1E for ; Wed, 16 Dec 2020 04:45:34 +0000 (UTC) X-FDA: 77597906988.02.vase06_3c0122c27429 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id 0E54010097AA0 for ; Wed, 16 Dec 2020 04:45:34 +0000 (UTC) X-HE-Tag: vase06_3c0122c27429 X-Filterd-Recvd-Size: 3359 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Wed, 16 Dec 2020 04:45:33 +0000 (UTC) Date: Tue, 15 Dec 2020 20:45:31 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1608093932; bh=bSvKPyN2vI3JncAbr+6DrpmWfX86F/Omg+MsufQmK3A=; h=From:To:Subject:In-Reply-To:From; b=wAhXlCjzbB4bT5Vu5AJMkbJxrEh9SsFnBa6rRqjwFX5N+mjGpVp0aJvEybg8wrrLL hk+uRfDJSVssxHhQjLkYHsLB3e+5GTSGOh06drkFfHJA0xvlIBqGSJIjkTn3i/qZoT mxYEBQnwpZmcjZiN/7R5BvuIvr7HO9ojiUKPCoX8= From: Andrew Morton To: akpm@linux-foundation.org, bhe@redhat.com, christian.brauner@ubuntu.com, dyoung@redhat.com, ebiederm@xmission.com, egorenar@linux.ibm.com, keescook@chromium.org, ktkhai@virtuozzo.com, lijiang@redhat.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org, vgoyal@redhat.com Subject: [patch 59/95] kdump: append uts_namespace.name offset to VMCOREINFO Message-ID: <20201216044531.5QxvZ9WtI%akpm@linux-foundation.org> In-Reply-To: <20201215204156.f05ec694b907845bcfab5c44@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Alexander Egorenkov Subject: kdump: append uts_namespace.name offset to VMCOREINFO The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count"). Make the offset of the field 'uts_namespace.name' available in VMCOREINFO because tools like 'crash-utility' and 'makedumpfile' must be able to read it from crash dumps. Link: https://lore.kernel.org/r/159644978167.604812.1773586504374412107.stgit@localhost.localdomain Link: https://lkml.kernel.org/r/20200930102328.396488-1-egorenar@linux.ibm.com Signed-off-by: Alexander Egorenkov Acked-by: lijiang Acked-by: Baoquan He Cc: Dave Young Cc: Vivek Goyal Cc: "Eric W . Biederman" Cc: Kirill Tkhai Cc: Kees Cook Cc: Christian Brauner Signed-off-by: Andrew Morton --- Documentation/admin-guide/kdump/vmcoreinfo.rst | 6 ++++++ kernel/crash_core.c | 1 + 2 files changed, 7 insertions(+) --- a/Documentation/admin-guide/kdump/vmcoreinfo.rst~kdump-append-uts_namespacename-offset-to-vmcoreinfo +++ a/Documentation/admin-guide/kdump/vmcoreinfo.rst @@ -39,6 +39,12 @@ call. User-space tools can get the kernel name, host name, kernel release number, kernel version, architecture name and OS type from it. +(uts_namespace, name) +--------------------- + +Offset of the name's member. Crash Utility and Makedumpfile get +the start address of the init_uts_ns.name from this. + node_online_map --------------- --- a/kernel/crash_core.c~kdump-append-uts_namespacename-offset-to-vmcoreinfo +++ a/kernel/crash_core.c @@ -447,6 +447,7 @@ static int __init crash_save_vmcoreinfo_ VMCOREINFO_PAGESIZE(PAGE_SIZE); VMCOREINFO_SYMBOL(init_uts_ns); + VMCOREINFO_OFFSET(uts_namespace, name); VMCOREINFO_SYMBOL(node_online_map); #ifdef CONFIG_MMU VMCOREINFO_SYMBOL_ARRAY(swapper_pg_dir);