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: 9943127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 452896034B for ; Fri, 8 Sep 2017 03:36:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3458C28389 for ; Fri, 8 Sep 2017 03:36:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 272D428396; Fri, 8 Sep 2017 03:36:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AAC8C28389 for ; Fri, 8 Sep 2017 03:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=M/9CWMyyGf8/s38Smegq3w4g2CxsBuPNy6zCqf/my18=; b=PpGpZRNeybd/comjqGmd2ma03G OYXTBs4zpS7UVDF74CMPVRHahBs+3YhFy51QJR+tFv7Lgm1oybm7aYsjVtH7Q3FizAZo9VDgRAamg CzNdxM3rZuxaq905wGeRJzHp0/YxF5NF3/PE7KXRUzRyMwykLJGC7Db19Jy+LqaveqiazzTC7FE2X L0k810NA2cyMbo8pPT484E/NF8LUG7sW88tcyGi2hARin/XOtyWx82iwy1zb6B4Gikk2CyQqEuiVo 0Gcn5zyuW/F6fUfvVfLpz4GK+uPdxlyNlJFya4vmySMWxdtMinmRIGyOC8tDC0ZY7rB6pc5eeZ/cJ kw8kkQbA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dqA5u-0007Gh-8l; Fri, 08 Sep 2017 03:36:38 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dqA5s-00076F-GP for linux-arm-kernel@bombadil.infradead.org; Fri, 08 Sep 2017 03:36:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KqX0BsMbS9Cv2qoFihcQ2IXSLBOMtvB0eXUfuPBhk9o=; b=sMe9670i/okRhRLjc+5KBN1k8 /4b7lYrO/0E7+FvILEzF+C+k10gdXaicXRznvqONyfY3LOXd62nc/RBrc1M84durdkFnPoXdNKRhM Q6DK/3LC9hvsKkSJGTfOEoaHkxsKptt9fQMqLzlKkZtSCLtcyIlKZVWz5F3BbDNenufyalqIn6Wc5 f0Wy1i5Tl8+pM/fktQQre8NDnf6PHcQTtTGq6TC7ky69jhGcuvfGsKqxea40ubMgZg12XPXF2VZ6K M5mEphZZH+UUaHzK1gyCCDsBWdBaNxvPuyxFUbGvwnI6VVijVJ/bCmst2RnfN4L9faKx8RPW35G/k mIRPP7WHg==; Received: from mail-pg0-x231.google.com ([2607:f8b0:400e:c05::231]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dq9lz-00019w-Am for linux-arm-kernel@lists.infradead.org; Fri, 08 Sep 2017 03:16:06 +0000 Received: by mail-pg0-x231.google.com with SMTP id v66so2747286pgb.5 for ; Thu, 07 Sep 2017 20:15:42 -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=O9d85VokKfX2mrPOqlQryV2d2jI/d3PP/rMah38UI3h2Ug6oATyk5mSpBl1aiObFg3 Gj+9/CEf2ncVxAJXlF2cLcG7YK2W/QvtRNqP7dk527bXhBQ2L4dR4eA5LhsjSh23kFfd 38A0s2h1O5dzbgnQtKrdE8D0hK+Je5vR9PQHBWGhVkF/FV6+ZyD3CURXNWT+fgMf18S/ bLWufQ5ruRZfYjtok0NWjzbPAwuRAYGmoWPpEQ7AHMBWmZpbFazx1fBZlLMdeXS1kbRO XNtcymr4yE+UuUDxiXeUzbR99M7hoIqeegguYoZduPFWCN6XD997Irn12rzj1fQuO4qH VrLw== X-Gm-Message-State: AHPjjUjUvftRWzJvNUTy+Titbg7QPKik0BqK/nRxYM0Ewvpaae4tjeCR oP9D8MGMPWZ/cgQX 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170908_041603_526599_E68187A0 X-CRM114-Status: GOOD ( 14.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: AKASHI Takahiro , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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