From patchwork Wed Feb 26 04:54:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1244655 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=DTHZ33uT; 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 48S3Py2LMHz9sRJ for ; Wed, 26 Feb 2020 15:55:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8D24C80E45; Wed, 26 Feb 2020 05:54:56 +0100 (CET) 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="DTHZ33uT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4D2B80D3F; Wed, 26 Feb 2020 05:54:52 +0100 (CET) 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-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (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 3D16D8089D for ; Wed, 26 Feb 2020 05:54:47 +0100 (CET) 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-pg1-x543.google.com with SMTP id h8so676065pgs.9 for ; Tue, 25 Feb 2020 20:54:47 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=s71DxYooTwaNTgxJRZh4xuFP1Jq+Er00vKzcYIanQNI=; b=DTHZ33uT/sEh8tZiNNAWHpMd+meCdbO7KRgTGPMJPFN+ctH48m7/YLN3HGYXiWnqtM SUaQwVb6wlQmwFqVsg+o29nlyO6QlCjsZBbvZJv9gvMtEdCLE8vgBSWKriPwzHtuHnjd 1s+j+wgerHkL+Yz/0oeJVRnMZwY3A7ITbIuCisUC8/LdIh0NEF7PPis/kSsJzd6qzJ/y UzgxPrVg/vcbbr9/aKlQ5rmg6I2WP8AVPzpKIYumx8FhqZTzY2HQtKWTTjrkD2GI6scl XdM7QVrv7iubMqWQuhz2Ca2QfxikKzxRZ6c8dA5N7Ca3X/JV3MW2g5RGn8vDpuqCZoVB g4nA== 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=s71DxYooTwaNTgxJRZh4xuFP1Jq+Er00vKzcYIanQNI=; b=af2ebBg5Fl8vTHZ280Eexm9m/oBDQrrCSx5/2TsiMkToEvpiI8Uv1Hsm1u1hd2lv7v UgIp4hZotWKtA5cHgoUYYtE0vDYJ1W8dpoaP0ZwXblToVvdHkvgF8fDUxekOOg59vNPn rqPfIt2zF5P46XUE0l3egFcvyXIRGubNCdnemKfUPVMl1z+WOpYNVLyqI7a24HGM6UIc G7K37IvesZlP+iFokHS8Db3TbZYdSJVv3ooJQVuXvEVtj4t4qqEnop4pWfh6ATg5pmBA X3DYh2d/uWpFcEjPy7QgjWJGerMQ9Cx8L1RgOBLmH1ww2zfVNdZzi/UZKCjGc/dnHH4W xmXA== X-Gm-Message-State: APjAAAVPJTfOL1HuWObRRk4C/+z60v/PoQ3TYpXY41/PicF5qXO4jJrS oGSGp2iGcBDzZ2cR6n6Ez86oEQ== X-Google-Smtp-Source: APXvYqwB3D8PR+ArKEyoHygk8imtrAZKeBbbISjlHZS2CClpSJcTVvsvP8YbvnZ8Vo23ylxprvre9w== X-Received: by 2002:a65:4647:: with SMTP id k7mr1987438pgr.11.1582692885348; Tue, 25 Feb 2020 20:54:45 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id w11sm689034pgh.5.2020.02.25.20.54.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 20:54:44 -0800 (PST) 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 v6 01/16] efi_loader: add CONFIG_EFI_SECURE_BOOT config option Date: Wed, 26 Feb 2020 13:54:33 +0900 Message-Id: <20200226045448.2453-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200226045448.2453-1-takahiro.akashi@linaro.org> References: <20200226045448.2453-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 a7afa3f29e88..4b09a07f1b0a 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -130,4 +130,22 @@ config EFI_RNG_PROTOCOL "Support for EFI_RNG_PROTOCOL implementation. Uses the rng device on the platform" +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