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:   Wed, 2 May 2018 11:49:58 +0200
From:   Christian König <ckoenig.leichtzumerken@...il.com>
To:     Michel Dänzer <michel@...nzer.net>,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Christoph Hellwig <hch@....de>
Cc:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] swiotlb: Fix inversed DMA_ATTR_NO_WARN test

Am 01.05.2018 um 15:24 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@....com>
>
> The result was printing the warning only when we were explicitly asked
> not to.
>
> Cc: stable@...r.kernel.org
> Fixes: 0176adb004065d6815a8e67946752df4cd947c5b "swiotlb: refactor
>   coherent buffer allocation"
> Signed-off-by: Michel Dänzer <michel.daenzer@....com>

Good catch, looked at the code multiple times and haven't seen that 
myself :)

Reviewed-by: Christian König <christian.koenig@....com>.

Christian.

> ---
>   lib/swiotlb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> index c43ec2271469..e9ac21540628 100644
> --- a/lib/swiotlb.c
> +++ b/lib/swiotlb.c
> @@ -750,7 +750,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
>   	swiotlb_tbl_unmap_single(dev, phys_addr, size, DMA_TO_DEVICE,
>   			DMA_ATTR_SKIP_CPU_SYNC);
>   out_warn:
> -	if ((attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
> +	if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
>   		dev_warn(dev,
>   			"swiotlb: coherent allocation failed, size=%zu\n",
>   			size);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ