Received: by 10.223.185.82 with SMTP id b18csp218852wrg; Thu, 8 Mar 2018 23:19:23 -0800 (PST) X-Google-Smtp-Source: AG47ELtk3DMbtdibTFOn4AKZZ3exPkCUhZOedCqw9uH461sUQCAKSg01LHLW7SFLIS5IVUy4pIxn X-Received: by 10.98.19.146 with SMTP id 18mr29274268pft.3.1520579963420; Thu, 08 Mar 2018 23:19:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520579963; cv=none; d=google.com; s=arc-20160816; b=FbQ/xBI1ClVFCQE8Es3o5a+y+v4iGozIiYZUebeR+gjHjBi7QtwbtExZ7ja8vn5F7V 54SLfXV/Ej1z/OpElkNK6+u9l/HXGuqIpyix+pupi3IINsERZGGFDhpPUPhx+EUeAgFg LCaD3oPaHWW1xaX33iHPa2ueCW8u70b8lIZk8SruoUSXzjXoSx7Zn4bnlkxdXhQ682BO 2gLZK2+r1TRgSpQoCZLhrAJe7FMf8aMLRML09xB9GqDPPq7gXea//V8yOK9KNxDlGzpR ek7CZN23ik3hBg5J9/ZvWfCTcwxADMbpfoZXZsXYLE08yuIiHN02B11v0IIHKBJfDy0M 0cww== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=eRzhyWP/1pdsnJbZ+NL5jn+FlbpXTWbwEIbxteokg+M=; b=RexMq899AdiZfSSNAUQF9tYQczF0fNuH/OtjWITLM77xKT55lWzO4kOfZxRQPbcq/a MuNMsez3OrWpdF81XwMnYWj9AycpHWd/Xnx4LdpE2q5GlSk5z1+Q1mzIT5UKWvjjIik/ Uu9yx6GeYB8TLZS8q2mT+Cm40BD7RoXk8qR5TnvVObMZ/DLlEKd0K/jrAbeVY9wuqymG SeNI2X/HqBawFhLuwZRvoskcZw/3ZbXotdZd/vTuNn3kWPRiHeT3RLI1z09UTi6G76wu fRdI7HUi0UWAee+O3MtSmy4f7/k74/NCAa9836TiPGRa43837peBHHNcoWP4DtvcqLUV pSaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FpGdDtZe; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 79si327347pga.647.2018.03.08.23.19.07; Thu, 08 Mar 2018 23:19:23 -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; dkim=pass header.i=@linaro.org header.s=google header.b=FpGdDtZe; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751254AbeCIHR4 (ORCPT + 99 others); Fri, 9 Mar 2018 02:17:56 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:52748 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751113AbeCIHRy (ORCPT ); Fri, 9 Mar 2018 02:17:54 -0500 Received: by mail-it0-f66.google.com with SMTP id k135so1674788ite.2 for ; Thu, 08 Mar 2018 23:17:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=eRzhyWP/1pdsnJbZ+NL5jn+FlbpXTWbwEIbxteokg+M=; b=FpGdDtZeMNqMeCLDnowvyDglafA2ytDgOLFer7d6SOa5ZVBiDLUV38i672HoWhFhom t2jaVa4lehMVB+BMe3N0jl04NWZsRcCKQg8u4nChqEveGWKy8nMQ+hR/+1c2DlVe6H4Z zlq1BMRtPiO/n84fBxraNHdjlgNL8mSG8momM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=eRzhyWP/1pdsnJbZ+NL5jn+FlbpXTWbwEIbxteokg+M=; b=P2X1uxb4k0Ry767RY5F7dv4KtCuQ0zHKAJdntqIPCb57NbSWEgWhMjQBDmcLqFAb82 JXvZgBf0zaGpNt+wLiYaGGupN7CbSeWJDvTAeiwTSZuYjobtGcFzr5dcKvdz7GVwIyb7 m1fmGNOuN+ypkphH1y+LNImH0r7r11hI/2MjFSaXrepvK9RCVNy+3yTsSOj+JOaYXo8/ o1FMVp972bu2Zr9L/WZljDbEWQUZDj0mHeft+B5kL5ybaUD8dgBwvfz4aa17zw2O4bYD kMPaBww4wUs39Hv21YPhUz/iGVFCvXHtMI/MLuCdBa6GyJWW8LOEVknl4jmyNjrn9MMD QUSA== X-Gm-Message-State: AElRT7EWZK37Wdrl5jiCxjwqZ7/prpZ4X/rtPQwqttFt1V7QttsNSaZ2 YO2Beyuy4+4WegYfC5PdqCmsbQ== X-Received: by 10.36.73.141 with SMTP id e13mr2082847itd.19.1520579874229; Thu, 08 Mar 2018 23:17:54 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id z17sm371231ioe.63.2018.03.08.23.17.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 23:17:53 -0800 (PST) Date: Fri, 9 Mar 2018 16:18:14 +0900 From: AKASHI Takahiro To: Dave Young 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, akpm@linux-foundation.org Subject: Re: [PATCH v2 0/7] kexec_file, x86, powerpc: refactoring for other architecutres Message-ID: <20180309071813.GE25863@linaro.org> Mail-Followup-To: AKASHI Takahiro , Dave Young , 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, akpm@linux-foundation.org References: <20180306102303.9063-1-takahiro.akashi@linaro.org> <20180308010502.GA2600@dhcp-128-65.nay.redhat.com> <20180309060254.GA9728@dhcp-128-65.nay.redhat.com> <20180309064412.GA5327@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180309064412.GA5327@dhcp-128-65.nay.redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dave, On Fri, Mar 09, 2018 at 02:44:12PM +0800, Dave Young wrote: > On 03/09/18 at 02:02pm, Dave Young wrote: > > On 03/08/18 at 09:05am, Dave Young wrote: > > > [Cc Andrew] > > > > > > On 03/06/18 at 07:22pm, AKASHI Takahiro wrote: > > > > 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 parts were 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 *visible* differences are: > > > > * renamings of _kexec_kernel_image_probe() and > > > > _kimage_file_post_load_cleanup() > > > > * change one of types of arguments at prepare_elf64_headers() > > > > Those, unfortunately, require a couple of trivial changes on the rest > > > > (#1, #6 to #13) of my arm64 kexec_file patch set[1]. > > > > > > > > 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 > > > > > > > > > > > > Changes in v2 (Mar 6, 2018) > > > > * use IS_ENABLED() instead of #ifdef's in kexec_calculate_store_digests() > > > > * rename _kexec_kernel_*() and make them static for now except for > > > > kexec_image_probe_default() which is actually used by arch(powerpc) code > > > > (Note: kexec_image_post_load_cleanup_default() will also be exported by > > > > arm64 patches.) > > > > * change a type of kernel_map in prepare_elf64_headers() to "int" > > > > * check for a total number of system ram regions in full_up_crash_elf_data() > > > > and use vzalloc() instead of vmalloc() > > > > > > > > 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 | 334 ++++++---------------------- > > > > arch/x86/kernel/kexec-bzimage64.c | 2 +- > > > > arch/x86/kernel/machine_kexec_64.c | 45 +--- > > > > include/linux/kexec.h | 32 ++- > > > > kernel/kexec_file.c | 240 +++++++++++++++++++- > > > > 11 files changed, 338 insertions(+), 366 deletions(-) > > > > > > > > -- > > > > 2.16.2 > > > > > > > > > > AKASHI, thanks for another update, looks good to me: > > > > > > Acked-by: Dave Young > > > > Hold on the ack, during today's tests kexec kernel can not boot, it > > hangs early. Will see if it is caused by this series and come back > > later. > > AKASHI, it seems the first patch causes the hang, can you take a look? Sure, but can you first tell me specifics about what you have observed? Thanks, -Takahiro AKASHI > > > > > > > > Thanks > > > Dave > > > > Thanks > > Dave