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: <2cbd5202-6b0d-b5b3-62a0-8ade7bf0d199@wanadoo.fr>
Date:   Mon, 22 Nov 2021 20:30:39 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Vinod Koul <vkoul@...nel.org>
Cc:     gustavo.pimentel@...opsys.com, wangqing@...o.com,
        dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] dmaengine: dw-edma: Fix (and simplify) the probe broken
 since ecb8c88bd31c

Le 22/11/2021 à 07:56, Vinod Koul a écrit :
> On 09-11-21, 22:09, Christophe JAILLET wrote:
>> The commit in the Fixes: tag has changed the logic of the code and now it
>> is likely that the probe will return an early success (0), even if not
>> completely executed.
>>
>> This should lead to a crash or similar issue later on when the code
>> accesses to some never allocated resources.
>>
>> Change the '!err' into a 'err' when checking if
>> 'dma_set_mask_and_coherent()' has failed or not.
>>
>> While at it, simplify the code and remove the "can't success code" related
>> to 32 DMA mask.
>> As stated in [1], 'dma_set_mask_and_coherent(DMA_BIT_MASK(64))' can't fail
>> if 'dev->dma_mask' is non-NULL. And if it is NULL, it would fail for the
>> same reason when tried with DMA_BIT_MASK(32).
> 
> The patch title should describe the changes in the patch and not the
> outcome! So I have taken the liberty to update this to:
> dmaengine: dw-edma: Fix return value check for dma_set_mask_and_coherent()
> 

Hi,

In fact, this 'bad' patch title was a way for me to express my 
frustration to someone who 'stole' someone else work:
    - without letting him know about it
    - without fixing his broken patch by himself when informed
    - without taking into account others comments (Andy Shevchenko about 
64 DMA mask)

So, thanks for fixing it (and thanks to Wang Qing for pushing in the 
right direction, even if a better communication would have been 
appreciated :) )


If you could just confirmed the 64 DMA mask cleanup, it would be great 
for me. I trust the one who stated that such code could be simplified 
and I've tried to audit code to confirm it by myself.
However, this pattern looks quite common in the kernel, so I'm still 
unsure about it :( !

CJ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ