Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2912692rwl; Thu, 13 Apr 2023 12:42:44 -0700 (PDT) X-Google-Smtp-Source: AKy350ZmCpQPR7aQ/JHZVV3ss20k9Or2Vr4BR0YjobTEGWhxHsbmeSUV0J/JoBsba6MwXBxbfEpG X-Received: by 2002:a17:902:c18b:b0:1a6:4f67:970 with SMTP id d11-20020a170902c18b00b001a64f670970mr56220pld.55.1681414964672; Thu, 13 Apr 2023 12:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681414964; cv=none; d=google.com; s=arc-20160816; b=aIT7u918l/sFtVWOyR5YtFbDve+zEMyzCJqxw/j8q+u5HvjXZRKtUWdq2u5ps+PP9t a7sQd/9NFtf9rbHG9fz0DCaNIfgisbD/BlPx8TLmfXn7lxsmrGpAp+V/YIcoMym4Wdst dMCNZoV9LfX/6WoJpZfCjPVVJxcMiTfxIIqcLJ6z3JT3HgKIddjE2aAPHXrqDXxi6fKo x6A6h/p3TBwn0IFpXswCHn7Z/kS6IgH8y/XLTD5GuijnZDtG3sljbT7mpqCc87P6oWHs 6IljQsOLTalw/LTohuMXBDaVA5Kczpw2UytmcTi9HDCkFXpyfJZ+U5AhaJOETuzIVGGa 0Inw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=k/owY4mvJye7p0v+ne1bcGdPR7zZGvCD2rKYaG4godE=; b=BX6VM2D0k6Ok4gvvUQewUW7BdzTrt2nkvGT9qHf1iNgyCHi5dHCE0VaPgmsBC9Ojim hwI+yivnnNija/qrt9Fk2MfzLgUdSA/YUqsf5W149slaUUIAe1l3aeIVbGGk1+88sZXV TacoXCGANbF81SMb7AtQxHcHk1Sx/rgNQRxtyqsxOm4DfW8X3qxqbteTgUL6qc5oixDc o0KGR9yEpG6Ye/Ayscq67Z2i7ML6kUeefdspyXqEWrmxaP6sbI2yFjLqGelxleNp1jVr OTgPXfVRBdMqiGqc2iIaS+p6b+clOVmFqiOXOLsP6ybs/5l7zEuq2Sgp34YwshdGauk5 TZ8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=Ke4xzhCw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=raspberrypi.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k64-20020a638443000000b0051b53285341si1850619pgd.277.2023.04.13.12.42.30; Thu, 13 Apr 2023 12:42:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=Ke4xzhCw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=raspberrypi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbjDMT26 (ORCPT + 99 others); Thu, 13 Apr 2023 15:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjDMT25 (ORCPT ); Thu, 13 Apr 2023 15:28:57 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5186A2 for ; Thu, 13 Apr 2023 12:28:55 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id bs70so7945778pgb.5 for ; Thu, 13 Apr 2023 12:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1681414135; x=1684006135; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=k/owY4mvJye7p0v+ne1bcGdPR7zZGvCD2rKYaG4godE=; b=Ke4xzhCwH3sUAprbBW59xNAypk0Fk1toJ1iQKBdNYbUFTS5XDMc1gET/Fg0DoMsB/V jqPxWPYgVVI9P2Ga9B5cpUdNM3SXTm22pU3dRBoA5cDHytQbWzbB018KOWQprE7vL2PA Fs8G7iqv0ojRtUrKzOlvMw1df3CTZmFAh394vpsVvh6NKZLSSeMrniQbNkEDbPF5NHwm cQIy1+r5n5mOP7U+xqFxiKyk/6jxJqo5mqtOKuQSVj0wUIYft5WbaepZIe2iYZRcudAo tUu3Usejx5dQkgXut8J3kAc2938Fi8DFig2DZmSkeEg1OcSLRjOrE9hCwenjFB9RrWlm cTSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681414135; x=1684006135; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=k/owY4mvJye7p0v+ne1bcGdPR7zZGvCD2rKYaG4godE=; b=MnQCA3F3Azs08MI+opztqo8hCpSDHGxHtLwKh9YwOSthpOcYF9+cjPMRyL3HvjrvVZ hyd2GhZAIITOaYnxqyIdbikiEbr3A010vGIF3kNk9mNRWwVOuo/mfpdTJU2kUDOrBN0v 7hwz6wsufIkOFMYHieNYugeSU4XqjDZcf2UkHpEsMA/o2SimgvBLXMKsI4yimiKAq/qL 4OE4mkmIzqdr7Gy3Hb9r5Aie01dvk1lYNBXiJEHNoxFss03XXtlD18MsNgYB2O/GbXVy /vaJbqtvKnjGjgzjxHOki/0MkIjxB2tmWJRdhdTGgxE/vqiHOaHYFZHmrulKPQSN9o8E zL6g== X-Gm-Message-State: AAQBX9dkPnyztp6rVKnH9GsRDyOpsSdgrit4YyZ6OgjxlKzpQaM0qLq5 oFzEcjM90gwOvp5rvD76VP9m+clCunow300CoNTWTg== X-Received: by 2002:a65:6289:0:b0:513:a24c:f45a with SMTP id f9-20020a656289000000b00513a24cf45amr25095pgv.11.1681414135164; Thu, 13 Apr 2023 12:28:55 -0700 (PDT) MIME-Version: 1.0 References: <20230413085206.149730-1-iivanov@suse.de> <20230413085206.149730-3-iivanov@suse.de> <9b03551a-278d-16dc-08ed-1ef0f89dc79c@i2se.com> <9de62851-73a6-0070-4e64-94b6614c11fd@i2se.com> In-Reply-To: <9de62851-73a6-0070-4e64-94b6614c11fd@i2se.com> From: Tim Gover Date: Thu, 13 Apr 2023 20:28:43 +0100 Message-ID: Subject: Re: [PATCH v2 2/2] ARM: dts: Add nvmem node for BCM2711 bootloader public key To: Stefan Wahren Cc: "Ivan T. Ivanov" , Nicolas Saenz Julienne , Srinivas Kandagatla , Florian Fainelli , Phil Elwell , linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 13 Apr 2023 at 19:44, Stefan Wahren wrote: > > Hi Ivan, > > Am 13.04.23 um 20:18 schrieb Ivan T. Ivanov: > > On 04-13 18:15, Stefan Wahren wrote: > >> > >> Hi Ivan, > >> > >> Am 13.04.23 um 10:52 schrieb Ivan T. Ivanov: > >>> From: Tim Gover > >>> > >>> Make a copy of the bootloader secure-boot public key available to the OS > >>> via an nvmem node. The placement information is populated by the > >>> Raspberry Pi firmware if a public key is present in the BCM2711 > >>> bootloader EEPROM. > >> > >> It would be nice to have a helpful link like: > >> https://www.raspberrypi.com/documentation/computers/configuration.html#nvmem-nodes > > > > Yep, make sense. > > > >>> + > >>> + /* > >>> + * RPi4 will copy the binary public key blob (if present) from the bootloader > >>> + * into memory for use by the OS. > >>> + */ > >>> + blpubkey: nvram@1 { > >>> + compatible = "raspberrypi,bootloader-public-key", "nvmem-rmem"; > >> > >> Yes this looks better, but this introduce a new dtbs_check issue. The new > > > > Oops, yes, I forgot to make this check. > > > >> compatible must be documented in > >> Documentation/devicetree/bindings/nvmem/rmem.yaml in a separate patch and > >> reviewed by the DT guys. > > > > Or I can drop the new compatible string altogether? It looks like > > only alias is strictly required?! Tim Gover is this correct? > > i cannot speak for the firmware side, but i think we should try to keep > it compatible with the vendor DTB here. > The firmware doesn't look at the compatible string. It locates the nodes to update using the 'blconfig' and 'blpubkey' aliases. Userspace scripts (including the documentation example) should also use these aliases. Therefore, I don't think it matters if the compatible strings is modified, but I won't pretend to know what the correct DT style is here :) Tim