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: 
 <SN7PR18MB531447D46F3AE83AA06BE1B8E3072@SN7PR18MB5314.namprd18.prod.outlook.com>
Date: Tue, 9 Apr 2024 04:23:17 +0000
From: Bharat Bhushan <bbhushan2@...vell.com>
To: Chen Ni <nichen@...as.ac.cn>,
        "bbrezillon@...nel.org"
	<bbrezillon@...nel.org>,
        "arno@...isbad.org" <arno@...isbad.org>,
        Srujana
 Challa <schalla@...vell.com>,
        "herbert@...dor.apana.org.au"
	<herbert@...dor.apana.org.au>,
        "davem@...emloft.net" <davem@...emloft.net>
CC: "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [EXTERNAL] [PATCH] crypto: octeontx2 - add missing check for
 dma_map_single



> -----Original Message-----
> From: Chen Ni <nichen@...as.ac.cn>
> Sent: Monday, April 8, 2024 7:29 AM
> To: bbrezillon@...nel.org; arno@...isbad.org; Srujana Challa
> <schalla@...vell.com>; herbert@...dor.apana.org.au;
> davem@...emloft.net
> Cc: linux-crypto@...r.kernel.org; linux-kernel@...r.kernel.org; Chen Ni
> <nichen@...as.ac.cn>
> Subject: [EXTERNAL] [PATCH] crypto: octeontx2 - add missing check for
> dma_map_single
> 
> ----------------------------------------------------------------------
> Add check for dma_map_single() and return error if it fails in order to avoid
> invalid dma address.
> 
> Fixes: e92971117c2c ("crypto: octeontx2 - add ctx_val workaround")
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>
> ---
>  drivers/crypto/marvell/octeontx2/cn10k_cpt.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/crypto/marvell/octeontx2/cn10k_cpt.c
> b/drivers/crypto/marvell/octeontx2/cn10k_cpt.c
> index 79b4e74804f6..6bfc59e67747 100644
> --- a/drivers/crypto/marvell/octeontx2/cn10k_cpt.c
> +++ b/drivers/crypto/marvell/octeontx2/cn10k_cpt.c
> @@ -138,6 +138,10 @@ int cn10k_cpt_hw_ctx_init(struct pci_dev *pdev,
>  		return -ENOMEM;
>  	cptr_dma = dma_map_single(&pdev->dev, hctx,
> CN10K_CPT_HW_CTX_SIZE,
>  				  DMA_BIDIRECTIONAL);
> +	if (dma_mapping_error(&pdev->dev, cptr_dma)) {
> +		kfree(hctx);
> +		return -ENOMEM;
> +	}

Thanks for fixing,
Reviewed-by: Bharat Bhushan <bbhushan2@...vell.com>

> 
>  	cn10k_cpt_hw_ctx_set(hctx, 1);
>  	er_ctx->hw_ctx = hctx;
> --
> 2.25.1
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ