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]
Message-ID: <YG7TZa8VP458QS5y@kernel.org>
Date:   Thu, 8 Apr 2021 12:56:53 +0300
From:   Mike Rapoport <rppt@...nel.org>
To:     David Hildenbrand <david@...hat.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Joel Stanley <joel@....id.au>, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Andrew Jeffery <andrew@...id.au>,
        Lucas Stach <l.stach@...gutronix.de>,
        Russell King <linux+etnaviv@...linux.org.uk>,
        Christian Gmeiner <christian.gmeiner@...il.com>,
        Arnd Bergmann <arnd@...db.de>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Michal Simek <michal.simek@...inx.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        Peter Collingbourne <pcc@...gle.com>,
        linux-aspeed@...ts.ozlabs.org, dri-devel@...ts.freedesktop.org,
        linux-arm-kernel@...ts.infradead.org,
        etnaviv@...ts.freedesktop.org, linux-fbdev@...r.kernel.org
Subject: Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from
 aspeed or etnaviv

On Thu, Apr 08, 2021 at 11:20:11AM +0200, David Hildenbrand wrote:
> Random drivers should not override a user configuration of core knobs
> (e.g., CONFIG_DMA_CMA=n). Use "imply" instead, to still respect
> dependencies and manual overrides.
> 
> "This is similar to "select" as it enforces a lower limit on another
>  symbol except that the "implied" symbol's value may still be set to n
>  from a direct dependency or with a visible prompt."
> 
> Implying DRM_CMA should be sufficient, as that depends on CMA.

          ^ DMA_CMA
> 
> Note: If this is a real dependency, we should use "depends on DMA_CMA"
> instead -  but I assume the driver can work without CMA just fine --
> esp. when we wouldn't have HAVE_DMA_CONTIGUOUS right now.
> 
> Signed-off-by: David Hildenbrand <david@...hat.com>
> ---
>  drivers/gpu/drm/aspeed/Kconfig  | 3 +--
>  drivers/gpu/drm/etnaviv/Kconfig | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/aspeed/Kconfig b/drivers/gpu/drm/aspeed/Kconfig
> index 5e95bcea43e9..a055f763d230 100644
> --- a/drivers/gpu/drm/aspeed/Kconfig
> +++ b/drivers/gpu/drm/aspeed/Kconfig
> @@ -6,9 +6,8 @@ config DRM_ASPEED_GFX
>  	depends on MMU
>  	select DRM_KMS_HELPER
>  	select DRM_KMS_CMA_HELPER
> -	select DMA_CMA if HAVE_DMA_CONTIGUOUS
> -	select CMA if HAVE_DMA_CONTIGUOUS
>  	select MFD_SYSCON
> +	imply DRM_CMA

Ditto

>  	help
>  	  Chose this option if you have an ASPEED AST2500 SOC Display
>  	  Controller (aka GFX).
> diff --git a/drivers/gpu/drm/etnaviv/Kconfig b/drivers/gpu/drm/etnaviv/Kconfig
> index faa7fc68b009..5f5576b7221a 100644
> --- a/drivers/gpu/drm/etnaviv/Kconfig
> +++ b/drivers/gpu/drm/etnaviv/Kconfig
> @@ -9,9 +9,8 @@ config DRM_ETNAVIV
>  	select THERMAL if DRM_ETNAVIV_THERMAL
>  	select TMPFS
>  	select WANT_DEV_COREDUMP
> -	select CMA if HAVE_DMA_CONTIGUOUS
> -	select DMA_CMA if HAVE_DMA_CONTIGUOUS
>  	select DRM_SCHED
> +	imply DMA_CMA
>  	help
>  	  DRM driver for Vivante GPUs.
>  
> -- 
> 2.30.2
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ