lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 20 May 2024 15:02:01 +0000
From: "Saleem, Shiraz" <shiraz.saleem@...el.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>, "Ismail, Mustafa"
	<mustafa.ismail@...el.com>, Jason Gunthorpe <jgg@...pe.ca>, Leon Romanovsky
	<leon@...nel.org>, Kees Cook <keescook@...omium.org>, "Gustavo A. R. Silva"
	<gustavoars@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
	"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
	"linux-hardening@...r.kernel.org" <linux-hardening@...r.kernel.org>
Subject: RE: [PATCH] RDMA/irdma: Annotate  flexible array with __counted_by()
 in struct irdma_qvlist_info

> Subject: [PATCH] RDMA/irdma: Annotate flexible array with __counted_by() in
> struct irdma_qvlist_info
> 
> 'num_vectors' is used to count the number of elements in the 'qv_info'
> flexible array in "struct irdma_qvlist_info".
> 
> So annotate it with __counted_by() to make it explicit and enable some
> additional checks.
> 
> This allocation is done in irdma_save_msix_info().
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  drivers/infiniband/hw/irdma/main.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/irdma/main.h
> b/drivers/infiniband/hw/irdma/main.h
> index b65bc2ea542f..9f0ed6e84471 100644
> --- a/drivers/infiniband/hw/irdma/main.h
> +++ b/drivers/infiniband/hw/irdma/main.h
> @@ -239,7 +239,7 @@ struct irdma_qv_info {
> 
>  struct irdma_qvlist_info {
>  	u32 num_vectors;
> -	struct irdma_qv_info qv_info[];
> +	struct irdma_qv_info qv_info[] __counted_by(num_vectors);
>  };

Acked-by: Shiraz Saleem <shiraz.saleem@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ