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  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:   Thu, 8 Apr 2021 14:00:48 +0200
From:   David Hildenbrand <>
To:     Arnd Bergmann <>
Cc:     Linux Kernel Mailing List <>,
        Linux-MM <>, Joel Stanley <>,
        David Airlie <>,
        Daniel Vetter <>,
        Andrew Jeffery <>,
        Lucas Stach <>,
        Russell King <>,
        Christian Gmeiner <>,
        Mike Rapoport <>,
        Bartlomiej Zolnierkiewicz <>,
        Linus Walleij <>,
        Michal Simek <>,
        Masahiro Yamada <>,
        Randy Dunlap <>,
        Peter Collingbourne <>,
        linux-aspeed <>,
        dri-devel <>,
        Linux ARM <>,
        The etnaviv authors <>,
        Linux Fbdev development list <>
Subject: Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from
 aspeed or etnaviv

On 08.04.21 13:44, Arnd Bergmann wrote:
> On Thu, Apr 8, 2021 at 1:00 PM David Hildenbrand <> wrote:
>>> It is a somewhat awkward way to say "prevent this symbol from
>>> being =y if the dependency is =m".
>> What would be the right thing to do in the case here then to achieve the
>> "if DRMA_ASPEED_GFX is enabled, also enable DMA_CMA id possible"?
>> One approach could be to have for DMA_CMA
>> default y if DRMA_ASPEED_GFX
>> but it feels like the wrong way to tackle this.
> I'm still not sure what you are trying to achieve. Is the idea only to provide
> a useful default for DMA_CMA depending on which drivers are enabled?

"Random drivers should not override a user configuration of core knobs
(e.g., CONFIG_DMA_CMA=n)."

Let's assume I'm a distribution and want to set CONFIG_CMA=n or want to 
set CONFIG_DMA_CMA=n with CONFIG_CMA=y; there is no way to do that with 
e.g., DRMA_ASPEED_GFX=y because it will always override my (user!) 
setting -- even though it doesn't really always need it. Using "select" 
is the problem here.

> This is something you could do using a hidden helper symbol like
>         bool "Aspeed display driver"
>         select DRM_WANT_CMA
> config DRM_WANT_CMA
>         bool
>         help
>            Select this from any driver that benefits from CMA being enabled
> config DMA_CMA
>         bool "Use CMA helpers for DRM"
>         default DRM_WANT_CMA
>           Arnd

That's precisely what I had first, with an additional "WANT_CMA" --  but 
looking at the number of such existing options (I was able to spot 1 !) 
I wondered if there is a better approach to achieve the same; "imply" 
sounded like a good candidate.


David / dhildenb

Powered by blists - more mailing lists