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: <0897d9bec8865859694c917f3f72ab8fd12321ff.camel@perches.com>
Date:   Mon, 27 Jul 2020 09:09:34 -0700
From:   Joe Perches <joe@...ches.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        mchehab@...nel.org, akpm@...ux-foundation.org, rppt@...nel.org,
        hverkuil-cisco@...all.nl
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/2] media: bt8xx: avoid a useless memset

On Mon, 2020-07-27 at 15:51 +0200, Christophe JAILLET wrote:
> Avoid a memset after a call to 'dma_alloc_coherent()'.
> This is useless since
> commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*")
[]
> diff --git a/drivers/media/pci/bt8xx/btcx-risc.c b/drivers/media/pci/bt8xx/btcx-risc.c
[]
> @@ -73,7 +73,6 @@ int btcx_riscmem_alloc(struct pci_dev *pci,
>  		dprintk("btcx: riscmem alloc [%d] dma=%lx cpu=%p size=%d\n",
>  			memcnt, (unsigned long)dma, cpu, size);
>  	}
> -	memset(risc->cpu,0,risc->size);
>  	return 0;
>  }

Likely NAK.

This is not useless as risc->cpu may be reused
and the alloc may not have been done.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ