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, 24 Jan 2022 10:51:49 -0800
From:   Colin Foster <colin.foster@...advantage.com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>
Cc:     Grygorii Strashko <grygorii.strashko@...com>,
        Ilias Apalodimas <ilias.apalodimas@...aro.org>,
        Murali Karicheri <m-karicheri2@...com>,
        "David S. Miller" <davem@...emloft.net>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Jakub Kicinski <kuba@...nel.org>, linux-omap@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH net] net: cpsw: Properly initialise struct
 page_pool_params


Hi Toke,

Thanks for looking into this. I'll this patch this evening when I have
access to hardware.

Colin Foster

On Mon, Jan 24, 2022 at 03:35:29PM +0100, Toke Høiland-Jørgensen wrote:
> The cpsw driver didn't properly initialise the struct page_pool_params
> before calling page_pool_create(), which leads to crashes after the struct
> has been expanded with new parameters.
> 
> The second Fixes tag below is where the buggy code was introduced, but
> because the code was moved around this patch will only apply on top of the
> commit in the first Fixes tag.
> 
> Fixes: c5013ac1dd0e ("net: ethernet: ti: cpsw: move set of common functions in cpsw_priv")
> Fixes: 9ed4050c0d75 ("net: ethernet: ti: cpsw: add XDP support")
> Reported-by: Colin Foster <colin.foster@...advantage.com>
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
> ---
>  drivers/net/ethernet/ti/cpsw_priv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/ti/cpsw_priv.c b/drivers/net/ethernet/ti/cpsw_priv.c
> index ba220593e6db..8f6817f346ba 100644
> --- a/drivers/net/ethernet/ti/cpsw_priv.c
> +++ b/drivers/net/ethernet/ti/cpsw_priv.c
> @@ -1146,7 +1146,7 @@ int cpsw_fill_rx_channels(struct cpsw_priv *priv)
>  static struct page_pool *cpsw_create_page_pool(struct cpsw_common *cpsw,
>  					       int size)
>  {
> -	struct page_pool_params pp_params;
> +	struct page_pool_params pp_params = {};
>  	struct page_pool *pool;
>  
>  	pp_params.order = 0;
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ