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]
Date:   Thu, 27 Jul 2023 16:07:59 +0200
From:   Javier Martinez Canillas <javierm@...hat.com>
To:     Arnd Bergmann <arnd@...nel.org>, David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Maxime Ripard <mripard@...nel.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Sam Ravnborg <sam@...nborg.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/ssd130x: drop DRM_GEM_SHADOW_PLANE_FUNCS override

Arnd Bergmann <arnd@...nel.org> writes:

Hello Arnd,

Thanks a lot for your patch.

> From: Arnd Bergmann <arnd@...db.de>
>
> It is not possible for ssd130x_primary_plane_funcs to use both
> its own reset/duplicate/destroy callbacks and the ones from
> DRM_GEM_SHADOW_PLANE_FUNCS:
>
> In file included from drivers/gpu/drm/solomon/ssd130x.c:29:
> include/drm/drm_gem_atomic_helper.h:100:18: error: initialized field overwritten [-Werror=override-init]
>   100 |         .reset = drm_gem_reset_shadow_plane, \
>   101 |         .atomic_duplicate_state = drm_gem_duplicate_shadow_plane_state, \
>   102 |         .atomic_destroy_state = drm_gem_destroy_shadow_plane_state
>       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/solomon/ssd130x.c:744:9: note: in expansion of macro 'DRM_GEM_SHADOW_PLANE_FUNCS'
>   744 |         DRM_GEM_SHADOW_PLANE_FUNCS,
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
>

Gah, I missed that. I wonder how this compile warning doesn't show up for me.

> Since the custom callbacks were just added, I assume these are the
> ones it is meant to use, so remvoe the generic overrides.
>
> Fixes: 45b58669e532b ("drm/ssd130x: Allocate buffer in the plane's .atomic_check() callback")

Unfortunately that's not enough, because the plane atomic state handlers
that were introduced in that commit are broken so removing the macro will
regress the driver.

I've posted a patch that drops the macro but also fixes the handlers for
the driver to work with the custom callbacks:

https://lists.freedesktop.org/archives/dri-devel/2023-July/415897.html

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ