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]
Message-ID: <20220321144531.2b0503a1@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 21 Mar 2022 14:45:31 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Saeed Mahameed <saeedm@...dia.com>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        David Miller <davem@...emloft.net>,
        Networking <netdev@...r.kernel.org>,
        Kees Cook <keescook@...omium.org>,
        Maxim Mikityanskiy <maximmi@...dia.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the net-next tree

On Mon, 21 Mar 2022 18:39:41 +1100 Stephen Rothwell wrote:
> Hi all,
> 
> After merging the net-next tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> In file included from include/linux/string.h:253,
>                  from include/linux/bitmap.h:11,
>                  from include/linux/cpumask.h:12,
>                  from arch/x86/include/asm/cpumask.h:5,
>                  from arch/x86/include/asm/msr.h:11,
>                  from arch/x86/include/asm/processor.h:22,
>                  from arch/x86/include/asm/timex.h:5,
>                  from include/linux/timex.h:65,
>                  from include/linux/time32.h:13,
>                  from include/linux/time.h:60,
>                  from include/linux/ktime.h:24,
>                  from include/linux/timer.h:6,
>                  from include/linux/netdevice.h:24,
>                  from include/trace/events/xdp.h:8,
>                  from include/linux/bpf_trace.h:5,
>                  from drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c:33:
> In function 'fortify_memset_chk',
>     inlined from 'mlx5e_xmit_xdp_frame' at drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c:438:3:
> include/linux/fortify-string.h:242:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
>   242 |                         __write_overflow_field(p_size_field, size);
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   9ded70fa1d81 ("net/mlx5e: Don't prefill WQEs in XDP SQ in the multi buffer mode")
> 
> exposed by the kspp tree.
> 
> I have applied the following fix patch for today (a better one is
> probably possible).

Hi Saeed, 

thoughts? 

Would be great to get this sorted by tomorrow.

> From: Stephen Rothwell <sfr@...b.auug.org.au>
> Date: Mon, 21 Mar 2022 18:29:24 +1100
> Subject: [PATCH] fxup for "net/mlx5e: Don't prefill WQEs in XDP SQ in the multi buffer mode"
> 
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 3 +--
>  include/linux/mlx5/qp.h                          | 5 +++++
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> index f35b62ce4c07..8f321a6c0809 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> @@ -435,8 +435,7 @@ mlx5e_xmit_xdp_frame(struct mlx5e_xdpsq *sq, struct mlx5e_xmit_data *xdptxd,
>  		u8 num_pkts = 1 + num_frags;
>  		int i;
>  
> -		memset(&cseg->signature, 0, sizeof(*cseg) -
> -		       sizeof(cseg->opmod_idx_opcode) - sizeof(cseg->qpn_ds));
> +		memset(&cseg->trailer, 0, sizeof(cseg->trailer));
>  		memset(eseg, 0, sizeof(*eseg) - sizeof(eseg->trailer));
>  
>  		eseg->inline_hdr.sz = cpu_to_be16(inline_hdr_sz);
> diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h
> index 61e48d459b23..8bda3ba5b109 100644
> --- a/include/linux/mlx5/qp.h
> +++ b/include/linux/mlx5/qp.h
> @@ -202,6 +202,9 @@ struct mlx5_wqe_fmr_seg {
>  struct mlx5_wqe_ctrl_seg {
>  	__be32			opmod_idx_opcode;
>  	__be32			qpn_ds;
> +
> +	struct_group(trailer,
> +
>  	u8			signature;
>  	u8			rsvd[2];
>  	u8			fm_ce_se;
> @@ -211,6 +214,8 @@ struct mlx5_wqe_ctrl_seg {
>  		__be32		umr_mkey;
>  		__be32		tis_tir_num;
>  	};
> +
> +	); /* end of trailer group */
>  };
>  
>  #define MLX5_WQE_CTRL_DS_MASK 0x3f

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ