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] [day] [month] [year] [list]
Message-ID: <20200318171355.GE126814@unreal>
Date:   Wed, 18 Mar 2020 19:13:55 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Niklas Schnelle <schnelle@...ux.ibm.com>,
        Saeed Mahameed <saeedm@...lanox.com>,
        Moshe Shemesh <moshe@...lanox.com>
Cc:     linux-kernel@...r.kernel.org, Eran Ben Elisha <eranbe@...lanox.com>
Subject: Re: [RFC 1/1] net/mlx5: Fix failing fw tracer allocation on s390

On Wed, Mar 18, 2020 at 05:44:31PM +0100, Niklas Schnelle wrote:
> On s390 FORCE_MAX_ZONEORDER is 9 instead of 11, thus a larger kzalloc()
> allocation as done for the firmware tracer will always fail.
>
> Looking at mlx5_fw_tracer_save_trace(), it is actually the driver itself
> that copies the debug data into the trace array and there is no need for
> the allocation to be contiguous in physical memory. We can therefor use
> kvzalloc() instead of kzalloc() and get rid of the large contiguous
> allcoation.
>
> Signed-off-by: Niklas Schnelle <schnelle@...ux.ibm.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> index 94d7b69a95c7..eb2e57ff08a6 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> @@ -935,7 +935,7 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev)
>  		return NULL;
>  	}
>
> -	tracer = kzalloc(sizeof(*tracer), GFP_KERNEL);
> +	tracer = kvzalloc(sizeof(*tracer), GFP_KERNEL);

Saeed, Moshe

Can we use vzalloc() instead of kvzalloc() here?

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ