Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1726599imu; Wed, 21 Nov 2018 00:42:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/U496/2lSlm9Amwu7iidoyxyiaXuclkQRqKI6c99b86xenrDOQgcDVuae8cx/xzpuWmIBFP X-Received: by 2002:a63:224f:: with SMTP id t15mr5097987pgm.69.1542789741554; Wed, 21 Nov 2018 00:42:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542789741; cv=none; d=google.com; s=arc-20160816; b=VAEKPNh+CAeZIVl0ZkY6MFWbiHcu4BSTiuEAsxzFsBwY6aPByvPawe/0u9w8qA/+en R862UJwPsDF3SDH2y/K1nb6PXlz133ldL8KIIXdxR3l62iUELRPlj4H1ClZURM4nyQ0C LLy5dn2QCDg0DV0utuGq6biHR6LfDFpytiGAZ4pLYCz1p4MQt51jwelN61jlpbMM98FJ iF2TYQavHfItsriTcmbi8GFOogxIIqbyGaAA+1guN4SGNjzksxQ2HE9y7hSKxXTMBloT m/4lPya3m/YflfKWl0EVIUZPMKnu4sljHuPDxp8efh0LeYhJWz0y7XlT1xctHUC5VbVn uncA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=3KMozNGj1coHe+3WTAxZcek8Y2kN6Qos9qrVM9zI6c0=; b=GZQqRoG+WcYC+oYq2oOtkRzAXI/wTiE+yfuTItaoTi81l0z8Qeo6oSt/k+S7tzQRjK PvGtuNA151As9srlTEa3TpmDI9kPHIhvF+hO0Z8eCdTkqSjIsCV+tO9y5EoI+WvFDFo5 u4BNNYiRsin8qanMZkERUlqRKnrhJVTRaZXTipGV5OHQCbeTew7PywSlfGqCWsmm62Dr L2Icf+J26MtWaVxZBZFW0aGfnkE4Tnx/ECfKmwJCA+3bjwUU7h6iEnxgPyY+om6SlzRI RG6IY91cXcyH/8zVchXh4BxL7yyoBfo4BIveRq9RX3aH5WyqtD9DZz+BcVGlPxtVzVPo wDxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17-v6si17376541plp.420.2018.11.21.00.42.03; Wed, 21 Nov 2018 00:42:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727114AbeKUSLu (ORCPT + 99 others); Wed, 21 Nov 2018 13:11:50 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:38014 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbeKUSLu (ORCPT ); Wed, 21 Nov 2018 13:11:50 -0500 Received: by mail-lj1-f196.google.com with SMTP id c19-v6so3922111lja.5 for ; Tue, 20 Nov 2018 23:38:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3KMozNGj1coHe+3WTAxZcek8Y2kN6Qos9qrVM9zI6c0=; b=Tc5UoYjC69asu8yN1q8P4E1D/j3UskNelWyQziOEh8wjZLN74RZnnBuULES6vkn9JT 79X+adwDa/eRne+fPA1F7o19MGjl5zyO0yz1aYa3K70q3PklKALz+Vn2YPM8DG+IBHPC /i6Av1VXWYMT6LHlEoJxCYTUP44h6Pwwa83KHxOR+z4oxcT6lp3IjW2WL4vgckebtqpQ iDVN9hQJdHtjwWFJQbNgcLTLuIYkdYgQ6aEgKAqgxm9G8rAs6HwuXitsL9/GPovJ8x8b VWN+50eDIXNjiS/h1NHYWWkmpkxq/0/KWjXCA2R005PIVDvNQrDsayIbsQl5OVOp6O3C kdAQ== X-Gm-Message-State: AA+aEWYhT2XJSro021hTARkC/YiutC4dWix5PqPqxaD+lKqK1M3yLlzI EFXsVwloVYItJg9HgwuUec4dBeVk6mlXXDIXkIcmyg== X-Received: by 2002:a2e:8449:: with SMTP id u9-v6mr3528609ljh.121.1542785905298; Tue, 20 Nov 2018 23:38:25 -0800 (PST) MIME-Version: 1.0 References: <1542318469-13699-1-git-send-email-bhsharma@redhat.com> <4AE2DC15AC0B8543882A74EA0D43DBEC03560F84@BPXM09GP.gisp.nec.co.jp> In-Reply-To: <4AE2DC15AC0B8543882A74EA0D43DBEC03560F84@BPXM09GP.gisp.nec.co.jp> From: Bhupesh Sharma Date: Wed, 21 Nov 2018 13:07:57 +0530 Message-ID: Subject: Re: [PATCH v2] x86_64, vmcoreinfo: Append 'page_offset_base' to vmcoreinfo To: Kazuhito Hagio Cc: Linux Kernel Mailing List , Borislav Petkov , Baoquan He , Ingo Molnar , Thomas Gleixner , Dave Anderson , James Morse , Omar Sandoval , x86@kernel.org, kexec mailing list , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kazu, On Tue, Nov 20, 2018 at 2:47 AM Kazuhito Hagio wrote: > > On 11/15/2018 4:47 PM, Bhupesh Sharma wrote: > > Adding 'page_offset_base' to the vmcoreinfo can be specially useful for > > live-debugging of a running kernel via user-space utilities > > like makedumpfile (see [1]). > > I agree. > > > Recently, I saw an issue with the 'makedumpfile' utility (see [2] for > > details), whose live debugging feature is broken with newer kernels > > (I tested the same with 4.19-rc8+ kernel), as KCORE_REMAP segments were > > added to kcore, thus leading to an additional sections in the same, and > > makedumpfile is not longer able to determine the start of direct > > mapping of all physical memory, as it relies on traversing the PT_LOAD > > segments inside kcore and using the last PT_LOAD segment > > to determine the start of direct mapping. > > Actually, the KCORE_REMAP segments were already removed from kcore by > commit bf904d2762ee ("x86/pti/64: Remove the SYSCALL64 entry trampoline") > and kcore's program headers got back to the previous ones, but this > fact shows that they are changeable. > > So I think that if we have this NUMBER(page_offset_base) in vmcoreinfo > for x86_64, user-space tools (especially makedumpfile) would become > more stable against changes in kcore and vmcore, rather than depending > on their PT_LOAD values. Thanks a lot for your review. Hi x86 maintainers, Ping, any comments on this patch. Since it is a useful addition to the kernel-userspace ABI (as suggested by the user-space utility maintainer as well), can we consider including this in the kernel? Thanks, Bhupesh