From patchwork Sat Aug 26 09:06:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 717228 Delivered-To: patch@linaro.org Received: by 2002:a5d:688a:0:b0:317:ecd7:513f with SMTP id h10csp294683wru; Sat, 26 Aug 2023 02:07:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGzoOq9akgSFkAUUFIBUJf7GVGPITOEJHLJ5oPI3klDRC0LN7VJedd3aSchM+TdFqTvmV+9 X-Received: by 2002:a5d:560a:0:b0:31a:ed75:75d9 with SMTP id l10-20020a5d560a000000b0031aed7575d9mr14532357wrv.16.1693040851642; Sat, 26 Aug 2023 02:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693040851; cv=none; d=google.com; s=arc-20160816; b=T4lR/4m/2psBupiruvUesUWWbA//qcfuIVNWybukzDQnfKhqcTVEg/N7aBiqoZpdpa Eivry46s+Tzp+QwbiaNJm4GzsSNgxaLSt8IQ4BH2E/Kt55IMqNUKEjQ1L7pve+9i9wu2 YvXkygVFgEWiiQKWwxKo/yadtyF6wy1gDmwbibJnoHWO2hwMDMUnmSpPgisRYh/m3kns Kpy214q3GhLxJivjD58odEVIHW57xsvQggT6i5hRyFQdlVfGnI3mGvOHmzqQmirPKAf+ 6nieK8Z91MvAlxnJgWvMDwf3sQiE4+O883KB49CuW0S/c+7f0lplU/DtYX39r1C8cgGf xKOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=B+rL0+xAJ60yhJdDJLoNZVzfH6NxNbtZrRkx452T5CA=; fh=wxXZJCQRz/XgBTfKhuJFfNV+eZ/MzU8zncY23uTJ9bU=; b=biSKTfAMAEV71Y8eyQ3cI5FemeRZNuYYSLD01w5oiKOggEskNh8p9XIcZ0dYSw5YNb LKR/ayFhQrKr4GH5RpbV6icagQuvs8JXqMKZcHyhAms9/aSYuHIdRunoM9K6XJgVhkQu r7bc27cxIAKj7k4CSReb3st3Hhqsxr6kE3E3691UKZ43utnH3j5z8YyPlntCth9JihNr b0MonSwuuPoltniwQPACy1JuzuFiU5X+sLWpNcMoaV2FXfQHZwpxq5vEzZKrbYB2YMLt cUtscEBWPBomaEbgIw3i25f90a/R8Df844dZ09Hgk0wEsC4lum4ScK95VI2Y9ZUDLWyR npUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id l18-20020adff492000000b003176aed8c4asi1622750wro.187.2023.08.26.02.07.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Aug 2023 02:07:31 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7F29086B40; Sat, 26 Aug 2023 11:07:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 9093A86B37; Sat, 26 Aug 2023 11:07:10 +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=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id E882286B34 for ; Sat, 26 Aug 2023 11:07:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7BBB11FB; Sat, 26 Aug 2023 02:07:47 -0700 (PDT) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.46.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3C7293F740; Sat, 26 Aug 2023 02:07:05 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Tom Rini , Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Sughosh Ganu Subject: [RFC PATCH 3/5] capsule: Add the capsule-key property for removal from devicetree Date: Sat, 26 Aug 2023 14:36:31 +0530 Message-Id: <20230826090633.239342-4-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230826090633.239342-1-sughosh.ganu@linaro.org> References: <20230826090633.239342-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean The capsule-key property contains the public key in the form of an EFI Signature List(ESL) structure. This property is relevant only in U-Boot, and is not to be passed to the OS. Register for purging this property from the devicetree, before passing it to the OS. Signed-off-by: Sughosh Ganu --- lib/efi_loader/efi_capsule.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index af8a2ee940..5c6c87458f 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -9,6 +9,7 @@ #define LOG_CATEGORY LOGC_EFI #include +#include #include #include #include @@ -403,6 +404,12 @@ out: return status; } + +DT_NON_COMPLIANT_PURGE(capsule_key) = { + .node_path = "/signature", + .prop = "capsule-key", +}; + #endif /* CONFIG_EFI_CAPSULE_AUTHENTICATE */ static __maybe_unused bool fwu_empty_capsule(struct efi_capsule_header *capsule)