Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4203448pxb; Tue, 26 Jan 2021 15:31:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhncpYj4FvSu9rDCQlgQbSVfONLuNWt3tv5fIIgNO3s6BYqEamKub+SnIaSOZ2Wv0d7Q/u X-Received: by 2002:a17:906:3b0b:: with SMTP id g11mr4691338ejf.169.1611703898083; Tue, 26 Jan 2021 15:31:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611703898; cv=none; d=google.com; s=arc-20160816; b=BpBztsVJLqpUEcvrqEWOO0icbJZtZ1TbL2lVmvOIdRUfjrFCtzp6aRAxOr5QxVF1jN RcijNhHFgqPMz6/3PGjVXJCjShUN4bOmQRV0Q1x2lXN/ezOa77sssEWP752cp99HTroG LKgpCL2YkR+cOoeidm/5Bkx9NMWfZwxhPixiuaiNWCsw5GTTCOvcUpxoXrb3fWXC6m3k 0nMtkuO+uUnDN6olylsnIkPX3p1aEJ6AjdaBzN9dSx1KSL9JqSe15f1cD83yIod8rvYY OMNapVaYSA/f5NjcWZvYL93A5L9Udr/rQ/oKnIWZKUvq2Wr4pXYlDNdffN7GlYbWdXFV D4ww== 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; bh=pZIbd3jXt6ht4gWlxlhO6dvETRinbduf9IxOiI+0CKo=; b=suoEiMc8AgYoPohxAX5qvb5s5bHWEZarMBGj37Pah20jyJjaFMivXQtT/sIBBpdLk0 bPQKXuSMA28a4BdLBg+b6Pm4e1ACQ6r31PFLoPvCOUgXzT0z5yx+r7ZWaGym2ZuGF8kH KqwSUfHUd+S9VeRAag7R2JFOIv2HZuLFBcZuq5w/n+wBdH1iitLIhd3hJ7+1An/JGMWD 4Lm/051GINY/7KIB6hAhdxHXgw7CgJThJJ2qJeMjJaK7pdQOUfMXR1jKmIgEm6Nzl847 Fgz1R59qAoq6eDAvJqTPUYBQyCCnTHz6n581ds8s21nGA3Qz/xmv2g+cgmSONlmBihuK biag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si77235ejx.42.2021.01.26.15.31.13; Tue, 26 Jan 2021 15:31:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387728AbhAZXNs (ORCPT + 99 others); Tue, 26 Jan 2021 18:13:48 -0500 Received: from mail-pl1-f174.google.com ([209.85.214.174]:35881 "EHLO mail-pl1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730886AbhAZFEu (ORCPT ); Tue, 26 Jan 2021 00:04:50 -0500 Received: by mail-pl1-f174.google.com with SMTP id e9so9179637plh.3; Mon, 25 Jan 2021 21:04:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pZIbd3jXt6ht4gWlxlhO6dvETRinbduf9IxOiI+0CKo=; b=RBv5nhp84WvvX/zicTXtZcf8NLTwf8JjiEP/NJHCnpsJtp7Y+VzfVNKbHKgaW9KbPU rdAtEsRHKJ4giCLRKBsVTO0Nq4HwHivGfIN0zDoWYIYMXYsjWgTnZnzPJE+7zv4fJJfl vuXV9uo8ZVne/Gb8e64Z+SCLDw9rnNOVoSD2xYYabc0t7ctRpE0pqgWZcQGPd3CFFg2w JPXYf9wD6I2N/FjPefQpGtWQjh/O7FQQRClagzvIUeM4NxHWld9UX0vk+wviAOxYG8eX UxFOxk0h8LoNH0eik0713V/JbOD4fUYT6+gLrRdlprUmcarYEENpEkGJBBndpWmV3Jwb Q/qw== X-Gm-Message-State: AOAM5334UCsk9CycXdda8dJVOZAPI/eJl6NF6XirJ78r4p3K3OuR4K6q Aij+5zkuGUJVzfucy9v2U2TA064Sh3E= X-Received: by 2002:a17:902:bd0a:b029:e0:612:ad38 with SMTP id p10-20020a170902bd0ab02900e00612ad38mr4427903pls.30.1611637450430; Mon, 25 Jan 2021 21:04:10 -0800 (PST) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id s4sm888701pji.34.2021.01.25.21.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 21:04:09 -0800 (PST) Date: Mon, 25 Jan 2021 21:04:08 -0800 From: Moritz Fischer To: richard.gong@linux.intel.com Cc: mdf@kernel.org, trix@redhat.com, gregkh@linuxfoundation.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, dinguyen@kernel.org, sridhar.rajagopal@intel.com, Richard Gong Subject: Re: [PATCHv3 3/6] fpga: fpga-mgr: add FPGA_MGR_BITSTREM_AUTHENTICATION flag Message-ID: References: <1611608188-25621-1-git-send-email-richard.gong@linux.intel.com> <1611608188-25621-4-git-send-email-richard.gong@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1611608188-25621-4-git-send-email-richard.gong@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 25, 2021 at 02:56:25PM -0600, richard.gong@linux.intel.com wrote: > From: Richard Gong > > Add FPGA_MGR_BITSTREM_AUTHENTICATION flag for FPGA bitstream > authentication, which makes sure a signed bitstream has valid signatures. > > Except for the actual configuration of the device, the authentication works > the same way as FPGA configuration does. If the authentication passes, the > bitstream will be programmed into QSPI flash and will be expected to boot > without issues. > > Signed-off-by: Richard Gong > --- > v3: no change > v2: align all FPGA_MGR_* flags > update the commit messages > --- > include/linux/fpga/fpga-mgr.h | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h > index 2bc3030..4fb3400 100644 > --- a/include/linux/fpga/fpga-mgr.h > +++ b/include/linux/fpga/fpga-mgr.h > @@ -67,12 +67,15 @@ enum fpga_mgr_states { > * %FPGA_MGR_BITSTREAM_LSB_FIRST: SPI bitstream bit order is LSB first > * > * %FPGA_MGR_COMPRESSED_BITSTREAM: FPGA bitstream is compressed > + * > + * %FPGA_MGR_BITSTREM_AUTHENTICATION: do FPGA bitstream authentication only > */ > -#define FPGA_MGR_PARTIAL_RECONFIG BIT(0) > -#define FPGA_MGR_EXTERNAL_CONFIG BIT(1) > -#define FPGA_MGR_ENCRYPTED_BITSTREAM BIT(2) > -#define FPGA_MGR_BITSTREAM_LSB_FIRST BIT(3) > -#define FPGA_MGR_COMPRESSED_BITSTREAM BIT(4) > +#define FPGA_MGR_PARTIAL_RECONFIG BIT(0) > +#define FPGA_MGR_EXTERNAL_CONFIG BIT(1) > +#define FPGA_MGR_ENCRYPTED_BITSTREAM BIT(2) > +#define FPGA_MGR_BITSTREAM_LSB_FIRST BIT(3) > +#define FPGA_MGR_COMPRESSED_BITSTREAM BIT(4) > +#define FPGA_MGR_BITSTREM_AUTHENTICATION BIT(5) Consider FPGA_MGR_BITSTREAM_AUTHENTICATE (and fix typo) > > /** > * struct fpga_image_info - information specific to a FPGA image > -- > 2.7.4 > Thanks, Moritz