Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1923675ybi; Thu, 20 Jun 2019 06:16:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRCSNOV5LiP+9pJIfEdHIyuf5BBrm8RXBcU7IxFn1jXeuxObFxOVu+zEHrmMm65ssnOeMX X-Received: by 2002:a17:90a:9b08:: with SMTP id f8mr3068630pjp.103.1561036569512; Thu, 20 Jun 2019 06:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561036569; cv=none; d=google.com; s=arc-20160816; b=Ro1omUVipa5Jw5B/pTJ6XvpOjTT32V0zm0liWU/nep4xqV6ikddVRRVJxunWavgqGC P542yTpuD/VSGXZ8OBIkP/PvfaCdh2P5B1+mZglxDME3o/3S4Mn16kmzrG0MzHhntwUu NxNqC5/i+WSp1oByGQ+by4QbuDgjnohEDHSalrl4KmRRQO4Xg02jLsF41gX1mmBFVYdb HKZl/ODmqdEyKy19VxWMez/2PsXsXjxEb8scGlbuXSU+X2Vs2hWhAkL/p68W6+7XTXtA sA1VfGPHc97J6YFsJV6xuAPTUozwHLGvInCQKEakvOPrzGnKom6k9rdeUc+GEpGQsmwU XcRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Kl+Xs4KjYI0C4sE+r6y0VyYKRWEiXTvCjRTkCteEGIo=; b=euPPUzNJOyGBkM2DhLYJvNvGWHdKDF18oNLl0frsj6WGWOR8lSDrb3oMQRzg0beiaV d7AGmrLhvWF+A5bNLNB/c3+VoO2ws1aaJvFblYuoxpcovslPvPsd3DrFcMjTkUWh7Iye IYmTDbfLdO4qGVVdhqU/lyQjNXkphryUsHAHVtCJl2uqa5YkHXs/uXeXHGGnqC7IewN1 YHif6R9TBW5YsyDR32Tf5mgNX+aN/hOLClhNWGxdLDreuUWAEXWDzfVflh9JPyczGb7b IsZiAjCoMGXhtvGhfD/LEk5igQcKgVbjUE6d0znoyj0xb4KGJFzHfSmGuAbBnKzfkPp+ HU5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si5804131pgi.451.2019.06.20.06.15.54; Thu, 20 Jun 2019 06:16:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731779AbfFTNPT (ORCPT + 99 others); Thu, 20 Jun 2019 09:15:19 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:33829 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbfFTNPT (ORCPT ); Thu, 20 Jun 2019 09:15:19 -0400 Received: from localhost (aaubervilliers-681-1-81-150.w90-88.abo.wanadoo.fr [90.88.23.150]) (Authenticated sender: antoine.tenart@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id F20C120000A; Thu, 20 Jun 2019 13:15:12 +0000 (UTC) Date: Thu, 20 Jun 2019 15:15:12 +0200 From: Antoine Tenart To: Pascal Van Leeuwen Cc: Antoine Tenart , Pascal van Leeuwen , "linux-crypto@vger.kernel.org" , "herbert@gondor.apana.org.au" , "davem@davemloft.net" Subject: Re: [PATCH 3/3] crypto: inside-secure - add support for using the EIP197 without firmware images Message-ID: <20190620131512.GB4642@kwain> References: <1560837384-29814-1-git-send-email-pvanleeuwen@insidesecure.com> <1560837384-29814-4-git-send-email-pvanleeuwen@insidesecure.com> <20190619122737.GB3254@kwain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Pascal, On Wed, Jun 19, 2019 at 02:37:44PM +0000, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > On Tue, Jun 18, 2019 at 07:56:24AM +0200, Pascal van Leeuwen wrote: > > > In addition to this, the direction the kernel has taken was to *remove* > > binary firmwares from its source code. I'm afraid adding this is a > > no-go. > > For a HW engineer, there really is no fundamental difference between > control register contents or an instruction word. They can both have > the exact same effects internal to the HW. > If I had disguised this as a handful of config reg writes writing > some #define'd magic values, probably no one would have even noticed. I do not fully agree. If this is comparable to configuring h/w registers, then you could probably have defines explaining why each bit is set and what it's doing. Which would be fine. > By that same definition, the tokens the driver generates for > processing could be considered "firmware" as well (as they are used by > the hardware in a very similar way) ... Right. The main difference here is we do have a clear definition of what the tokens are doing. Thanks to your explanation, if this firmware is really looking like the token we're using, the words have a defined structure and the magic values could be generated with proper defines and macros. And I think it's the main issue here: it's not acceptable to have an array of magic values. If you can give a meaning to those bits, I see no reason why it couldn't be added to the driver. (And I'm all for what you're trying to achieve here :)). > > The proper solution I believe would be to support loading this "MiniFW", > > which (depending on the license) could be either distributed in the > > rootfs and loaded (like what's done currently), or through > > CONFIG_EXTRA_FIRMWARE. > > > That seems total overkill for just a handful of words though. Given your explanation, I agree. (If those bits can have meaning). Thanks! Antoine -- Antoine T?nart, Bootlin Embedded Linux and Kernel engineering https://bootlin.com