From patchwork Fri Sep 8 03:16:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 112005 Delivered-To: patch@linaro.org Received: by 10.140.94.239 with SMTP id g102csp940023qge; Thu, 7 Sep 2017 20:15:49 -0700 (PDT) X-Received: by 10.99.144.68 with SMTP id a65mr1642214pge.429.1504840549202; Thu, 07 Sep 2017 20:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504840549; cv=none; d=google.com; s=arc-20160816; b=vq7xrdRnT6SlOXlkeKOwUfX/wbp8gyyHkpSwYbmS8skusZoMJxRWVjHTwFnj82B9Yc +T7GZrER6zEVqQimZ7S4AUJT0CvKIoY1tk0wV0o82DlIECeUy7WpS2xHCrQLjzW4DiPH w/mmfagcHu+BcY+jTjHip2AaGowCjb5NulmDjxUhv0v4l8f7qp0B0RmrsauZcHi1zqOz 4jREeFDZmGjwSPuRsdhmHzPwyyNFlKwn4ZMEkVS11bRJaekY367UN+Ol0JtpCnskZ+R8 MWNcXRHIEG1+aSFphui4SoTRC2XTkr9vim5ts8CPs2NbCQ/tppkPdcKuUJmuP7xGNipD YWmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=KqX0BsMbS9Cv2qoFihcQ2IXSLBOMtvB0eXUfuPBhk9o=; b=gUlMSibgNIMgdF34yE/ntoNaY1PyfWzs/fOFn1gl+i56VXTUpJjB9s9eQ8MbXwg86O T4NnTzHbTROjKl48cC1tytW1Wj9BQMXypcOp4hs5U7rTVrvZx5h0KTromV0rEBXe4fXh vK4zUtPUdj83/PvGy0+Issabk1A88v6Ap6LJcHu4//c+X5Ic84A/bTvLfmqdYH5IXmQL H/StLupckFM22qeRQui5iOizf7FnqUzQePwSJ4UFiDdxbWDVzriio7L2XHCcZuSNU31I R6N6wR6NtOjjn2+jHLURRKEPJyDSF9CXqEpmHm4C1K8yG6+IyZeCRDsgKh78F/dY3+38 psmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WsL6K5GY; 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 9si854774ple.632.2017.09.07.20.15.48; Thu, 07 Sep 2017 20:15:49 -0700 (PDT) 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=WsL6K5GY; 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 S1754541AbdIHDPp (ORCPT + 26 others); Thu, 7 Sep 2017 23:15:45 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:38698 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753052AbdIHDPk (ORCPT ); Thu, 7 Sep 2017 23:15:40 -0400 Received: by mail-pg0-f49.google.com with SMTP id v66so2747285pgb.5 for ; Thu, 07 Sep 2017 20:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KqX0BsMbS9Cv2qoFihcQ2IXSLBOMtvB0eXUfuPBhk9o=; b=WsL6K5GYhcqPw5/PzWWQv/sGOMbhs8xkl0pC1WNDr6ffG91o76G8zmMbt7J2/5WAmm XUyoXBVezczLPdZVJMxQ1hiL++uZQNxx8g2HXur2oTGvYLHZs44p6hHKM5Rt9QfwnVid oryr9Gf3LUzYHuabYdf+CgfxazedGZyTvyPvk= 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:in-reply-to :references; bh=KqX0BsMbS9Cv2qoFihcQ2IXSLBOMtvB0eXUfuPBhk9o=; b=hEzxt7js4XPiRdw3MGyduwrqok4TF0nhUZWegCNGnzvbRnqTCfDBoGi0clJkKWtECG uylnJR1FAzyIVIDleR0hy20H615HzhV/5EeejyP5dwh71vfuE94tGxXqCYPlTGcTUXkD ER6DARSU2a+/rRHCfVe2ygyURcETvT85iXjPHnx/c2QzmsUjW6Ko+0kzKXksCcEG222n vtHXrIXZ47xL0jdTP5ZjSFKJQM42OBc3KWQCH+q6ZrYScrOqriQqun7Yq9tQ4fE6l7v6 dGznmF7agnxyR0FcvUJX8ttCxQ5QPCo0ca9pRtEy/1OXC7iARJH+YOkAMz7x4zpSUbku iH9Q== X-Gm-Message-State: AHPjjUja3oFfrTdKBTt9/FrqrZbJHQJiqgF8aE0Z/6XC2Bv/sAAz6t+t wZA0WjEfFuTM5bnp X-Google-Smtp-Source: ADKCNb4Z9912LTCIG9bF04xy0ym/55l+2lFlzgr6PqceV+QCLIwKVnVNpuagMuWdvBnAQUuPKnd3YQ== X-Received: by 10.84.216.69 with SMTP id f5mr1744544plj.212.1504840540347; Thu, 07 Sep 2017 20:15:40 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id b68sm1334670pfk.23.2017.09.07.20.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Sep 2017 20:15:39 -0700 (PDT) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com, bauerman@linux.vnet.ibm.com, dhowells@redhat.com, vgoyal@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, akpm@linux-foundation.org, mpe@ellerman.id.au, dyoung@redhat.com, bhe@redhat.com, arnd@arndb.de, ard.biesheuvel@linaro.org Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH 8/9] arm64: enable KEXEC_FILE config Date: Fri, 8 Sep 2017 12:16:15 +0900 Message-Id: <20170908031616.17916-9-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170908031616.17916-1-takahiro.akashi@linaro.org> References: <20170908031616.17916-1-takahiro.akashi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Modify arm64/Kconfig and Makefile to enable kexec_file_load support. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/Kconfig | 22 ++++++++++++++++++++++ arch/arm64/kernel/Makefile | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) -- 2.14.1 diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index dfd908630631..fa7299f08cc6 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -756,6 +756,28 @@ config KEXEC but it is independent of the system firmware. And like a reboot you can start any kernel with it, not just Linux. +config KEXEC_FILE + bool "kexec file based system call" + select KEXEC_CORE + select BUILD_BIN2C + ---help--- + This is new version of kexec system call. This system call is + file based and takes file descriptors as system call argument + for kernel and initramfs as opposed to list of segments as + accepted by previous system call. + + In addition to this option, you need to enable a specific type + of image support. + +config KEXEC_VERIFY_SIG + bool "Verify kernel signature during kexec_file_load() syscall" + depends on KEXEC_FILE + select SYSTEM_DATA_VERIFICATION + ---help--- + Select this option to verify a signature with loaded kernel + image. If configured, any attempt of loading a image without + valid signature will fail. + config CRASH_DUMP bool "Build kdump crash kernel" help diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 16e9f56b536a..5df003d6157c 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -48,7 +48,7 @@ arm64-obj-$(CONFIG_ARM64_ACPI_PARKING_PROTOCOL) += acpi_parking_protocol.o arm64-obj-$(CONFIG_PARAVIRT) += paravirt.o arm64-obj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o arm64-obj-$(CONFIG_HIBERNATION) += hibernate.o hibernate-asm.o -arm64-obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o \ +arm64-obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o \ cpu-reset.o arm64-obj-$(CONFIG_KEXEC_FILE) += machine_kexec_file.o arm64-obj-$(CONFIG_ARM64_RELOC_TEST) += arm64-reloc-test.o