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  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:   Tue, 5 May 2020 20:28:19 +0000
From:   Leo Li <leoyang.li@....com>
To:     Ioana Ciornei <ioana.ciornei@....com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Youri Querry <youri.querry_1@....com>
Subject: RE: [PATCH net] soc: fsl: dpio: properly compute the consumer index



> -----Original Message-----
> From: Ioana Ciornei <ioana.ciornei@....com>
> Sent: Tuesday, May 5, 2020 3:14 PM
> To: davem@...emloft.net; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Cc: Youri Querry <youri.querry_1@....com>; Leo Li <leoyang.li@....com>;
> Ioana Ciornei <ioana.ciornei@....com>
> Subject: [PATCH net] soc: fsl: dpio: properly compute the consumer index
> 
> Mask the consumer index before using it. Without this, we would be writing
> frame descriptors beyond the ring size supported by the QBMAN block.
> 
> Fixes: 3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array mode with ring
> mode enqueue")
> Signed-off-by: Ioana Ciornei <ioana.ciornei@....com>

If you would like it go through net tree.

Acked-by: Li Yang <leoyang.li@....com>

> ---
> 
> I am sending this fix through the net tree since the bug manifests itself only
> on net-next and not the soc trees. This way it would be easier to integrate
> this sooner rather than later.

Since the description of the patch says it fixes a patch included from soc tree, it is not very clear why this problem only exists on net-next.

> 
>  drivers/soc/fsl/dpio/qbman-portal.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/fsl/dpio/qbman-portal.c
> b/drivers/soc/fsl/dpio/qbman-portal.c
> index 804b8ba9bf5c..23a1377971f4 100644
> --- a/drivers/soc/fsl/dpio/qbman-portal.c
> +++ b/drivers/soc/fsl/dpio/qbman-portal.c
> @@ -669,6 +669,7 @@ int qbman_swp_enqueue_multiple_direct(struct
> qbman_swp *s,
>  		eqcr_ci = s->eqcr.ci;
>  		p = s->addr_cena + QBMAN_CENA_SWP_EQCR_CI;
>  		s->eqcr.ci = qbman_read_register(s,
> QBMAN_CINH_SWP_EQCR_CI);
> +		s->eqcr.ci &= full_mask;
> 
>  		s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
>  					eqcr_ci, s->eqcr.ci);
> --
> 2.17.1

Powered by blists - more mailing lists