From patchwork Thu Aug 24 08:18:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 110886 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5318035qge; Thu, 24 Aug 2017 01:21:45 -0700 (PDT) X-Received: by 10.98.7.68 with SMTP id b65mr1203780pfd.300.1503562905733; Thu, 24 Aug 2017 01:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503562905; cv=none; d=google.com; s=arc-20160816; b=oBT1Z+OhK4ds3KgpzKXRljKRQBuDfEeLYF3AQJQSubOF/AsSRvpPUlmd3/dwtKR+y2 S5YwXnHPj0mDcmjTExYKNfL9H3Mwlq2cvovYydHSmxP1XRU7fCKpcUhf7BtMpbT/8trk RVn8HYuSNXGVmcLix8FQ+5rGE5ATcdUzhpBd4ee3QseiMtLNMAOmXs8bUg98k8/YXwn1 a9frKXGOS4PaDLfZCilsR6li7THaDYmhmlGWWPAK80cIhkEU9Lv8BtEGyS9BGaDzHMPb QX4RNty+1TtGNFGE2d7yBgirySDN8WMaNpIWMLdGoi47v7skpogmenHxlIlicF4RV4+U 4gMg== 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=HrLA7tpjFuXpGS1Tanwppqlf3IonHvzSfSi0k3QziJw=; b=bwI8nW9y9fqAg8uGxB7wq5c9l/N/n6uieWUJEIZviZJhXcjfrqwYXeLqdgsfjEPSM+ cVRBcXpDFtRUiJ7TXkmoiNzKiP4dCxwzc+wxhRmZLKQvdRDpPL6cP+T9MVgxZOk9Xp4R Ooc8U81FfKmruBXZXuT3x80jeF11ejLvAyDMRf3nZk+ehLlF2d+VJsMK52AenOkGeNge SIl5CB2UPF/y5bF0OCxvtC06F0kpKWvkdRSp39GlW2duWu0iqsGBvotG7rE6015fLCBA YRMRBh/ioKw5pXX6Vej9WFhwYGUY6gTydp3FPRui9JRxvyad2lG2Rx8ym4P3oyg79xLv cHjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ozr1Sb98; 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 j23si2739677pli.275.2017.08.24.01.21.45; Thu, 24 Aug 2017 01:21:45 -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=Ozr1Sb98; 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 S1752463AbdHXIVn (ORCPT + 26 others); Thu, 24 Aug 2017 04:21:43 -0400 Received: from mail-pg0-f45.google.com ([74.125.83.45]:34021 "EHLO mail-pg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751815AbdHXITL (ORCPT ); Thu, 24 Aug 2017 04:19:11 -0400 Received: by mail-pg0-f45.google.com with SMTP id s14so13477933pgs.1 for ; Thu, 24 Aug 2017 01:19:11 -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=HrLA7tpjFuXpGS1Tanwppqlf3IonHvzSfSi0k3QziJw=; b=Ozr1Sb98op2s/U+xd1YKGyIob+AfcIHuSSx92oYaeH7yZ9VoshedPdze0bX1wchf7s EtgIaubvEgVAZnW1d7dIWdu+tULBsPMdHF0IYG79Miu/YZNiCyKzlsWDKDjW/Hf9A97/ RyjEdDlmm81kGT45lQmh7Fw/8PomnZwbZKgdE= 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=HrLA7tpjFuXpGS1Tanwppqlf3IonHvzSfSi0k3QziJw=; b=bgpSiajxKlb5BLb0DM2Em6rDP5FkQhGE0/K6Sx8A+QPFv+cg6ie4EfaJQH360V9oAX 27QS9lIS3aoUT3omr3GQ453QCvFEktgvAENaS5PDGTer5OPO5M5Z25nVzjVCJRGC1Llq 5yhjbAQWd/h3EiZW7ZzLkv2G9muGHt0dL3J62bZeBhG5xhwNnhqFk3IjFnuVOxhwwv/I oNsoEEKlxlxRZNr49oHRLshBEVImXYn90W9k0/QOwgmm+cZteZ9Yo/NmsawJ8vfRV/l2 gmFwmaBpf39ehRVZBNqQl6BC075El4Z+Hb47+uNthDWDfWTBhrfWffv6JFgihAdE4O+C 9VKQ== X-Gm-Message-State: AHYfb5hvZf4DPuVv2IvZdpJBa4AxVoWezCJcTRYVYGfelx1J3ndMXGJk gVdHr5r/1uSTRHQs X-Received: by 10.84.132.106 with SMTP id 97mr5960127ple.105.1503562750835; Thu, 24 Aug 2017 01:19:10 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id w66sm6420622pfi.63.2017.08.24.01.19.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 01:19:10 -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 12/14] arm64: enable KEXEC_FILE config Date: Thu, 24 Aug 2017 17:18:09 +0900 Message-Id: <20170824081811.19299-13-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170824081811.19299-1-takahiro.akashi@linaro.org> References: <20170824081811.19299-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..cf10bc720d9e 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. + +config KEXEC_VERIFY_SIG + bool "Verify kernel signature during kexec_file_load() syscall" + depends on KEXEC_FILE + select SYSTEM_DATA_VERIFICATION + ---help--- + This option makes kernel signature verification mandatory for + the kexec_file_load() syscall. + + In addition to that option, you need to enable signature + verification for the corresponding kernel image type being + loaded in order for this to work. + 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