From patchwork Tue Apr 14 02:51:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1270030 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=xiH9S7+/; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 491VQj3Qnhz9s71 for ; Tue, 14 Apr 2020 12:52:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6CFB081656; Tue, 14 Apr 2020 04:52:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="xiH9S7+/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5A2E481656; Tue, 14 Apr 2020 04:52:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AF7F281469 for ; Tue, 14 Apr 2020 04:52:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pj1-x1042.google.com with SMTP id o1so3785284pjs.4 for ; Mon, 13 Apr 2020 19:52:22 -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 :mime-version:content-transfer-encoding; bh=SIf054SS+BGBpefIvH+Iib1zi051VVq46HFn1JAxICM=; b=xiH9S7+/x3SAGnq001mu4mXpCe7CgzAgBs3s2SO/ctCYMEXCcNqx4YHzYovLHs0fXk QDlZVhpP92m6zDzZ4wetrXRS29c7X4hFp4czDet5/dJSHKO77tHBdCOTjvH5vKttUqUX I406Zfqr+EwK+N5okV2Kf5xxxLFduTSxErTHKGaSTU575JYI8zjx4dcOYmPQa23sZ0UX fN6IRdXFSB8PGdt10Cz57zu4F1TtnpqkExOsCm9FHbBcUMM+migdhD+W+m/7KQm57jsZ 4/zNaNIhd0f4zNFHra7IPNPlzlinbIoqWuB1UdZoWjKQP3daKT8hAOkwOpvb1x+vXaeo +PVg== 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:mime-version:content-transfer-encoding; bh=SIf054SS+BGBpefIvH+Iib1zi051VVq46HFn1JAxICM=; b=h3eSVra56NrffVvH0bMhLhP6uSd81PUvXM2TC+bw9ljiuWDSFa97wTgiBfIjl+UIHw kLxgH4A4uk4HKUsmieqekj868nJ+6EpIKkwli1sG48BEPotZy3GAHLEGHczsJZCgCVwp ZS8jL2OhLvXdyHJYG86zqB55RXNk6HZZd8Z17Df+srOGnNZmu7c6kcYXunxf0zMaDdRX YObOFOCgTM3zKJCnS02IwKBpPNp8sXYMNq9a7wOkKlyOXkw71K/3Pgzzr5SN6KfCzayl gMeCj6DFPUVC01SxAClV2OH0ZWYh7HsUnj1ptfxB4p5PVsQo24zSWxf/xOIMXyZ3s2lR 5HDA== X-Gm-Message-State: AGi0PubaXK1AbDSIOp/Cdj+I2b2k8YJuzQwP4XmPU+qsp0ASwS3Cp/Ox Ozu21NGLnrQPfeH9sr0Ib8jDKw== X-Google-Smtp-Source: APiQypLLcuJ/yvy6eL1BMcwl9AhtrvfQqQ/fiIDVvAn4/5E1CEJn6gtcqfqbDysl7ovwvmS/47JYeg== X-Received: by 2002:a17:902:8d8e:: with SMTP id v14mr19344024plo.186.1586832740842; Mon, 13 Apr 2020 19:52:20 -0700 (PDT) Received: from localhost.localdomain (p73a21dd7.tkyea130.ap.so-net.ne.jp. [115.162.29.215]) by smtp.gmail.com with ESMTPSA id mq6sm10686103pjb.38.2020.04.13.19.52.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 19:52:20 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, trini@konsulko.com Cc: sjg@chromium.org, ilias.apalodimas@linaro.org, mail@patrick-wildt.de, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v7 01/17] efi_loader: add CONFIG_EFI_SECURE_BOOT config option Date: Tue, 14 Apr 2020 11:51:38 +0900 Message-Id: <20200414025154.27283-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200414025154.27283-1-takahiro.akashi@linaro.org> References: <20200414025154.27283-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Under this configuration, UEFI secure boot support will be added in later patches. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/Kconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index 9890144d4161..71a0d003c914 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -145,4 +145,22 @@ config EFI_INITRD_FILESPEC help Full path of the initramfs file, e.g. mmc 0:2 initramfs.cpio.gz. +config EFI_SECURE_BOOT + bool "Enable EFI secure boot support" + depends on EFI_LOADER + select SHA256 + select RSA + select RSA_VERIFY_WITH_PKEY + select IMAGE_SIGN_INFO + select ASYMMETRIC_KEY_TYPE + select ASYMMETRIC_PUBLIC_KEY_SUBTYPE + select X509_CERTIFICATE_PARSER + select PKCS7_MESSAGE_PARSER + default n + help + Select this option to enable EFI secure boot support. + Once SecureBoot mode is enforced, any EFI binary can run only if + it is signed with a trusted key. To do that, you need to install, + at least, PK, KEK and db. + endif