From patchwork Wed Jun 20 10:06:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 10476837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3361604D3 for ; Wed, 20 Jun 2018 10:07:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 921AC28478 for ; Wed, 20 Jun 2018 10:07:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 863CE28E04; Wed, 20 Jun 2018 10:07:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2309628478 for ; Wed, 20 Jun 2018 10:07:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GJwFatxyJMnXDqPlt9pnf42zxB5IXsTSufYXPev5vX0=; b=dC8DqqULprPpN/ iy5QCT08CwRIBsTJL5QsM1eGt187aox155izzlXnq21qmBaTlWRit+hAnvMBK6wv/NmGSURhH5Nye SoGz0t/OdTz5ko8/tKCoVj1T+zof4vR+8+i40WqfzBk7/z/a2hbAth+yAI0J6QGR3jE2WvsRfVHFy UcxtmOGqrvM46wx8ZOMvATs5jo+iIE/o5Rs2F7orKww66ebbBvcxcTuh2lQToq+/Ts4CG+2JHd0/M FAIgMiahAUwgPRDEA59LFQqINhZhPw6bFyNlJRbjvdig1KHQRIKKA2CRqdUHUVxt/kKegZe6lSKlT tQyF864trHodXS4XXz+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVa0y-0007ZP-TQ; Wed, 20 Jun 2018 10:07:00 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVa0o-0007PT-1w; Wed, 20 Jun 2018 10:06:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4747680D; Wed, 20 Jun 2018 03:06:37 -0700 (PDT) Received: from [10.1.206.34] (melchizedek.cambridge.arm.com [10.1.206.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 618253F589; Wed, 20 Jun 2018 03:06:35 -0700 (PDT) Subject: Re: [PATCH] arm64/mm: Introduce a variable to hold base address of linear region To: Bhupesh Sharma , "Jin, Yanjiang" References: <3a05cd0e-466e-4fb6-a78a-4b363e21aaab@arm.com> <92ff5220-f863-4edc-bc9f-bd802d2efa9c@arm.com> <20180619085541.GB13984@arm.com> <6860c284f1c74faa95edd6cf866ec80d@HXTBJIDCEMVIW02.hxtcorp.net> <20180619094045.GD13984@arm.com> <09260c7e-8b9d-bc3c-5bca-0fd75417f552@arm.com> <51cf54d6a19f4837b74218b000cc23bc@HXTBJIDCEMVIW02.hxtcorp.net> From: James Morse Message-ID: Date: Wed, 20 Jun 2018 11:06:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180620_030650_152086_7AC6D6E1 X-CRM114-Status: GOOD ( 21.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Ard Biesheuvel , kexec , Catalin Marinas , Will Deacon , AKASHI Takahiro , Bhupesh SHARMA , Kexec Mailing List , linux-arm-kernel Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi guys, On 20/06/18 08:26, Bhupesh Sharma wrote: > On Wed, Jun 20, 2018 at 7:46 AM, Jin, Yanjiang > wrote: >> If /proc/kcore always exists in kexec/kdump, I think this issue can be fixed >> easily. But it requires that Kexec/kdump have to rely on " CONFIG_PROC_KCORE=y". >> I am not sure if we can persuade Kexec-tools community to accept this. For the kernel this would be: --------------%<-------------- --------------%<-------------- With this kernel's that support kdump but don't have /proc/kcore wouldn't have the new PT_NOTEs anyway. Whatever you do today is all you can do. > Most distributions like Ubuntu and Fedora already enable > CONFIG_PROC_KCORE by default, to support user-space tools like > crash-utility and makedumpfile which can be used for 'live' debugging > of a primary kernel (without the requirement of being in the secondary > or crash kernel). > > For such cases. '/proc/kcore' and 'vmlinux' are the only available > sources for PT_NOTE/PT_LOAD segments and kernel symbols respectively. > > Since we need to support all such existing user-space utilities (which > work well with other archs like x86 and ppc64), x86 has kaslr too, I couldn't work out how your user-space:phys_to_virt() works there. Are we missing an alternative trick? > we need to have a > solution which works without modifying most of them - the rest (like > kexec-tools) can be easily modified to follow the same approach. (We're also trying to solve this in a way that lets user-space shed arch-specific code.) Thanks, James diff --git a/arch/Kconfig b/arch/Kconfig index 1aa59063f1fd..0ea2c7c0ac08 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -8,6 +8,7 @@ config CRASH_CORE config KEXEC_CORE select CRASH_CORE + select PROC_KCORE bool config HAVE_IMA_KEXEC