Received: by 10.223.185.116 with SMTP id b49csp4537419wrg; Mon, 26 Feb 2018 20:56:56 -0800 (PST) X-Google-Smtp-Source: AH8x2253MkAPVpaZoPJPsJiHgufg7PiYFVvFBfM1AKVZsCL6ORm8PqpB/IPpGTRq2iRkthEBzx6k X-Received: by 10.98.23.136 with SMTP id 130mr12816573pfx.43.1519707416215; Mon, 26 Feb 2018 20:56:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519707416; cv=none; d=google.com; s=arc-20160816; b=RIS4OBaVAdkXtmcy69eqK6jsaYcWzymYEZ2Ztqat5zlYq45K5eSdOymQ9eVhhhO8Yj U/a9B9Vu2anE3CqixAG8Z29SVIjzS7NmYJ9d8itvjqlg9kuXfR+8bPin3UQbBia7/uJ/ diPuOGop7Z5sm67OrOmtlfFeo8wygac/yootQ/WuzPkYfxNTr7KhEzIIKphh90Cb0xOg vGnV6DgDBxJlmFQnFoF1eAg2LU0oqXwQPiktBM53Dnf/STp+FiHXAeAT+Tnny48fYKgj r8jIMhfMXyY3mrO1Ak9sQUGbUg485m5NmPhI+Xwgf+Phi1YVru/OdESgyerdknGQY5CX FBVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=W9+hVVkDuVR4fEHwdM/ELfjEBSXWSZO0bisT/O/SVI4=; b=xcCh31oLnsoOCK2Qmkgf8Cph23m3TrziVDuGTPkq4hhTyE7/giGgd+6pkzG/mOiEI6 r8pJbXtQmymWcqz5Pa20PcSUe4JfFuTVWWhseLC3TbknUODHo95x2tPqXuGD/LcrF9pQ 3ShiUZNn8cFKkzPlq3F+jBmlUUmIeRh8OqyqA9l2VQ2GX+EVWAJ1qRsArCcbZSoCUi5n f1PHLhX19Np5AiMkmsESV+3NciUkfO6DurXsLkcrOtzIE88WSavrqY+rnz+pVYJ3M5lT kf08mhxWzj3g6wtuaX1zhQVFA1ntXQ7PjWxYzxKnRA4lAaNbxZ1eSDiKHE68miS1qZDD acoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eZToXM/O; 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 94-v6si7960194ple.298.2018.02.26.20.56.41; Mon, 26 Feb 2018 20:56:56 -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=eZToXM/O; 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 S1751937AbeB0Esb (ORCPT + 99 others); Mon, 26 Feb 2018 23:48:31 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:43352 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbeB0Es3 (ORCPT ); Mon, 26 Feb 2018 23:48:29 -0500 Received: by mail-pg0-f65.google.com with SMTP id e9so2773283pgs.10 for ; Mon, 26 Feb 2018 20:48:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=W9+hVVkDuVR4fEHwdM/ELfjEBSXWSZO0bisT/O/SVI4=; b=eZToXM/O/VFuyXhEcqB7S0meuXUrIBQ7RrP7Epmt38Gif9eYYAtfyBYXeHI1KtKNuc w4F7NmDUEXIBdWkmnk+wh3sNFp0sHts4R4XPT8IoK8aQ732sOqZZ1oQN/PKxDtyzczUK T2GCL//LIfzbqLncLYAkWpE7zTMnnTGTxy+EQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=W9+hVVkDuVR4fEHwdM/ELfjEBSXWSZO0bisT/O/SVI4=; b=PikRlLK2ledg6fKPvYuEFJcGZQcDKpTGIrC9RxbaIU52Jk/04Ws60EHkp3dENV6Uy6 TGpJNdHV1+KeyO/d0I6y+EzlCx1ExYQC/MRJb4N201IzR6sacv+myTRRWJ1njAR3xmyo Os0VfFfx/m4zt3scx/5my71dNPfsRnAVDbyRb6II99QTYxPtoPNACjt+Ilr2mdb83qpK fFx1CNFra2/MsCZL7CHMkL0i+hS8D6ZT3x9aSorNcUo/ZFnrtbFpAuUxQf0wABn9ETyW f7UxgMOHwbHQXi4yk/6STbQVbHX55wHoGzgvP2zDx7VDSWrpzrk9xaLUbAzBHHOP/yia SCtw== X-Gm-Message-State: APf1xPDZddycr5qJtQOr5Sq3sBIgEf/ej3sPQCD/43bNxQSI/WZM2JAi zUCi/bhFyTIGhO6xaLoa1Wi6Xw== X-Received: by 10.101.80.193 with SMTP id s1mr10250977pgp.254.1519706909229; Mon, 26 Feb 2018 20:48:29 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id n79sm22398692pfa.55.2018.02.26.20.48.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Feb 2018 20:48:28 -0800 (PST) From: AKASHI Takahiro To: dyoung@redhat.com, vgoyal@redhat.com, bhe@redhat.com, mpe@ellerman.id.au, bauerman@linux.vnet.ibm.com, prudo@linux.vnet.ibm.com Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, AKASHI Takahiro Subject: [PATCH 0/7] kexec_file: refactoring for other architecutres Date: Tue, 27 Feb 2018 13:48:07 +0900 Message-Id: <20180227044814.24808-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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