linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member
@ 2023-05-23  1:34 Gustavo A. R. Silva
  2023-05-23  1:35 ` [PATCH 1/2][next] " Gustavo A. R. Silva
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Gustavo A. R. Silva @ 2023-05-23  1:34 UTC (permalink / raw)
  To: Eric Farman, Matthew Rosato, Halil Pasic, Vineeth Vijayan,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle
  Cc: linux-s390, kvm, linux-kernel, Gustavo A. R. Silva, linux-hardening

Hi!

This small series aims to replace a one-element array with a
flexible-array member in struct vfio_ccw_parent.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
routines on memcpy() and help us make progress towards globally
enabling -fstrict-flex-arrays=3 [1].

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/160
Link: https://github.com/KSPP/linux/issues/297
Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1]

Gustavo A. R. Silva (2):
  vfio/ccw: Replace one-element array with flexible-array member
  vfio/ccw: Use struct_size() helper

 drivers/s390/cio/vfio_ccw_drv.c     | 2 +-
 drivers/s390/cio/vfio_ccw_private.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.34.1


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

* [PATCH 1/2][next] vfio/ccw: Replace one-element array with flexible-array member
  2023-05-23  1:34 [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member Gustavo A. R. Silva
@ 2023-05-23  1:35 ` Gustavo A. R. Silva
  2023-05-23 16:33   ` Eric Farman
                     ` (2 more replies)
  2023-05-23  1:35 ` [PATCH 2/2][next] vfio/ccw: Use struct_size() helper Gustavo A. R. Silva
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 11+ messages in thread
From: Gustavo A. R. Silva @ 2023-05-23  1:35 UTC (permalink / raw)
  To: Eric Farman, Matthew Rosato, Halil Pasic, Vineeth Vijayan,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle
  Cc: linux-s390, kvm, linux-kernel, Gustavo A. R. Silva, linux-hardening

One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element array with flexible-array
member in struct vfio_ccw_parent and refactor the the rest of the code
accordingly.

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/297
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/s390/cio/vfio_ccw_drv.c     | 3 ++-
 drivers/s390/cio/vfio_ccw_private.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index ff538a086fc7..57906a9c6324 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -171,7 +171,8 @@ static int vfio_ccw_sch_probe(struct subchannel *sch)
 		return -ENODEV;
 	}
 
-	parent = kzalloc(sizeof(*parent), GFP_KERNEL);
+	parent = kzalloc(sizeof(*parent) + sizeof(struct mdev_type *),
+			 GFP_KERNEL);
 	if (!parent)
 		return -ENOMEM;
 
diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h
index b441ae6700fd..b62bbc5c6376 100644
--- a/drivers/s390/cio/vfio_ccw_private.h
+++ b/drivers/s390/cio/vfio_ccw_private.h
@@ -79,7 +79,7 @@ struct vfio_ccw_parent {
 
 	struct mdev_parent	parent;
 	struct mdev_type	mdev_type;
-	struct mdev_type	*mdev_types[1];
+	struct mdev_type	*mdev_types[];
 };
 
 /**
-- 
2.34.1


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

* [PATCH 2/2][next] vfio/ccw: Use struct_size() helper
  2023-05-23  1:34 [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member Gustavo A. R. Silva
  2023-05-23  1:35 ` [PATCH 1/2][next] " Gustavo A. R. Silva
@ 2023-05-23  1:35 ` Gustavo A. R. Silva
  2023-05-23 16:33   ` Eric Farman
  2023-05-23 17:30   ` Kees Cook
  2023-05-23 16:36 ` [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member Matthew Rosato
  2023-05-23 18:58 ` Alexander Gordeev
  3 siblings, 2 replies; 11+ messages in thread
From: Gustavo A. R. Silva @ 2023-05-23  1:35 UTC (permalink / raw)
  To: Eric Farman, Matthew Rosato, Halil Pasic, Vineeth Vijayan,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle
  Cc: linux-s390, kvm, linux-kernel, Gustavo A. R. Silva, linux-hardening

Prefer struct_size() over open-coded versions.

Link: https://github.com/KSPP/linux/issues/160
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/s390/cio/vfio_ccw_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index 57906a9c6324..43601816ea4e 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -171,8 +171,7 @@ static int vfio_ccw_sch_probe(struct subchannel *sch)
 		return -ENODEV;
 	}
 
-	parent = kzalloc(sizeof(*parent) + sizeof(struct mdev_type *),
-			 GFP_KERNEL);
+	parent = kzalloc(struct_size(parent, mdev_types, 1), GFP_KERNEL);
 	if (!parent)
 		return -ENOMEM;
 
-- 
2.34.1


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

* Re: [PATCH 1/2][next] vfio/ccw: Replace one-element array with flexible-array member
  2023-05-23  1:35 ` [PATCH 1/2][next] " Gustavo A. R. Silva
@ 2023-05-23 16:33   ` Eric Farman
  2023-05-23 17:29   ` Kees Cook
  2023-05-23 17:45   ` Christophe JAILLET
  2 siblings, 0 replies; 11+ messages in thread
From: Eric Farman @ 2023-05-23 16:33 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Matthew Rosato, Halil Pasic,
	Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle
  Cc: linux-s390, kvm, linux-kernel, linux-hardening

On Mon, 2023-05-22 at 19:35 -0600, Gustavo A. R. Silva wrote:
> One-element arrays are deprecated, and we are replacing them with
> flexible
> array members instead. So, replace one-element array with flexible-
> array
> member in struct vfio_ccw_parent and refactor the the rest of the

s/the the/the/

> code
> accordingly.
> 
> Link: https://github.com/KSPP/linux/issues/79
> Link: https://github.com/KSPP/linux/issues/297
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Reviewed-by: Eric Farman <farman@linux.ibm.com>

> ---
>  drivers/s390/cio/vfio_ccw_drv.c     | 3 ++-
>  drivers/s390/cio/vfio_ccw_private.h | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/cio/vfio_ccw_drv.c
> b/drivers/s390/cio/vfio_ccw_drv.c
> index ff538a086fc7..57906a9c6324 100644
> --- a/drivers/s390/cio/vfio_ccw_drv.c
> +++ b/drivers/s390/cio/vfio_ccw_drv.c
> @@ -171,7 +171,8 @@ static int vfio_ccw_sch_probe(struct subchannel
> *sch)
>                 return -ENODEV;
>         }
>  
> -       parent = kzalloc(sizeof(*parent), GFP_KERNEL);
> +       parent = kzalloc(sizeof(*parent) + sizeof(struct mdev_type
> *),
> +                        GFP_KERNEL);
>         if (!parent)
>                 return -ENOMEM;
>  
> diff --git a/drivers/s390/cio/vfio_ccw_private.h
> b/drivers/s390/cio/vfio_ccw_private.h
> index b441ae6700fd..b62bbc5c6376 100644
> --- a/drivers/s390/cio/vfio_ccw_private.h
> +++ b/drivers/s390/cio/vfio_ccw_private.h
> @@ -79,7 +79,7 @@ struct vfio_ccw_parent {
>  
>         struct mdev_parent      parent;
>         struct mdev_type        mdev_type;
> -       struct mdev_type        *mdev_types[1];
> +       struct mdev_type        *mdev_types[];
>  };
>  
>  /**


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

* Re: [PATCH 2/2][next] vfio/ccw: Use struct_size() helper
  2023-05-23  1:35 ` [PATCH 2/2][next] vfio/ccw: Use struct_size() helper Gustavo A. R. Silva
@ 2023-05-23 16:33   ` Eric Farman
  2023-05-23 17:30   ` Kees Cook
  1 sibling, 0 replies; 11+ messages in thread
From: Eric Farman @ 2023-05-23 16:33 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Matthew Rosato, Halil Pasic,
	Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle
  Cc: linux-s390, kvm, linux-kernel, linux-hardening

On Mon, 2023-05-22 at 19:35 -0600, Gustavo A. R. Silva wrote:
> Prefer struct_size() over open-coded versions.
> 
> Link: https://github.com/KSPP/linux/issues/160
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Reviewed-by: Eric Farman <farman@linux.ibm.com>

> ---
>  drivers/s390/cio/vfio_ccw_drv.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/cio/vfio_ccw_drv.c
> b/drivers/s390/cio/vfio_ccw_drv.c
> index 57906a9c6324..43601816ea4e 100644
> --- a/drivers/s390/cio/vfio_ccw_drv.c
> +++ b/drivers/s390/cio/vfio_ccw_drv.c
> @@ -171,8 +171,7 @@ static int vfio_ccw_sch_probe(struct subchannel
> *sch)
>                 return -ENODEV;
>         }
>  
> -       parent = kzalloc(sizeof(*parent) + sizeof(struct mdev_type
> *),
> -                        GFP_KERNEL);
> +       parent = kzalloc(struct_size(parent, mdev_types, 1),
> GFP_KERNEL);
>         if (!parent)
>                 return -ENOMEM;
>  


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

* Re: [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member
  2023-05-23  1:34 [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member Gustavo A. R. Silva
  2023-05-23  1:35 ` [PATCH 1/2][next] " Gustavo A. R. Silva
  2023-05-23  1:35 ` [PATCH 2/2][next] vfio/ccw: Use struct_size() helper Gustavo A. R. Silva
@ 2023-05-23 16:36 ` Matthew Rosato
  2023-05-23 18:58 ` Alexander Gordeev
  3 siblings, 0 replies; 11+ messages in thread
From: Matthew Rosato @ 2023-05-23 16:36 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Eric Farman, Halil Pasic, Vineeth Vijayan,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle
  Cc: linux-s390, kvm, linux-kernel, linux-hardening

On 5/22/23 9:34 PM, Gustavo A. R. Silva wrote:
> Hi!
> 
> This small series aims to replace a one-element array with a
> flexible-array member in struct vfio_ccw_parent.
> 
> This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
> routines on memcpy() and help us make progress towards globally
> enabling -fstrict-flex-arrays=3 [1].
> 
> Link: https://github.com/KSPP/linux/issues/79
> Link: https://github.com/KSPP/linux/issues/160
> Link: https://github.com/KSPP/linux/issues/297
> Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1]
> 
> Gustavo A. R. Silva (2):
>   vfio/ccw: Replace one-element array with flexible-array member
>   vfio/ccw: Use struct_size() helper
> 
>  drivers/s390/cio/vfio_ccw_drv.c     | 2 +-
>  drivers/s390/cio/vfio_ccw_private.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 

Hi Gustavo,

Thanks! For the series:

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>

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

* Re: [PATCH 1/2][next] vfio/ccw: Replace one-element array with flexible-array member
  2023-05-23  1:35 ` [PATCH 1/2][next] " Gustavo A. R. Silva
  2023-05-23 16:33   ` Eric Farman
@ 2023-05-23 17:29   ` Kees Cook
  2023-05-23 17:45   ` Christophe JAILLET
  2 siblings, 0 replies; 11+ messages in thread
From: Kees Cook @ 2023-05-23 17:29 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Eric Farman, Matthew Rosato, Halil Pasic, Vineeth Vijayan,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
	linux-s390, kvm, linux-kernel, linux-hardening

On Mon, May 22, 2023 at 07:35:12PM -0600, Gustavo A. R. Silva wrote:
> One-element arrays are deprecated, and we are replacing them with flexible
> array members instead. So, replace one-element array with flexible-array
> member in struct vfio_ccw_parent and refactor the the rest of the code
> accordingly.
> 
> Link: https://github.com/KSPP/linux/issues/79
> Link: https://github.com/KSPP/linux/issues/297
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Reviewed-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook

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

* Re: [PATCH 2/2][next] vfio/ccw: Use struct_size() helper
  2023-05-23  1:35 ` [PATCH 2/2][next] vfio/ccw: Use struct_size() helper Gustavo A. R. Silva
  2023-05-23 16:33   ` Eric Farman
@ 2023-05-23 17:30   ` Kees Cook
  1 sibling, 0 replies; 11+ messages in thread
From: Kees Cook @ 2023-05-23 17:30 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Eric Farman, Matthew Rosato, Halil Pasic, Vineeth Vijayan,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
	linux-s390, kvm, linux-kernel, linux-hardening

On Mon, May 22, 2023 at 07:35:59PM -0600, Gustavo A. R. Silva wrote:
> Prefer struct_size() over open-coded versions.
> 
> Link: https://github.com/KSPP/linux/issues/160
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Reviewed-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook

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

* Re: [PATCH 1/2][next] vfio/ccw: Replace one-element array with flexible-array member
  2023-05-23  1:35 ` [PATCH 1/2][next] " Gustavo A. R. Silva
  2023-05-23 16:33   ` Eric Farman
  2023-05-23 17:29   ` Kees Cook
@ 2023-05-23 17:45   ` Christophe JAILLET
  2023-05-23 17:47     ` Marion & Christophe JAILLET
  2 siblings, 1 reply; 11+ messages in thread
From: Christophe JAILLET @ 2023-05-23 17:45 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Eric Farman, Matthew Rosato, Halil Pasic,
	Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle
  Cc: linux-s390, kvm, linux-kernel, linux-hardening

Le 23/05/2023 à 03:35, Gustavo A. R. Silva a écrit :
> One-element arrays are deprecated, and we are replacing them with flexible
> array members instead. So, replace one-element array with flexible-array
> member in struct vfio_ccw_parent and refactor the the rest of the code
> accordingly.
> 
> Link: https://github.com/KSPP/linux/issues/79
> Link: https://github.com/KSPP/linux/issues/297
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
>   drivers/s390/cio/vfio_ccw_drv.c     | 3 ++-
>   drivers/s390/cio/vfio_ccw_private.h | 2 +-
>   2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
> index ff538a086fc7..57906a9c6324 100644
> --- a/drivers/s390/cio/vfio_ccw_drv.c
> +++ b/drivers/s390/cio/vfio_ccw_drv.c
> @@ -171,7 +171,8 @@ static int vfio_ccw_sch_probe(struct subchannel *sch)
>   		return -ENODEV;
>   	}
>   
> -	parent = kzalloc(sizeof(*parent), GFP_KERNEL);
> +	parent = kzalloc(sizeof(*parent) + sizeof(struct mdev_type *),

Hi, wouldn't:

    parent = kzalloc(struct_size(parent, mdev_types, 1)),

be more informative and in the spirit of flexible array use?

Just my 2c,

CJ

> +			 GFP_KERNEL);
>   	if (!parent)
>   		return -ENOMEM;
>   
> diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h
> index b441ae6700fd..b62bbc5c6376 100644
> --- a/drivers/s390/cio/vfio_ccw_private.h
> +++ b/drivers/s390/cio/vfio_ccw_private.h
> @@ -79,7 +79,7 @@ struct vfio_ccw_parent {
>   
>   	struct mdev_parent	parent;
>   	struct mdev_type	mdev_type;
> -	struct mdev_type	*mdev_types[1];
> +	struct mdev_type	*mdev_types[];
>   };
>   
>   /**


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

* Re: [PATCH 1/2][next] vfio/ccw: Replace one-element array with flexible-array member
  2023-05-23 17:45   ` Christophe JAILLET
@ 2023-05-23 17:47     ` Marion & Christophe JAILLET
  0 siblings, 0 replies; 11+ messages in thread
From: Marion & Christophe JAILLET @ 2023-05-23 17:47 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Eric Farman, Matthew Rosato, Halil Pasic,
	Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle
  Cc: linux-s390, kvm, linux-kernel, linux-hardening



Le 23/05/2023 à 19:45, Christophe JAILLET a écrit :
> Le 23/05/2023 à 03:35, Gustavo A. R. Silva a écrit :
>> One-element arrays are deprecated, and we are replacing them with 
>> flexible
>> array members instead. So, replace one-element array with flexible-array
>> member in struct vfio_ccw_parent and refactor the the rest of the code
>> accordingly.
>>
>> Link: https://github.com/KSPP/linux/issues/79
>> Link: https://github.com/KSPP/linux/issues/297
>> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
>> ---
>>   drivers/s390/cio/vfio_ccw_drv.c     | 3 ++-
>>   drivers/s390/cio/vfio_ccw_private.h | 2 +-
>>   2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/s390/cio/vfio_ccw_drv.c 
>> b/drivers/s390/cio/vfio_ccw_drv.c
>> index ff538a086fc7..57906a9c6324 100644
>> --- a/drivers/s390/cio/vfio_ccw_drv.c
>> +++ b/drivers/s390/cio/vfio_ccw_drv.c
>> @@ -171,7 +171,8 @@ static int vfio_ccw_sch_probe(struct subchannel *sch)
>>           return -ENODEV;
>>       }
>> -    parent = kzalloc(sizeof(*parent), GFP_KERNEL);
>> +    parent = kzalloc(sizeof(*parent) + sizeof(struct mdev_type *),
> 
> Hi, wouldn't:
> 
>     parent = kzalloc(struct_size(parent, mdev_types, 1)),
> 
> be more informative and in the spirit of flexible array use?

Ok, patch 2/2.

Sorry for the noise.

CJ

> 
> Just my 2c,
> 
> CJ
> 
>> +             GFP_KERNEL);
>>       if (!parent)
>>           return -ENOMEM;
>> diff --git a/drivers/s390/cio/vfio_ccw_private.h 
>> b/drivers/s390/cio/vfio_ccw_private.h
>> index b441ae6700fd..b62bbc5c6376 100644
>> --- a/drivers/s390/cio/vfio_ccw_private.h
>> +++ b/drivers/s390/cio/vfio_ccw_private.h
>> @@ -79,7 +79,7 @@ struct vfio_ccw_parent {
>>       struct mdev_parent    parent;
>>       struct mdev_type    mdev_type;
>> -    struct mdev_type    *mdev_types[1];
>> +    struct mdev_type    *mdev_types[];
>>   };
>>   /**
> 
> 

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

* Re: [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member
  2023-05-23  1:34 [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member Gustavo A. R. Silva
                   ` (2 preceding siblings ...)
  2023-05-23 16:36 ` [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member Matthew Rosato
@ 2023-05-23 18:58 ` Alexander Gordeev
  3 siblings, 0 replies; 11+ messages in thread
From: Alexander Gordeev @ 2023-05-23 18:58 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Eric Farman, Matthew Rosato, Halil Pasic, Vineeth Vijayan,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger, Sven Schnelle, linux-s390, kvm,
	linux-kernel, linux-hardening

On Mon, May 22, 2023 at 07:34:41PM -0600, Gustavo A. R. Silva wrote:
> This small series aims to replace a one-element array with a
> flexible-array member in struct vfio_ccw_parent.
> 
> This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
> routines on memcpy() and help us make progress towards globally
> enabling -fstrict-flex-arrays=3 [1].
> 
> Link: https://github.com/KSPP/linux/issues/79
> Link: https://github.com/KSPP/linux/issues/160
> Link: https://github.com/KSPP/linux/issues/297
> Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1]
> 
> Gustavo A. R. Silva (2):
>   vfio/ccw: Replace one-element array with flexible-array member
>   vfio/ccw: Use struct_size() helper
> 
>  drivers/s390/cio/vfio_ccw_drv.c     | 2 +-
>  drivers/s390/cio/vfio_ccw_private.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Fixed duplicate "the the" in patch #1 commit message and applied.

Thanks!

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

end of thread, other threads:[~2023-05-23 18:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23  1:34 [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member Gustavo A. R. Silva
2023-05-23  1:35 ` [PATCH 1/2][next] " Gustavo A. R. Silva
2023-05-23 16:33   ` Eric Farman
2023-05-23 17:29   ` Kees Cook
2023-05-23 17:45   ` Christophe JAILLET
2023-05-23 17:47     ` Marion & Christophe JAILLET
2023-05-23  1:35 ` [PATCH 2/2][next] vfio/ccw: Use struct_size() helper Gustavo A. R. Silva
2023-05-23 16:33   ` Eric Farman
2023-05-23 17:30   ` Kees Cook
2023-05-23 16:36 ` [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member Matthew Rosato
2023-05-23 18:58 ` Alexander Gordeev

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).