Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1070650rdh; Fri, 24 Nov 2023 04:49:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMeq/oqWx/eIG9M1mFK0EIp817Z8YWmrCWYKTjwLkkGuiu8CuUvmoUZe3N+KUo2luWSUTL X-Received: by 2002:a17:90b:4ac6:b0:280:1dca:f699 with SMTP id mh6-20020a17090b4ac600b002801dcaf699mr2478604pjb.42.1700830154293; Fri, 24 Nov 2023 04:49:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700830154; cv=none; d=google.com; s=arc-20160816; b=WpV1kY1/xkgih0JHdS7YrXQ9GMjaMYvOuMGXQUPxahddE4v/RZ3VDpVJuaGIxJPnZI znlNZ/h2jcBb/ui4ZIIpue/xaKL3OLcdZF1aoK+CcUHldH/J/RUjvfDoy3YLe1nxH3/G gApcv7qAXGJGt780N9m71EUa6pGEnPL2qxhO0Q6Yv7aMnxnWhP8JiMECsC/gsmrm8NBn mIfKfWOskaHlg96oQAG48+kS1IgPmRkkl289/6P+dBdr32K9SdnyXoeHBWi+jeloolIH ouSAA85uS+dMtY4WKj2F1aw+VwGzsv2+Nr9PKc1ozikEDMaobxYpM4uYIBuyhzLj2/zY 5DGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CiwFmmG7sk9ZZtAgRu6pkmIKS3nXWPdEt33O7fO+KMQ=; fh=07PKo6qmBAbqVwnBFK5EA0hxzSLORELb0j1K8tOFcx0=; b=YzgnFQcCHpZjfEJs7mqRSYznSMqJghLTWLiTNUf4jfTvyY/bPEOlW6lZXWkxZbyexf 6beKCTFg9hsGlUOUVAfIMpHR0uxhkFW1PYebWWic7cL1x9y6fbvcv1IYT5U4GOVFhaMF kYHrZ3TxSjSpJLnuSzu6jND4cpV4iyqQ5/bNGoI8yUNZ50VcJHWen0GU7Cy7qHqKkJWV iIVRUdnbUDHRs+2p/1xk9TI274RU1iJfQ832wwcIW5sHncw0PKXofW31Rl4JATb/VB9T jelw0XGSBuyZRIr/AyBHmxIrtLL4Owo3LIdhNJ27CZccB8YKuNz/FxJ0CxDDYGXk2rL/ rqEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LpqsmpXj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bx39-20020a056a02052700b005bd65d48d20si3835734pgb.560.2023.11.24.04.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 04:49:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LpqsmpXj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3326D80408C0; Fri, 24 Nov 2023 04:49:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230333AbjKXMtA (ORCPT + 99 others); Fri, 24 Nov 2023 07:49:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbjKXMs7 (ORCPT ); Fri, 24 Nov 2023 07:48:59 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7A1ACB for ; Fri, 24 Nov 2023 04:49:05 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97706C433C8; Fri, 24 Nov 2023 12:49:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700830145; bh=0/fjlCNQfvRSIG2DQIR0FRU4Xx3x1rDhMmjCSc2dHTE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LpqsmpXjNkQvLIxL/ylXUZ91zdM7G+iqppgN2q7cz2T4+sGCGpPVZdZYRXvKojtif JM1HZFTmyyVMXmO/BbzyQ1IraS78klmcvBQdJCm1GsPKnnbzwQ+818lecrSVzitWTN 2uhykAVa1811461fU36jc0eW6sVL+OaFoRntPPbx75HzI5hNu740qxbX+QZUh3lY1J VPs1Xa0LdBXirImjN7pSx+f9R0UyAq/8sI8izlhzDjvfjHVL5qpzznGNeczlnflsk7 CQa9N7TiTQfB5l9jnLNPWdF0A2GJAarSigH0aXAUHITc9K1pmVrwOwcXyzQA8RvTJ4 wsrCRFJonRdIA== Date: Fri, 24 Nov 2023 12:48:59 +0000 From: Conor Dooley To: "Manne, Nava kishore" Cc: "mdf@kernel.org" , "hao.wu@intel.com" , "yilun.xu@intel.com" , "trix@redhat.com" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , "Simek, Michal" , "mathieu.poirier@linaro.org" , "Levinsky, Ben" , "Potthuri, Sai Krishna" , "Shah, Tanmay" , "dhaval.r.shah@amd.com" , "arnd@arndb.de" , "Datta, Shubhrajyoti" , "linux-fpga@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [RFC PATCH 1/3] dt-bindings: fpga: Add support for user-key encrypted bitstream loading Message-ID: <20231124-tweezers-slug-0349a2188802@spud> References: <20231122054404.3764288-1-nava.kishore.manne@amd.com> <20231122054404.3764288-2-nava.kishore.manne@amd.com> <20231122-exert-gleeful-e4476851c489@spud> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i9ugnADt+2no1y19" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 24 Nov 2023 04:49:13 -0800 (PST) --i9ugnADt+2no1y19 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 24, 2023 at 06:35:19AM +0000, Manne, Nava kishore wrote: > Hi Conor, >=20 > Thanks for providing the review comments. > Please find my response inline. >=20 > > -----Original Message----- > > From: Conor Dooley > > Sent: Wednesday, November 22, 2023 10:21 PM > > To: Manne, Nava kishore > > Cc: mdf@kernel.org; hao.wu@intel.com; yilun.xu@intel.com; > > trix@redhat.com; robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org; > > conor+dt@kernel.org; Simek, Michal ; > > mathieu.poirier@linaro.org; Levinsky, Ben ; > > Potthuri, Sai Krishna ; Shah, Tanmay > > ; dhaval.r.shah@amd.com; arnd@arndb.de; > > Datta, Shubhrajyoti ; linux- > > fpga@vger.kernel.org; devicetree@vger.kernel.org; linux- > > kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org > > Subject: Re: [RFC PATCH 1/3] dt-bindings: fpga: Add support for user-key > > encrypted bitstream loading > >=20 > > On Wed, Nov 22, 2023 at 11:14:02AM +0530, Nava kishore Manne wrote: > > > Adds =E2=80=98encrypted-key-name=E2=80=99 property to support user-ke= y encrypted > > > bitstream loading use case. > > > > > > Signed-off-by: Nava kishore Manne > > > --- > > > .../devicetree/bindings/fpga/fpga-region.txt | 32 > > > +++++++++++++++++++ > >=20 > > Is there a reason that this has not yet been converted to yaml? > >=20 > I am not sure about the complication involved here why it's not converted= to yaml format. > Due to time constraints, I couldn=E2=80=99t spend much time so I have use= d this existing legacy format > to add my changes. >=20 > > > 1 file changed, 32 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/fpga/fpga-region.txt > > > b/Documentation/devicetree/bindings/fpga/fpga-region.txt > > > index 528df8a0e6d8..309334558b3f 100644 > > > --- a/Documentation/devicetree/bindings/fpga/fpga-region.txt > > > +++ b/Documentation/devicetree/bindings/fpga/fpga-region.txt > > > @@ -177,6 +177,9 @@ Optional properties: > > > it indicates that the FPGA has already been programmed with this > > image. > > > If this property is in an overlay targeting an FPGA region, it is a > > > request to program the FPGA with that image. > > > +- encrypted-key-name : should contain the name of an encrypted key f= ile > > located > > > + on the firmware search path. It will be used to decrypt the FPGA > > image > > > + file with user-key. > >=20 > > I might be misreading things, but your driver code seems to assume that= this > > is an aes key. Nothing here seems to document that this is supposed to = be a > > key of a particular type. > >=20 >=20 > Yes, these changes are intended to add the support for Aes user-key encry= pted bitstream loading use case. > Will fix it in v2, something like below. > aes-key-file-name : Should contain the AES key file name on the firmware = search path. > The key file contains the AES key and it will be used to decrypt = the FPGA image. Then when someone comes along looking for a different type of encryption we will end up with national-pride-foo-file-name etc. I think I'd rather have a second property that notes what type of cipher is being used and if that property is not present default to AES. --i9ugnADt+2no1y19 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZWCbuwAKCRB4tDGHoIJi 0vV7AQCqNqM2cmGU/BCfxWj5TJvLx3rZlbmMCQx94IZ0wEBgcgD/SwPOUEDaTgm7 9HEV331ZuK9GycuqRUL7gyLlrRb7Fgw= =n0AP -----END PGP SIGNATURE----- --i9ugnADt+2no1y19--