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:   Wed, 1 Feb 2023 11:36:48 +0100
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Jacek Lawrynowicz <jacek.lawrynowicz@...ux.intel.com>,
        Oded Gabbay <ogabbay@...nel.org>,
        Arnd Bergmann <arnd@...nel.org>
Cc:     Jeffrey Hugo <quic_jhugo@...cinc.com>,
        Arnd Bergmann <arnd@...db.de>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        Melissa Wen <mwen@...lia.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Dave Airlie <airlied@...hat.com>
Subject: Re: [PATCH] [v2] accel: fix CONFIG_DRM dependencies



Am 31.01.23 um 10:20 schrieb Jacek Lawrynowicz:
> On 31.01.2023 09:53, Oded Gabbay wrote:
>> On Sat, Jan 28, 2023 at 12:15 AM Arnd Bergmann <arnd@...nel.org> wrote:
>>>
>>> From: Arnd Bergmann <arnd@...db.de>
>>>
>>> At the moment, accel drivers can be built-in even with CONFIG_DRM=m,
>>> but this causes a link failure:
>>>
>>> x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_dev_init':
>>> ivpu_drv.c:(.text+0x1535): undefined reference to `drmm_kmalloc'
>>> x86_64-linux-ld: ivpu_drv.c:(.text+0x1562): undefined reference to `drmm_kmalloc'
>>> x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_remove':
>>> ivpu_drv.c:(.text+0x1faa): undefined reference to `drm_dev_unregister'
>>> x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_probe':
>>> ivpu_drv.c:(.text+0x1fef): undefined reference to `__devm_drm_dev_alloc'
>>>
>>> The problem is that DRM_ACCEL is a 'bool' symbol symbol, so driver that
>>> only depend on DRM_ACCEL but not also on DRM do not see the restriction
>>> to =m configs.
>>>
>>> To ensure that each accel driver has an implied dependency on CONFIG_DRM,
>>> enclose the entire Kconfig file in an if/endif check.
>>>
>>> Fixes: 8bf4889762a8 ("drivers/accel: define kconfig and register a new major")
>>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>>> ---
>>> v2: rearrage the DRM dependency rather than requiring DRM to be built-in
>>> ---
>>>   drivers/accel/Kconfig | 5 ++++-
>>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/accel/Kconfig b/drivers/accel/Kconfig
>>> index 834863902e16..c437206aa3f1 100644
>>> --- a/drivers/accel/Kconfig
>>> +++ b/drivers/accel/Kconfig
>>> @@ -6,9 +6,10 @@
>>>   # as, but not limited to, Machine-Learning and Deep-Learning acceleration
>>>   # devices
>>>   #
>>> +if DRM
>>> +
>>>   menuconfig DRM_ACCEL
>>>          bool "Compute Acceleration Framework"
>>> -       depends on DRM
>>>          help
>>>            Framework for device drivers of compute acceleration devices, such
>>>            as, but not limited to, Machine-Learning and Deep-Learning
>>> @@ -25,3 +26,5 @@ menuconfig DRM_ACCEL
>>>
>>>   source "drivers/accel/habanalabs/Kconfig"
>>>   source "drivers/accel/ivpu/Kconfig"
>>> +
>>> +endif
>>> --
>>> 2.39.0
>>>
>> This patch is:
>> Reviewed-by: Oded Gabbay <ogabbay@...nel.org>
> 
> Applied to drm-misc-next.

I have cherry-picked the patch into drm-misc-next-fixes.

> Thanks.

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ