linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
@ 2021-01-18  2:50 Nava kishore Manne
  2021-01-18  2:50 ` [PATCH 2/2] fpga: zynqmp: Adds secure BitStream loading support for Xilinx Nava kishore Manne
  2021-01-22  5:17 ` [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support Moritz Fischer
  0 siblings, 2 replies; 12+ messages in thread
From: Nava kishore Manne @ 2021-01-18  2:50 UTC (permalink / raw)
  To: mdf, trix, robh+dt, michal.simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel
  Cc: git, chinnikishore369, Nava kishore Manne

This commit adds secure flags to the framework to support
secure BitStream Loading.

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
---
 drivers/fpga/of-fpga-region.c | 10 ++++++++++
 include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c
index e405309baadc..3a5eb4808888 100644
--- a/drivers/fpga/of-fpga-region.c
+++ b/drivers/fpga/of-fpga-region.c
@@ -228,6 +228,16 @@ static struct fpga_image_info *of_fpga_region_parse_ov(
 	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
 		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
 
+	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-config"))
+		info->flags |= FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
+
+	if (of_property_read_bool(overlay, "ddrmem-authenticated-fpga-config"))
+		info->flags |= FPGA_MGR_DDR_MEM_AUTH_BITSTREAM;
+
+	if (of_property_read_bool(overlay,
+				  "securemem-authenticated-fpga-config"))
+		info->flags |= FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM;
+
 	if (!of_property_read_string(overlay, "firmware-name",
 				     &firmware_name)) {
 		info->firmware_name = devm_kstrdup(dev, firmware_name,
diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
index 2bc3030a69e5..2f7455a60666 100644
--- a/include/linux/fpga/fpga-mgr.h
+++ b/include/linux/fpga/fpga-mgr.h
@@ -67,12 +67,24 @@ 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_USERKEY_ENCRYPTED_BITSTREAM: indicates bitstream is encrypted with
+ *                                        user key
+ *
+ * %FPGA_MGR_DDR_MEM_AUTH_BITSTREAM: do bitstream authentication using DDR
+ *                                   memory if supported
+ *
+ * %FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM: do bitstream authentication using secure
+ *                                      memory if supported
  */
 #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_USERKEY_ENCRYPTED_BITSTREAM	BIT(5)
+#define FPGA_MGR_DDR_MEM_AUTH_BITSTREAM		BIT(6)
+#define FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM	BIT(7)
 
 /**
  * struct fpga_image_info - information specific to a FPGA image
-- 
2.18.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/2] fpga: zynqmp: Adds secure BitStream loading support for Xilinx
  2021-01-18  2:50 [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support Nava kishore Manne
@ 2021-01-18  2:50 ` Nava kishore Manne
  2021-01-22  5:17 ` [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support Moritz Fischer
  1 sibling, 0 replies; 12+ messages in thread
From: Nava kishore Manne @ 2021-01-18  2:50 UTC (permalink / raw)
  To: mdf, trix, robh+dt, michal.simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel
  Cc: git, chinnikishore369, Nava kishore Manne

This commit adds secure BitStream Loading support for the Xilinx
ZynqMp chip.

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
---
 drivers/fpga/zynqmp-fpga.c           | 8 ++++++++
 include/linux/firmware/xlnx-zynqmp.h | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/drivers/fpga/zynqmp-fpga.c b/drivers/fpga/zynqmp-fpga.c
index 125743c9797f..0ce34553944b 100644
--- a/drivers/fpga/zynqmp-fpga.c
+++ b/drivers/fpga/zynqmp-fpga.c
@@ -56,6 +56,14 @@ static int zynqmp_fpga_ops_write(struct fpga_manager *mgr,
 
 	wmb(); /* ensure all writes are done before initiate FW call */
 
+	if (priv->flags & FPGA_MGR_ENCRYPTED_BITSTREAM)
+		eemi_flags |= XILINX_ZYNQMP_PM_FPGA_ENCRYPTION_DEVKEY;
+
+	if (priv->flags & FPGA_MGR_DDR_MEM_AUTH_BITSTREAM)
+		eemi_flags |= XILINX_ZYNQMP_PM_FPGA_AUTHENTICATION_DDR;
+	else if (priv->flags & FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM)
+		eemi_flags |= XILINX_ZYNQMP_PM_FPGA_AUTHENTICATION_OCM;
+
 	if (priv->flags & FPGA_MGR_PARTIAL_RECONFIG)
 		eemi_flags |= XILINX_ZYNQMP_PM_FPGA_PARTIAL;
 
diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
index 87114ee645b1..8a4038bf85e2 100644
--- a/include/linux/firmware/xlnx-zynqmp.h
+++ b/include/linux/firmware/xlnx-zynqmp.h
@@ -62,6 +62,9 @@
  */
 #define XILINX_ZYNQMP_PM_FPGA_FULL	0x0U
 #define XILINX_ZYNQMP_PM_FPGA_PARTIAL	BIT(0)
+#define XILINX_ZYNQMP_PM_FPGA_AUTHENTICATION_DDR	BIT(1)
+#define XILINX_ZYNQMP_PM_FPGA_AUTHENTICATION_OCM	BIT(2)
+#define XILINX_ZYNQMP_PM_FPGA_ENCRYPTION_DEVKEY		BIT(4)
 
 enum pm_api_id {
 	PM_GET_API_VERSION = 1,
-- 
2.18.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-01-18  2:50 [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support Nava kishore Manne
  2021-01-18  2:50 ` [PATCH 2/2] fpga: zynqmp: Adds secure BitStream loading support for Xilinx Nava kishore Manne
@ 2021-01-22  5:17 ` Moritz Fischer
  2021-01-27  9:13   ` Nava kishore Manne
  2021-03-03 23:12   ` Moritz Fischer
  1 sibling, 2 replies; 12+ messages in thread
From: Moritz Fischer @ 2021-01-22  5:17 UTC (permalink / raw)
  To: Nava kishore Manne
  Cc: mdf, trix, robh+dt, michal.simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel, git, chinnikishore369

On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne wrote:
> This commit adds secure flags to the framework to support
> secure BitStream Loading.
> 
> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> ---
>  drivers/fpga/of-fpga-region.c | 10 ++++++++++
>  include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c
> index e405309baadc..3a5eb4808888 100644
> --- a/drivers/fpga/of-fpga-region.c
> +++ b/drivers/fpga/of-fpga-region.c
> @@ -228,6 +228,16 @@ static struct fpga_image_info *of_fpga_region_parse_ov(
>  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
>  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
>  
> +	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-config"))
> +		info->flags |= FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;

Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?
> +
> +	if (of_property_read_bool(overlay, "ddrmem-authenticated-fpga-config"))
> +		info->flags |= FPGA_MGR_DDR_MEM_AUTH_BITSTREAM;
> +
> +	if (of_property_read_bool(overlay,
> +				  "securemem-authenticated-fpga-config"))
> +		info->flags |= FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM;
> +
>  	if (!of_property_read_string(overlay, "firmware-name",
>  				     &firmware_name)) {
>  		info->firmware_name = devm_kstrdup(dev, firmware_name,
> diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
> index 2bc3030a69e5..2f7455a60666 100644
> --- a/include/linux/fpga/fpga-mgr.h
> +++ b/include/linux/fpga/fpga-mgr.h
> @@ -67,12 +67,24 @@ 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_USERKEY_ENCRYPTED_BITSTREAM: indicates bitstream is encrypted with
> + *                                        user key
> + *
> + * %FPGA_MGR_DDR_MEM_AUTH_BITSTREAM: do bitstream authentication using DDR
> + *                                   memory if supported
> + *
> + * %FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM: do bitstream authentication using secure
> + *                                      memory if supported
>   */
>  #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_USERKEY_ENCRYPTED_BITSTREAM	BIT(5)
> +#define FPGA_MGR_DDR_MEM_AUTH_BITSTREAM		BIT(6)
> +#define FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM	BIT(7)
>  
>  /**
>   * struct fpga_image_info - information specific to a FPGA image
> -- 
> 2.18.0
> 

Thanks,
Moritz

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-01-22  5:17 ` [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support Moritz Fischer
@ 2021-01-27  9:13   ` Nava kishore Manne
  2021-03-03 10:11     ` Nava kishore Manne
  2021-03-03 23:12   ` Moritz Fischer
  1 sibling, 1 reply; 12+ messages in thread
From: Nava kishore Manne @ 2021-01-27  9:13 UTC (permalink / raw)
  To: Moritz Fischer
  Cc: trix, robh+dt, Michal Simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel, git, chinnikishore369

Hi Moritz,

	Thanks for the review.
Please find my response inline.

> -----Original Message-----
> From: Moritz Fischer <mdf@kernel.org>
> Sent: Friday, January 22, 2021 10:47 AM
> To: Nava kishore Manne <navam@xilinx.com>
> Cc: mdf@kernel.org; trix@redhat.com; robh+dt@kernel.org; Michal Simek
> <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; git <git@xilinx.com>; chinnikishore369@gmail.com
> Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
> 
> On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne wrote:
> > This commit adds secure flags to the framework to support secure
> > BitStream Loading.
> >
> > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> > ---
> >  drivers/fpga/of-fpga-region.c | 10 ++++++++++
> > include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
> >  2 files changed, 22 insertions(+)
> >
> > diff --git a/drivers/fpga/of-fpga-region.c
> > b/drivers/fpga/of-fpga-region.c index e405309baadc..3a5eb4808888
> > 100644
> > --- a/drivers/fpga/of-fpga-region.c
> > +++ b/drivers/fpga/of-fpga-region.c
> > @@ -228,6 +228,16 @@ static struct fpga_image_info
> *of_fpga_region_parse_ov(
> >  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
> >  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
> >
> > +	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-
> config"))
> > +		info->flags |=
> FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
> 
> Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?

In Encryption we have two kinds of use case one is Encrypted Bitstream loading with Device-key and
Other one is Encrypted Bitstream loading with User-key. To differentiate both the use cases this
Changes are needed.

Regards,
Navakishore.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-01-27  9:13   ` Nava kishore Manne
@ 2021-03-03 10:11     ` Nava kishore Manne
  2021-05-10 17:44       ` Moritz Fischer
  0 siblings, 1 reply; 12+ messages in thread
From: Nava kishore Manne @ 2021-03-03 10:11 UTC (permalink / raw)
  To: Moritz Fischer
  Cc: trix, robh+dt, Michal Simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel, git, chinnikishore369

Ping!

> -----Original Message-----
> From: Nava kishore Manne
> Sent: Wednesday, January 27, 2021 2:43 PM
> To: Moritz Fischer <mdf@kernel.org>
> Cc: trix@redhat.com; robh+dt@kernel.org; Michal Simek
> <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; git <git@xilinx.com>; chinnikishore369@gmail.com
> Subject: RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
> 
> Hi Moritz,
> 
> 	Thanks for the review.
> Please find my response inline.
> 
> > -----Original Message-----
> > From: Moritz Fischer <mdf@kernel.org>
> > Sent: Friday, January 22, 2021 10:47 AM
> > To: Nava kishore Manne <navam@xilinx.com>
> > Cc: mdf@kernel.org; trix@redhat.com; robh+dt@kernel.org; Michal Simek
> > <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > linux- kernel@vger.kernel.org; git <git@xilinx.com>;
> > chinnikishore369@gmail.com
> > Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading
> > support
> >
> > On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne wrote:
> > > This commit adds secure flags to the framework to support secure
> > > BitStream Loading.
> > >
> > > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> > > ---
> > >  drivers/fpga/of-fpga-region.c | 10 ++++++++++
> > > include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
> > >  2 files changed, 22 insertions(+)
> > >
> > > diff --git a/drivers/fpga/of-fpga-region.c
> > > b/drivers/fpga/of-fpga-region.c index e405309baadc..3a5eb4808888
> > > 100644
> > > --- a/drivers/fpga/of-fpga-region.c
> > > +++ b/drivers/fpga/of-fpga-region.c
> > > @@ -228,6 +228,16 @@ static struct fpga_image_info
> > *of_fpga_region_parse_ov(
> > >  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
> > >  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
> > >
> > > +	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-
> > config"))
> > > +		info->flags |=
> > FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
> >
> > Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?
> 
> In Encryption we have two kinds of use case one is Encrypted Bitstream
> loading with Device-key and Other one is Encrypted Bitstream loading with
> User-key. To differentiate both the use cases this Changes are needed.
> 
> Regards,
> Navakishore.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-01-22  5:17 ` [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support Moritz Fischer
  2021-01-27  9:13   ` Nava kishore Manne
@ 2021-03-03 23:12   ` Moritz Fischer
  2021-04-15  5:57     ` Nava kishore Manne
  1 sibling, 1 reply; 12+ messages in thread
From: Moritz Fischer @ 2021-03-03 23:12 UTC (permalink / raw)
  To: Moritz Fischer
  Cc: Nava kishore Manne, trix, robh+dt, michal.simek, linux-fpga,
	devicetree, linux-arm-kernel, linux-kernel, git,
	chinnikishore369

Hi Nava,

On Thu, Jan 21, 2021 at 09:17:10PM -0800, Moritz Fischer wrote:
> On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne wrote:
> > This commit adds secure flags to the framework to support
> > secure BitStream Loading.
> > 
> > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> > ---
> >  drivers/fpga/of-fpga-region.c | 10 ++++++++++
> >  include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
> >  2 files changed, 22 insertions(+)
> > 
> > diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c
> > index e405309baadc..3a5eb4808888 100644
> > --- a/drivers/fpga/of-fpga-region.c
> > +++ b/drivers/fpga/of-fpga-region.c
> > @@ -228,6 +228,16 @@ static struct fpga_image_info *of_fpga_region_parse_ov(
> >  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
> >  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
> >  
> > +	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-config"))
> > +		info->flags |= FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
> 
> Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?
> > +
> > +	if (of_property_read_bool(overlay, "ddrmem-authenticated-fpga-config"))
> > +		info->flags |= FPGA_MGR_DDR_MEM_AUTH_BITSTREAM;
> > +
> > +	if (of_property_read_bool(overlay,
> > +				  "securemem-authenticated-fpga-config"))
> > +		info->flags |= FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM;
Shouldn't all these get binding docs? I remember Richard adding
authentication support for an Intel platform, too and I'd like to avoid
adding random bindings per vendor.

Would it be possible to have an 'authentication method / type' that is more
extensible with different methods maybe?

> > +
> >  	if (!of_property_read_string(overlay, "firmware-name",
> >  				     &firmware_name)) {
> >  		info->firmware_name = devm_kstrdup(dev, firmware_name,
> > diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
> > index 2bc3030a69e5..2f7455a60666 100644
> > --- a/include/linux/fpga/fpga-mgr.h
> > +++ b/include/linux/fpga/fpga-mgr.h
> > @@ -67,12 +67,24 @@ 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_USERKEY_ENCRYPTED_BITSTREAM: indicates bitstream is encrypted with
> > + *                                        user key
> > + *
> > + * %FPGA_MGR_DDR_MEM_AUTH_BITSTREAM: do bitstream authentication using DDR
> > + *                                   memory if supported
> > + *
> > + * %FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM: do bitstream authentication using secure
> > + *                                      memory if supported
> >   */
> >  #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_USERKEY_ENCRYPTED_BITSTREAM	BIT(5)
> > +#define FPGA_MGR_DDR_MEM_AUTH_BITSTREAM		BIT(6)
> > +#define FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM	BIT(7)
> >  
> >  /**
> >   * struct fpga_image_info - information specific to a FPGA image
> > -- 
> > 2.18.0
> > 
> 
> Thanks,
> Moritz
Moritz

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-03-03 23:12   ` Moritz Fischer
@ 2021-04-15  5:57     ` Nava kishore Manne
  2021-05-04  9:43       ` Nava kishore Manne
  0 siblings, 1 reply; 12+ messages in thread
From: Nava kishore Manne @ 2021-04-15  5:57 UTC (permalink / raw)
  To: Moritz Fischer
  Cc: trix, robh+dt, Michal Simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel, git, chinnikishore369

Hi Moritz,

	Thanks for providing the review comments.
Please find my response inline.

> -----Original Message-----
> From: Moritz Fischer <mdf@kernel.org>
> Sent: Thursday, March 4, 2021 4:42 AM
> To: Moritz Fischer <mdf@kernel.org>
> Cc: Nava kishore Manne <navam@xilinx.com>; trix@redhat.com;
> robh+dt@kernel.org; Michal Simek <michals@xilinx.com>; linux-
> fpga@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git
> <git@xilinx.com>; chinnikishore369@gmail.com
> Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
> 
> Hi Nava,
> 
> On Thu, Jan 21, 2021 at 09:17:10PM -0800, Moritz Fischer wrote:
> > On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne wrote:
> > > This commit adds secure flags to the framework to support secure
> > > BitStream Loading.
> > >
> > > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> > > ---
> > >  drivers/fpga/of-fpga-region.c | 10 ++++++++++
> > > include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
> > >  2 files changed, 22 insertions(+)
> > >
> > > diff --git a/drivers/fpga/of-fpga-region.c
> > > b/drivers/fpga/of-fpga-region.c index e405309baadc..3a5eb4808888
> > > 100644
> > > --- a/drivers/fpga/of-fpga-region.c
> > > +++ b/drivers/fpga/of-fpga-region.c
> > > @@ -228,6 +228,16 @@ static struct fpga_image_info
> *of_fpga_region_parse_ov(
> > >  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
> > >  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
> > >
> > > +	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-
> config"))
> > > +		info->flags |=
> FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
> >
> > Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?
> > > +
> > > +	if (of_property_read_bool(overlay, "ddrmem-authenticated-fpga-
> config"))
> > > +		info->flags |= FPGA_MGR_DDR_MEM_AUTH_BITSTREAM;
> > > +
> > > +	if (of_property_read_bool(overlay,
> > > +				  "securemem-authenticated-fpga-config"))
> > > +		info->flags |= FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM;
> Shouldn't all these get binding docs? I remember Richard adding
> authentication support for an Intel platform, too and I'd like to avoid adding
> random bindings per vendor.
> 
> Would it be possible to have an 'authentication method / type' that is more
> extensible with different methods maybe?
> 
Yes, I agree this flags should not be a vendor specific we should make it as generic.
can we have flags something like below .
1) authenticated-fpga-config --> By default it uses kernel memory(DDR) to authenticate the image(FPGA_MGR_MEM_AUTH_BITSTREAM)
2) authenticated-onchip-fpga-config --> It uses the On chip memory to authenticate the image ( FPGA_MGR_AUTH_ON_CHIP_BITSTREAM)

if you have any other thoughts let me know will try to adopt the same...


Regards,
Navakishore.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-04-15  5:57     ` Nava kishore Manne
@ 2021-05-04  9:43       ` Nava kishore Manne
  0 siblings, 0 replies; 12+ messages in thread
From: Nava kishore Manne @ 2021-05-04  9:43 UTC (permalink / raw)
  To: Moritz Fischer
  Cc: trix, robh+dt, Michal Simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel, git, chinnikishore369

Ping!

> -----Original Message-----
> From: Nava kishore Manne <navam@xilinx.com>
> Sent: Thursday, April 15, 2021 11:28 AM
> To: Moritz Fischer <mdf@kernel.org>
> Cc: trix@redhat.com; robh+dt@kernel.org; Michal Simek
> <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; git <git@xilinx.com>; chinnikishore369@gmail.com
> Subject: RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
> 
> Hi Moritz,
> 
> 	Thanks for providing the review comments.
> Please find my response inline.
> 
> > -----Original Message-----
> > From: Moritz Fischer <mdf@kernel.org>
> > Sent: Thursday, March 4, 2021 4:42 AM
> > To: Moritz Fischer <mdf@kernel.org>
> > Cc: Nava kishore Manne <navam@xilinx.com>; trix@redhat.com;
> > robh+dt@kernel.org; Michal Simek <michals@xilinx.com>; linux-
> > fpga@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> > kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git
> > <git@xilinx.com>; chinnikishore369@gmail.com
> > Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading
> > support
> >
> > Hi Nava,
> >
> > On Thu, Jan 21, 2021 at 09:17:10PM -0800, Moritz Fischer wrote:
> > > On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne wrote:
> > > > This commit adds secure flags to the framework to support secure
> > > > BitStream Loading.
> > > >
> > > > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> > > > ---
> > > >  drivers/fpga/of-fpga-region.c | 10 ++++++++++
> > > > include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
> > > >  2 files changed, 22 insertions(+)
> > > >
> > > > diff --git a/drivers/fpga/of-fpga-region.c
> > > > b/drivers/fpga/of-fpga-region.c index e405309baadc..3a5eb4808888
> > > > 100644
> > > > --- a/drivers/fpga/of-fpga-region.c
> > > > +++ b/drivers/fpga/of-fpga-region.c
> > > > @@ -228,6 +228,16 @@ static struct fpga_image_info
> > *of_fpga_region_parse_ov(
> > > >  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
> > > >  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
> > > >
> > > > +	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-
> > config"))
> > > > +		info->flags |=
> > FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
> > >
> > > Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?
> > > > +
> > > > +	if (of_property_read_bool(overlay, "ddrmem-authenticated-fpga-
> > config"))
> > > > +		info->flags |= FPGA_MGR_DDR_MEM_AUTH_BITSTREAM;
> > > > +
> > > > +	if (of_property_read_bool(overlay,
> > > > +				  "securemem-authenticated-fpga-config"))
> > > > +		info->flags |= FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM;
> > Shouldn't all these get binding docs? I remember Richard adding
> > authentication support for an Intel platform, too and I'd like to
> > avoid adding random bindings per vendor.
> >
> > Would it be possible to have an 'authentication method / type' that is
> > more extensible with different methods maybe?
> >
> Yes, I agree this flags should not be a vendor specific we should make it as
> generic.
> can we have flags something like below .
> 1) authenticated-fpga-config --> By default it uses kernel memory(DDR) to
> authenticate the image(FPGA_MGR_MEM_AUTH_BITSTREAM)
> 2) authenticated-onchip-fpga-config --> It uses the On chip memory to
> authenticate the image ( FPGA_MGR_AUTH_ON_CHIP_BITSTREAM)
> 
> if you have any other thoughts let me know will try to adopt the same...
> 
> 
> Regards,
> Navakishore.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-03-03 10:11     ` Nava kishore Manne
@ 2021-05-10 17:44       ` Moritz Fischer
  2021-05-11 13:31         ` Nava kishore Manne
  0 siblings, 1 reply; 12+ messages in thread
From: Moritz Fischer @ 2021-05-10 17:44 UTC (permalink / raw)
  To: Nava kishore Manne
  Cc: Moritz Fischer, trix, robh+dt, Michal Simek, linux-fpga,
	devicetree, linux-arm-kernel, linux-kernel, git,
	chinnikishore369

On Wed, Mar 03, 2021 at 10:11:51AM +0000, Nava kishore Manne wrote:
> Ping!
> 
> > -----Original Message-----
> > From: Nava kishore Manne
> > Sent: Wednesday, January 27, 2021 2:43 PM
> > To: Moritz Fischer <mdf@kernel.org>
> > Cc: trix@redhat.com; robh+dt@kernel.org; Michal Simek
> > <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> > kernel@vger.kernel.org; git <git@xilinx.com>; chinnikishore369@gmail.com
> > Subject: RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
> > 
> > Hi Moritz,
> > 
> > 	Thanks for the review.
> > Please find my response inline.
> > 
> > > -----Original Message-----
> > > From: Moritz Fischer <mdf@kernel.org>
> > > Sent: Friday, January 22, 2021 10:47 AM
> > > To: Nava kishore Manne <navam@xilinx.com>
> > > Cc: mdf@kernel.org; trix@redhat.com; robh+dt@kernel.org; Michal Simek
> > > <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > linux- kernel@vger.kernel.org; git <git@xilinx.com>;
> > > chinnikishore369@gmail.com
> > > Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading
> > > support
> > >
> > > On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne wrote:
> > > > This commit adds secure flags to the framework to support secure
> > > > BitStream Loading.
> > > >
> > > > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> > > > ---
> > > >  drivers/fpga/of-fpga-region.c | 10 ++++++++++
> > > > include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
> > > >  2 files changed, 22 insertions(+)
> > > >
> > > > diff --git a/drivers/fpga/of-fpga-region.c
> > > > b/drivers/fpga/of-fpga-region.c index e405309baadc..3a5eb4808888
> > > > 100644
> > > > --- a/drivers/fpga/of-fpga-region.c
> > > > +++ b/drivers/fpga/of-fpga-region.c
> > > > @@ -228,6 +228,16 @@ static struct fpga_image_info
> > > *of_fpga_region_parse_ov(
> > > >  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
> > > >  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
> > > >
> > > > +	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-
> > > config"))
> > > > +		info->flags |=
> > > FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
> > >
> > > Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?
> > 
> > In Encryption we have two kinds of use case one is Encrypted Bitstream
> > loading with Device-key and Other one is Encrypted Bitstream loading with
> > User-key. To differentiate both the use cases this Changes are needed.
> > 
> > Regards,
> > Navakishore.

Is this region specific, or could this be a sysfs attribute?

- Moritz

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-05-10 17:44       ` Moritz Fischer
@ 2021-05-11 13:31         ` Nava kishore Manne
  2021-05-27 10:43           ` Nava kishore Manne
  0 siblings, 1 reply; 12+ messages in thread
From: Nava kishore Manne @ 2021-05-11 13:31 UTC (permalink / raw)
  To: Moritz Fischer
  Cc: trix, robh+dt, Michal Simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel, git, chinnikishore369

Hi Moritz,

Please find my response inline.

> -----Original Message-----
> From: Moritz Fischer <mdf@kernel.org>
> Sent: Monday, May 10, 2021 11:14 PM
> To: Nava kishore Manne <navam@xilinx.com>
> Cc: Moritz Fischer <mdf@kernel.org>; trix@redhat.com;
> robh+dt@kernel.org; Michal Simek <michals@xilinx.com>; linux-
> fpga@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git
> <git@xilinx.com>; chinnikishore369@gmail.com
> Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
> 
> On Wed, Mar 03, 2021 at 10:11:51AM +0000, Nava kishore Manne wrote:
> > Ping!
> >
> > > -----Original Message-----
> > > From: Nava kishore Manne
> > > Sent: Wednesday, January 27, 2021 2:43 PM
> > > To: Moritz Fischer <mdf@kernel.org>
> > > Cc: trix@redhat.com; robh+dt@kernel.org; Michal Simek
> > > <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > linux- kernel@vger.kernel.org; git <git@xilinx.com>;
> > > chinnikishore369@gmail.com
> > > Subject: RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading
> > > support
> > >
> > > Hi Moritz,
> > >
> > > 	Thanks for the review.
> > > Please find my response inline.
> > >
> > > > -----Original Message-----
> > > > From: Moritz Fischer <mdf@kernel.org>
> > > > Sent: Friday, January 22, 2021 10:47 AM
> > > > To: Nava kishore Manne <navam@xilinx.com>
> > > > Cc: mdf@kernel.org; trix@redhat.com; robh+dt@kernel.org; Michal
> > > > Simek <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > > linux- kernel@vger.kernel.org; git <git@xilinx.com>;
> > > > chinnikishore369@gmail.com
> > > > Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading
> > > > support
> > > >
> > > > On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne
> wrote:
> > > > > This commit adds secure flags to the framework to support secure
> > > > > BitStream Loading.
> > > > >
> > > > > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> > > > > ---
> > > > >  drivers/fpga/of-fpga-region.c | 10 ++++++++++
> > > > > include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
> > > > >  2 files changed, 22 insertions(+)
> > > > >
> > > > > diff --git a/drivers/fpga/of-fpga-region.c
> > > > > b/drivers/fpga/of-fpga-region.c index e405309baadc..3a5eb4808888
> > > > > 100644
> > > > > --- a/drivers/fpga/of-fpga-region.c
> > > > > +++ b/drivers/fpga/of-fpga-region.c
> > > > > @@ -228,6 +228,16 @@ static struct fpga_image_info
> > > > *of_fpga_region_parse_ov(
> > > > >  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
> > > > >  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
> > > > >
> > > > > +	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-
> > > > config"))
> > > > > +		info->flags |=
> > > > FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
> > > >
> > > > Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?
> > >
> > > In Encryption we have two kinds of use case one is Encrypted
> > > Bitstream loading with Device-key and Other one is Encrypted
> > > Bitstream loading with User-key. To differentiate both the use cases this
> Changes are needed.
> > >
> > > Regards,
> > > Navakishore.
> 
> Is this region specific, or could this be a sysfs attribute?
> 

These changes are region specific.

Regards,
Navakishore.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-05-11 13:31         ` Nava kishore Manne
@ 2021-05-27 10:43           ` Nava kishore Manne
  2021-06-08 11:50             ` Nava kishore Manne
  0 siblings, 1 reply; 12+ messages in thread
From: Nava kishore Manne @ 2021-05-27 10:43 UTC (permalink / raw)
  To: Moritz Fischer
  Cc: trix, robh+dt, Michal Simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel, git, chinnikishore369

Ping!

> -----Original Message-----
> From: Nava kishore Manne <navam@xilinx.com>
> Sent: Tuesday, May 11, 2021 7:02 PM
> To: Moritz Fischer <mdf@kernel.org>
> Cc: trix@redhat.com; robh+dt@kernel.org; Michal Simek
> <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; git <git@xilinx.com>; chinnikishore369@gmail.com
> Subject: RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
> 
> Hi Moritz,
> 
> Please find my response inline.
> 
> > -----Original Message-----
> > From: Moritz Fischer <mdf@kernel.org>
> > Sent: Monday, May 10, 2021 11:14 PM
> > To: Nava kishore Manne <navam@xilinx.com>
> > Cc: Moritz Fischer <mdf@kernel.org>; trix@redhat.com;
> > robh+dt@kernel.org; Michal Simek <michals@xilinx.com>; linux-
> > fpga@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> > kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git
> > <git@xilinx.com>; chinnikishore369@gmail.com
> > Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading
> > support
> >
> > On Wed, Mar 03, 2021 at 10:11:51AM +0000, Nava kishore Manne wrote:
> > > Ping!
> > >
> > > > -----Original Message-----
> > > > From: Nava kishore Manne
> > > > Sent: Wednesday, January 27, 2021 2:43 PM
> > > > To: Moritz Fischer <mdf@kernel.org>
> > > > Cc: trix@redhat.com; robh+dt@kernel.org; Michal Simek
> > > > <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > > linux- kernel@vger.kernel.org; git <git@xilinx.com>;
> > > > chinnikishore369@gmail.com
> > > > Subject: RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading
> > > > support
> > > >
> > > > Hi Moritz,
> > > >
> > > > 	Thanks for the review.
> > > > Please find my response inline.
> > > >
> > > > > -----Original Message-----
> > > > > From: Moritz Fischer <mdf@kernel.org>
> > > > > Sent: Friday, January 22, 2021 10:47 AM
> > > > > To: Nava kishore Manne <navam@xilinx.com>
> > > > > Cc: mdf@kernel.org; trix@redhat.com; robh+dt@kernel.org; Michal
> > > > > Simek <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > > > > devicetree@vger.kernel.org;
> > > > > linux-arm-kernel@lists.infradead.org;
> > > > > linux- kernel@vger.kernel.org; git <git@xilinx.com>;
> > > > > chinnikishore369@gmail.com
> > > > > Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream
> > > > > loading support
> > > > >
> > > > > On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne
> > wrote:
> > > > > > This commit adds secure flags to the framework to support
> > > > > > secure BitStream Loading.
> > > > > >
> > > > > > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> > > > > > ---
> > > > > >  drivers/fpga/of-fpga-region.c | 10 ++++++++++
> > > > > > include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
> > > > > >  2 files changed, 22 insertions(+)
> > > > > >
> > > > > > diff --git a/drivers/fpga/of-fpga-region.c
> > > > > > b/drivers/fpga/of-fpga-region.c index
> > > > > > e405309baadc..3a5eb4808888
> > > > > > 100644
> > > > > > --- a/drivers/fpga/of-fpga-region.c
> > > > > > +++ b/drivers/fpga/of-fpga-region.c
> > > > > > @@ -228,6 +228,16 @@ static struct fpga_image_info
> > > > > *of_fpga_region_parse_ov(
> > > > > >  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
> > > > > >  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
> > > > > >
> > > > > > +	if (of_property_read_bool(overlay, "userkey-encrypted-fpga-
> > > > > config"))
> > > > > > +		info->flags |=
> > > > > FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
> > > > >
> > > > > Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?
> > > >
> > > > In Encryption we have two kinds of use case one is Encrypted
> > > > Bitstream loading with Device-key and Other one is Encrypted
> > > > Bitstream loading with User-key. To differentiate both the use
> > > > cases this
> > Changes are needed.
> > > >
> > > > Regards,
> > > > Navakishore.
> >
> > Is this region specific, or could this be a sysfs attribute?
> >
> 
> These changes are region specific.
> 
> Regards,
> Navakishore.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
  2021-05-27 10:43           ` Nava kishore Manne
@ 2021-06-08 11:50             ` Nava kishore Manne
  0 siblings, 0 replies; 12+ messages in thread
From: Nava kishore Manne @ 2021-06-08 11:50 UTC (permalink / raw)
  To: Moritz Fischer
  Cc: trix, robh+dt, Michal Simek, linux-fpga, devicetree,
	linux-arm-kernel, linux-kernel, git, chinnikishore369

Ping!

> -----Original Message-----
> From: Nava kishore Manne <navam@xilinx.com>
> Sent: Thursday, May 27, 2021 4:14 PM
> To: Moritz Fischer <mdf@kernel.org>
> Cc: trix@redhat.com; robh+dt@kernel.org; Michal Simek
> <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; git <git@xilinx.com>; chinnikishore369@gmail.com
> Subject: RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support
> 
> Ping!
> 
> > -----Original Message-----
> > From: Nava kishore Manne <navam@xilinx.com>
> > Sent: Tuesday, May 11, 2021 7:02 PM
> > To: Moritz Fischer <mdf@kernel.org>
> > Cc: trix@redhat.com; robh+dt@kernel.org; Michal Simek
> > <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > linux- kernel@vger.kernel.org; git <git@xilinx.com>;
> > chinnikishore369@gmail.com
> > Subject: RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading
> > support
> >
> > Hi Moritz,
> >
> > Please find my response inline.
> >
> > > -----Original Message-----
> > > From: Moritz Fischer <mdf@kernel.org>
> > > Sent: Monday, May 10, 2021 11:14 PM
> > > To: Nava kishore Manne <navam@xilinx.com>
> > > Cc: Moritz Fischer <mdf@kernel.org>; trix@redhat.com;
> > > robh+dt@kernel.org; Michal Simek <michals@xilinx.com>; linux-
> > > fpga@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> > > kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git
> > > <git@xilinx.com>; chinnikishore369@gmail.com
> > > Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading
> > > support
> > >
> > > On Wed, Mar 03, 2021 at 10:11:51AM +0000, Nava kishore Manne wrote:
> > > > Ping!
> > > >
> > > > > -----Original Message-----
> > > > > From: Nava kishore Manne
> > > > > Sent: Wednesday, January 27, 2021 2:43 PM
> > > > > To: Moritz Fischer <mdf@kernel.org>
> > > > > Cc: trix@redhat.com; robh+dt@kernel.org; Michal Simek
> > > > > <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > > > > devicetree@vger.kernel.org;
> > > > > linux-arm-kernel@lists.infradead.org;
> > > > > linux- kernel@vger.kernel.org; git <git@xilinx.com>;
> > > > > chinnikishore369@gmail.com
> > > > > Subject: RE: [PATCH 1/2] fpga: mgr: Adds secure BitStream
> > > > > loading support
> > > > >
> > > > > Hi Moritz,
> > > > >
> > > > > 	Thanks for the review.
> > > > > Please find my response inline.
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Moritz Fischer <mdf@kernel.org>
> > > > > > Sent: Friday, January 22, 2021 10:47 AM
> > > > > > To: Nava kishore Manne <navam@xilinx.com>
> > > > > > Cc: mdf@kernel.org; trix@redhat.com; robh+dt@kernel.org;
> > > > > > Michal Simek <michals@xilinx.com>; linux-fpga@vger.kernel.org;
> > > > > > devicetree@vger.kernel.org;
> > > > > > linux-arm-kernel@lists.infradead.org;
> > > > > > linux- kernel@vger.kernel.org; git <git@xilinx.com>;
> > > > > > chinnikishore369@gmail.com
> > > > > > Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream
> > > > > > loading support
> > > > > >
> > > > > > On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne
> > > wrote:
> > > > > > > This commit adds secure flags to the framework to support
> > > > > > > secure BitStream Loading.
> > > > > > >
> > > > > > > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> > > > > > > ---
> > > > > > >  drivers/fpga/of-fpga-region.c | 10 ++++++++++
> > > > > > > include/linux/fpga/fpga-mgr.h | 12 ++++++++++++
> > > > > > >  2 files changed, 22 insertions(+)
> > > > > > >
> > > > > > > diff --git a/drivers/fpga/of-fpga-region.c
> > > > > > > b/drivers/fpga/of-fpga-region.c index
> > > > > > > e405309baadc..3a5eb4808888
> > > > > > > 100644
> > > > > > > --- a/drivers/fpga/of-fpga-region.c
> > > > > > > +++ b/drivers/fpga/of-fpga-region.c
> > > > > > > @@ -228,6 +228,16 @@ static struct fpga_image_info
> > > > > > *of_fpga_region_parse_ov(
> > > > > > >  	if (of_property_read_bool(overlay, "encrypted-fpga-config"))
> > > > > > >  		info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
> > > > > > >
> > > > > > > +	if (of_property_read_bool(overlay,
> > > > > > > +"userkey-encrypted-fpga-
> > > > > > config"))
> > > > > > > +		info->flags |=
> > > > > > FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM;
> > > > > >
> > > > > > Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED?
> > > > >
> > > > > In Encryption we have two kinds of use case one is Encrypted
> > > > > Bitstream loading with Device-key and Other one is Encrypted
> > > > > Bitstream loading with User-key. To differentiate both the use
> > > > > cases this
> > > Changes are needed.
> > > > >
> > > > > Regards,
> > > > > Navakishore.
> > >
> > > Is this region specific, or could this be a sysfs attribute?
> > >
> >
> > These changes are region specific.
> >
> > Regards,
> > Navakishore.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-06-08 11:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18  2:50 [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support Nava kishore Manne
2021-01-18  2:50 ` [PATCH 2/2] fpga: zynqmp: Adds secure BitStream loading support for Xilinx Nava kishore Manne
2021-01-22  5:17 ` [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support Moritz Fischer
2021-01-27  9:13   ` Nava kishore Manne
2021-03-03 10:11     ` Nava kishore Manne
2021-05-10 17:44       ` Moritz Fischer
2021-05-11 13:31         ` Nava kishore Manne
2021-05-27 10:43           ` Nava kishore Manne
2021-06-08 11:50             ` Nava kishore Manne
2021-03-03 23:12   ` Moritz Fischer
2021-04-15  5:57     ` Nava kishore Manne
2021-05-04  9:43       ` Nava kishore Manne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).