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]
Date:   Fri, 27 Jul 2018 17:05:19 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Linux MMC List <linux-mmc@...r.kernel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: tmio: allow DMA request hook to return error status

Hi Geert,

2018-07-27 16:51 GMT+09:00 Geert Uytterhoeven <geert@...ux-m68k.org>:
> Hi Yamada-san,
>
> On Fri, Jul 27, 2018 at 3:15 AM Masahiro Yamada
> <yamada.masahiro@...ionext.com> wrote:
>> dma_request_chan() may return ERR_PTR(-EPROBE_DEFER), but
>> tmio_mmc_request_dma() cannot propagate it since it is a
>> void function.
>>
>> Change the return type to int so that the driver can retry
>> probing later in case the DMA-engine driver is probed after
>> the TMIO MMC driver.
>>
>> I moved the call for tmio_mmc_request_dma() up because it may
>> fail now.  I also removed unneeded clearing of host->chan_{tx,rx}
>> because (struct tmio_mmc_host) is allocated by kzalloc().
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
>
> Thanks for your patch!
>
> Isn't the idea to fall back to PIO if the DMA-engine driver is not found?
>
> Unfortunately there's no way to distinguish between "DMA-engine hasn't been
> probed yet" and "DMA-engine is not available" (e.g. CONFIG_RCAR_DMAC=n).
> In both cases, dma_request_chan() will return -EPROBE_DEFER.
> So if you treat this as an actual error, and propagate it, the following
> will happen:
>   - In case 1, the MMC driver will be reprobed successfully later.
>   - In case 2,the MMC driver will never succeed.
>
> Or am I missing something?


You are right.

drivers/Makefile lists 'dma/' before 'mmc/',
so this is not a real problem.

I will let my driver fallback to PIO for any error.

Thanks.




> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ