Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1898602pxb; Sat, 14 Nov 2020 06:11:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUe8v5E5fsmWeCnX4S7Xv2gTAfb7miOG0Q85ielkReKPWI2ayc2sNNirLF+Fi64HX2M7j+ X-Received: by 2002:a17:906:b0d7:: with SMTP id bk23mr6979255ejb.103.1605363098764; Sat, 14 Nov 2020 06:11:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605363098; cv=none; d=google.com; s=arc-20160816; b=ZcG1LuQ+4/KO2xg/SCEls1kqKQPoY6Zhq0FUHEQVhNp1VCJ65vuUPt5I1sGgrOsm+r J4yBklM8K/DXZCR/g8QXWsb1g8T4oiJRZmDEqpqj+khVfBe+pBGP3m0WezkzEDWbmnHZ pMj4rwHDhE5PeEK5KPVeNAMWpIQNkH3U3yTknJ8mvNz5jzOdajm3K5YTza7x1JEvngwW kVzD/K34SBBh1UbP9HoyRfo37C16TYsbIayMjtCNCEOunKlI3VpPEGTQbpluSzhMeiIh nY3o/JxXTcc9GTwDYndntSsR5I0a5MgHZn216htJGZHR9Z4HQdiMv+BQM1XBJOCaHixx 5q6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=EaBujXrzkSRdXwWL8IcKLD6utH7iATminQIjPe3m89U=; b=stAdzvLDN8ViCGubKTVQrrng0FAekEz3eLTxASZyNuzIQMWmsW9en/0FfoZRLg1aZL sDsc0cYiRUM9wsMqJA1PSDnrIovhlaqGtWvvRWLph/4t3UousHcWvppyAQb36j6phyw+ tWYCf0Jp1M9zqROzK65VBBRgez4J2YdmIAXzdercCP5cBiqu/LTvjalA0znQ6e7kiJ2U qbsFRfEFzqaxSjCw1WxE10gJTFsthoFbkbxl8uNxlxLOK1ckBeERRJfiaZINNdTP/zoM 57Ic5p89BpxXH5jh7d8OD3dD9wGXkOlTpjU/pesgIwoRjpxDzQU3Cgyt7fyBie4JTgia mmAg== 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si8224916ejs.645.2020.11.14.06.11.14; Sat, 14 Nov 2020 06:11: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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbgKNOJp (ORCPT + 99 others); Sat, 14 Nov 2020 09:09:45 -0500 Received: from mga18.intel.com ([134.134.136.126]:45068 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726112AbgKNOJp (ORCPT ); Sat, 14 Nov 2020 09:09:45 -0500 IronPort-SDR: uwa6VSrk/3ZwiCnOokEQVVcuk+BxJGAzjjgNcQpl8mhulGG5BiJTyVlWXb4pD49meRJ4AipW2S COTifjCRMtDw== X-IronPort-AV: E=McAfee;i="6000,8403,9804"; a="158356870" X-IronPort-AV: E=Sophos;i="5.77,478,1596524400"; d="scan'208";a="158356870" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2020 06:09:43 -0800 IronPort-SDR: zooRDkVrUhPS8aNedLDU0wkZEuJyiCERpRuI90+Q/8fD5kCH9bX01c6KPHaoD4yonH9F46G98j PeMOKbhi7s1A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,478,1596524400"; d="scan'208";a="324301841" Received: from marshy.an.intel.com (HELO [10.122.105.143]) ([10.122.105.143]) by orsmga003.jf.intel.com with ESMTP; 14 Nov 2020 06:09:43 -0800 Subject: Re: [PATCHv1 1/4] fpga: fpga-mgr: add FPGA_MGR_BITSTREM_AUTHENTICATION flag To: Tom Rix , mdf@kernel.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dinguyen@kernel.org, sridhar.rajagopal@intel.com, Richard Gong References: <1605204403-6663-1-git-send-email-richard.gong@linux.intel.com> <1605204403-6663-2-git-send-email-richard.gong@linux.intel.com> From: Richard Gong Message-ID: <4dd9a747-05f3-1cca-22a6-35681677223d@linux.intel.com> Date: Sat, 14 Nov 2020 08:30:46 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tom, Thanks for review! On 11/13/20 2:24 PM, Tom Rix wrote: > > On 11/12/20 10:06 AM, richard.gong@linux.intel.com wrote: >> From: Richard Gong >> >> Add FPGA_MGR_BITSTREM_AUTHENTICATION flag for FPGA bitstream >> authentication. > > Should improve this commit so explain what you mean authentication. > > it could mean 'it wrote correctly' or 'it was signed correctly' or something else. > Authentication = make sure a signed bitstream has valid signatures before committing it to QSPI memory. I will update the commit messages in version 2. >> >> Signed-off-by: Richard Gong >> --- >> include/linux/fpga/fpga-mgr.h | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h >> index 2bc3030..1d65814 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 >> */ >> #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) > > A whitespace issue, the new BIT(5) should align with the others, so add two spaces to the others. > There is only one space, also I ran checkpatch with strict option and didn't see any whitespace issue. In the original patch, BIT(0) to BIT(4) align themselves. I am not sure why we see differently in email. #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) To align BIT(5) with others, I have to use additional tab to BIT(0) to BIT(4). But I don't think I should make such change on them, agree? Regards, Richard > Tom > >> >> /** >> * struct fpga_image_info - information specific to a FPGA image >