From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22A1BC07E95 for ; Tue, 20 Jul 2021 18:50:59 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68D2861009 for ; Tue, 20 Jul 2021 18:50:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68D2861009 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9C44A82DF7; Tue, 20 Jul 2021 20:50:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ohqoLkjm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A849182DFB; Tue, 20 Jul 2021 20:50:48 +0200 (CEST) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 BCAC282959 for ; Tue, 20 Jul 2021 20:50:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-wm1-x336.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso2061929wmh.4 for ; Tue, 20 Jul 2021 11:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v0PPZD8OYtUAjr5h64NgRLeaZrViUv7WX2BGPohsz4g=; b=ohqoLkjmn/azoVBSaQh/aovsEv9nllz2O/dSg4ndrw0V02XIcNJm0aUteqrTXWgm/f yslZBil0XLaecNZ4eBf5ZY2HiPNQrM5vSo0sH4Lh8+oJWKg5+ThE4oUxQx/hdt9g0vv7 a4Kry7xjli8KmuJ12eEi4PWZD5yKErUYvosv4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v0PPZD8OYtUAjr5h64NgRLeaZrViUv7WX2BGPohsz4g=; b=MhaBvy6cllCUUBMFW2W7QElIXr1hvrgHLJCXCWyDU48aa7EBwLp9emU/6IbPy0vdZj bDeSZrQ6JKTu2trPMHEusN52Tztz3WsVopBadEheKw4QfGpbMpQcGrgiMINgLzC7BKL6 G6Ag/gIdStXKxX5U9ZMkGh79d76XhpB1tv2TD8dB+zfxxNq7mbnww5hnIO3rqWsNH3Gi rv+O81SVDf6gnsLmTYsuZB6Ci1CX7LRCOWfA7PB5z1/YbMpr8wKjbAZX3owsUykJMZTY V/VTlwB4UlYB2pGR4lCbmlJ68q/TvgHEq9VdzeNIqI8GHZ+pMEkqSIMGn8z/4HRuOnn5 Y08Q== X-Gm-Message-State: AOAM531Evc7rTGzYJ9uj9lZLR20aedi4/80PHoE58CJQav1t2C1WK2Fc eHyq7CeqhEtOaMerSJLON/9TqSLA2btXJngjZUlymw== X-Google-Smtp-Source: ABdhPJwRWSMhDAHk8I8rUP3woRbmFWQzwjHAKuinqyqT8Ftt9fxSmLMH7eoRnMO9eIPpE+IPfN2Dy3NdvzSc1FyYCTc= X-Received: by 2002:a7b:ca43:: with SMTP id m3mr33131657wml.74.1626807043012; Tue, 20 Jul 2021 11:50:43 -0700 (PDT) MIME-Version: 1.0 References: <20210715170030.97758-1-ilias.apalodimas@linaro.org> <20210715170030.97758-2-ilias.apalodimas@linaro.org> In-Reply-To: From: Simon Glass Date: Tue, 20 Jul 2021 12:50:31 -0600 Message-ID: Subject: Re: [PATCH 2/3] mkeficapsule: Remove dtb related options To: Ilias Apalodimas Cc: Heinrich Schuchardt , Masami Hiramatsu , AKASHI Takahiro , Alexander Graf , Sughosh Ganu , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Hi Ilias, On Tue, 20 Jul 2021 at 12:43, Ilias Apalodimas wrote: > > On Tue, 20 Jul 2021 at 21:33, Simon Glass wrote: > > > > Hi Ilias, > > > > On Sat, 17 Jul 2021 at 01:24, Ilias Apalodimas > > wrote: > > > > > > On Fri, Jul 16, 2021 at 08:03:23AM -0600, Simon Glass wrote: > > > > Hi Ilias, > > > > > > > > On Thu, 15 Jul 2021 at 11:00, Ilias Apalodimas > > > > wrote: > > > > > > > > > > commit 322c813f4bec ("mkeficapsule: Add support for embedding public key in a dtb") > > > > > added a bunch of options enabling the addition of the capsule public key > > > > > in a dtb. Since now we embeded the key in U-Boot's .rodata we don't this > > > > > this functionality anymore > > > > > > > > > > Signed-off-by: Ilias Apalodimas > > > > > --- > > > > > tools/mkeficapsule.c | 226 ++----------------------------------------- > > > > > 1 file changed, 7 insertions(+), 219 deletions(-) > > > > > > > > Here again I see EFI diverging from the impl in U-Boot. WIth U-Boot > > > > you can add the public key after the build step, e.g. in a key-signing > > > > server. With EFI and this change you will have to rebuild U-Boot (from > > > > source) every time you sign something. Seems like a pain. > > > > > > I don't see why either of this is a problem. You need the public key to > > > update the binary it self, so rebuilding from source is a prerequisite. > > > > Please can you have a look at binman and the concept of packaging > > separate from building? Rebuilding from source is definitely not > > needed to update a binary. > > Sure I'll take a look. We already have an mkeficapsule.c though, which > in theory could take care of the capsule signing. The point is that > we don't uses that key to sign anything, we use it to authenticate the > capsule that tries to update the firmware. That is not the key point IMO :-) FIT signing works the same way...it is the public key. So I fully understand that is how it works. > > > > > > > > > Apart from a signing server, you can also have special hardware that provides > > > the public key you need (which is not implemented yet). So this is the bare > > > minimum functionality you need for authenticated capsule updates. > > > > As discussed on the mailing list you have not included the motivation > > for this. > > To be fair, I did on patch 1/3. OK I see. Then I believe the motivation is misplaced / incorrect for reasons mentioned on IRC...you have bigger problems than just the key in the DT and you yourself mention the power of the command line if the user has access. > > > Now that I understand the motivation, which is to avoid > > someone changing the key at runtime, I believe that this change does > > not actually help...I've replied separately on the mailing list. > > It does help, but you need combined code which doesn't exist in either > case. Anyway, I'll reply on the other thread I still don't think this helps at all. Regards, Simon