Received: by 10.223.185.116 with SMTP id b49csp8281755wrg; Thu, 1 Mar 2018 21:57:21 -0800 (PST) X-Google-Smtp-Source: AG47ELvsaXsakDdfm5u3A33XcMWkoP8Bxol9ZrlWx2aAdH+qIckhUwMFkUscvlr/hoQ3iHakBlkG X-Received: by 2002:a17:902:6789:: with SMTP id g9-v6mr4307424plk.167.1519970240920; Thu, 01 Mar 2018 21:57:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519970240; cv=none; d=google.com; s=arc-20160816; b=rL19wFUVBJf698Nl7CgTA7BQ4S5H25NTlzQayp3+M7dAHEsfeZeBxxLPJ8pgegFWx8 4wb3uKjxURaZv1e8/GXNsQUbhAREXZQ4Rk3cHfhm9PQpY+dbKHbUCn3t5tbeoUyH3TtC Ysgtn8kYcQH5muyUd30v+jPP74gpiehIYeEoCJg0fCpbmsUsFSGjb8KSpYJhtiqfIc9H 6rz3nhoHS7fdiUSD/Bhnt9D6jzQF/XBVKg7wRVmjkR7CszlkZEYT8/1NarZJYBvrTq2K Era1eU1qhbJJgm6nWzlKnS8dPdOu/VjoC5TJqDnB8wyxnaB3jV20iRciaqAbWAsAx4SE X9lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=pC7XJhGS9IgoiHuAkFwSPPd/mGewjq+dbnPFJQqhCZw=; b=uzEr/i5QpYGHjwLDygIPD9/+X5+lqLK0/hGwcas0SrCL1hClSDDJIhXt7dqi9E8N9t I+eXpzHayJTN4Al+5uRCYbGIP6/iGq7MQ4TW5BHw4EMx8PZbSaaxbuMSSyepN1emmm3+ TI7Jdcsd07vECcCoxC93YLnNgbK6c09i2YfK4WHPKh9nWcSdaJ7Wsdu/5uuK0gjhumA/ cnVbZdJ50AR0+kRP6b3wzmXpZUEXTJ72VrxfX14qDDuCkrCUd3bHa8FBmFwVixzg6mSU BKTFs9Jje18GL21jWTTAFwRyUGrXvPKLYVxXubOjx1pDammhFWK/mOw6l6s2hQ78F6aB aXdw== 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 44-v6si4301842plb.70.2018.03.01.21.57.06; Thu, 01 Mar 2018 21:57:20 -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 S1753210AbeCBF4U (ORCPT + 99 others); Fri, 2 Mar 2018 00:56:20 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38688 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750750AbeCBF4S (ORCPT ); Fri, 2 Mar 2018 00:56:18 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45F6DE44B5; Fri, 2 Mar 2018 05:56:18 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-90.pek2.redhat.com [10.72.12.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A208B10B0F21; Fri, 2 Mar 2018 05:56:13 +0000 (UTC) Date: Fri, 2 Mar 2018 13:56:09 +0800 From: Dave Young To: AKASHI Takahiro Cc: vgoyal@redhat.com, bhe@redhat.com, mpe@ellerman.id.au, bauerman@linux.vnet.ibm.com, prudo@linux.vnet.ibm.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH 0/7] kexec_file: refactoring for other architecutres Message-ID: <20180302055609.GA15422@dhcp-128-65.nay.redhat.com> References: <20180227044814.24808-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180227044814.24808-1-takahiro.akashi@linaro.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 02 Mar 2018 05:56:18 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 02 Mar 2018 05:56:18 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dyoung@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi AKASHI, On 02/27/18 at 01:48pm, AKASHI Takahiro wrote: > subject: > > This is a preparatory patch set for adding kexec_file support on arm64. > > It was originally included in a arm64 patch set[1], but Philipp is also > working on their kexec_file support on s390[2] and some changes are now > conflicting. > > So these common part was extracted and put into a separate patch set for > better integration. What's more, my original patch#4 was split into a few > small chunks for easier review after Dave's comment. > > As such, the resulting code is basically identical with my original, and > the only difference is that kexec_file_loaders[] is now declared in kexec.h > after Phillipp's comment[3]. Other than that, this patch set doesn't > require any changes on the rest of my original patch set(#1, #6 to #13). > > Patch#1 allows making a use of purgatory optional, particularly useful > for arm64. > Patch#2 commonalizes arch_kexec_kernel_{image_probe, image_load, > verify_sig}() and arch_kimage_file_post_load_cleanup() across architectures. > Patch#3-#7 is also intended to generalize parse_elf64_headers(), along with > exclude_mem_range(), to be made best re-use of. > > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-February/561182.html > [2] http://lkml.iu.edu//hypermail/linux/kernel/1802.1/02596.html > [3] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-February/562041.html > > AKASHI Takahiro (7): > kexec_file: make an use of purgatory optional > kexec_file,x86,powerpc: factor out kexec_file_ops functions > x86: kexec_file: purge system-ram walking from prepare_elf64_headers() > x86: kexec_file: remove X86_64 dependency from prepare_elf64_headers() > x86: kexec_file: lift CRASH_MAX_RANGES limit on crash_mem buffer > x86: kexec_file: clean up prepare_elf64_headers() > kexec_file, x86: move re-factored code to generic side > > arch/powerpc/Kconfig | 3 + > arch/powerpc/include/asm/kexec.h | 2 +- > arch/powerpc/kernel/kexec_elf_64.c | 2 +- > arch/powerpc/kernel/machine_kexec_file_64.c | 39 +--- > arch/x86/Kconfig | 3 + > arch/x86/include/asm/kexec-bzimage64.h | 2 +- > arch/x86/kernel/crash.c | 332 +++++----------------------- > arch/x86/kernel/kexec-bzimage64.c | 2 +- > arch/x86/kernel/machine_kexec_64.c | 45 +--- > include/linux/kexec.h | 36 ++- > kernel/kexec_file.c | 236 +++++++++++++++++++- > 11 files changed, 336 insertions(+), 366 deletions(-) > > -- > 2.16.2 > Reviewed them with eyes and provided some comments, but since it changed the elf header code, I would like to do some basic vmcore related test with crash tools. Will response later. Overall the cleanups looks good, thank you a lot for the cleanups! Thanks Dave