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: <AANLkTinfwtR5MYe5DTnU_bRvVKPt4U-DuYczBW_sX9Yp@mail.gmail.com>
Date:	Wed, 29 Sep 2010 15:51:17 -0700
From:	Dan Williams <dan.j.williams@...el.com>
To:	Linus Walleij <linus.ml.walleij@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] DMAENGINE: define a dummy filter function for coh901318

On Wed, Sep 29, 2010 at 3:36 PM, Linus Walleij
<linus.ml.walleij@...il.com> wrote:
> 2010/9/29 Dan Williams <dan.j.williams@...el.com>:
>> On Tue, Sep 28, 2010 at 12:03 AM, Linus Walleij <linus.walleij@...ricsson.com> wrote:
>>> All platform data has to be made conditional on
>>> as to avoid cluttering the code with other #ifdef:s.
>>>
>>
>> The filter id function assumes that the channel passed in is a
>> coh901318 which requires that you are in a mach-u300 build and that no
>> other dma driver will ever appear on this platform.  Which may be
>> true,
>
> It is... I promise, the platform only has COH901318 and is not being
> refined into future derivates with any multi-DMA-engine variants.
>
> Feels a bit over-engineered to take that aspect into account.
> Can't we handle it the day we have a platform available with
> two or more diverse DMA controllers?

Yeah, no rush to change it now.

>
>> but it would be safer to look at
>> chan->device->dev->platform_data and deduce that it is indeed a
>> coh901318 channel before de-referencing private fields.
>
> I read it like you want a patch also patching the filter function to
> do this check or am I misreading it?

Yes.

>
> Right now it atleast has the other theoretical upside (as compared to
> having another totally different DMA block): it can support
> multiple instances of COH901318:s, handling each a subset of
> channels. In this case the filter function will locate the right channel
> on the right instance -> elegant.
>
>> Taken further
>> if you rewrite the filter_id function in terms of platform_data then
>> it could live purely in the arch code and not depend on the driver.
>> ...or did you already try this route and hit a snag?
>
> Nah can probably be done, it just feels more elegant to check
> the channel ID (in this case a simple number) against the thing
> that's actually registered in the driver.
>
> It will be a bigger patch fixing a sort of different problem though,
> this will just fix my problem of compiling the platform without
> DMA support, which is currently not possible without a lot of
> #ifdefs in the platform code.

You can add my acked-by to this one and take it through the arch tree.

...but an eventual patch killing a driver specific export and making
the filter function intrinsically safe (i.e. without needing to know
it is a config bool, or that no other dma blocks will show up on this
machine) would be readily accepted.

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ