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: <ZJAaL/MJp6gBbgdt@ashyti-mobl2.lan>
Date:   Mon, 19 Jun 2023 11:04:47 +0200
From:   Andi Shyti <andi.shyti@...ux.intel.com>
To:     Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
Cc:     Andi Shyti <andi.shyti@...ux.intel.com>,
        Arnd Bergmann <arnd@...nel.org>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>, Arnd Bergmann <arnd@...db.de>,
        Matt Roper <matthew.d.roper@...el.com>,
        Lucas De Marchi <lucas.demarchi@...el.com>,
        Imre Deak <imre.deak@...el.com>,
        Alan Previn <alan.previn.teres.alexis@...el.com>,
        Anshuman Gupta <anshuman.gupta@...el.com>,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference
 conditional again

Hi Tvrtko,

On Fri, Jun 16, 2023 at 12:17:50PM +0100, Tvrtko Ursulin wrote:
> 
> On 16/06/2023 11:16, Andi Shyti wrote:
> > Hi Arnd,
> > 
> > On Fri, Jun 16, 2023 at 11:31:47AM +0200, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@...db.de>
> > > 
> > > The function is only defined if CONFIG_PROC_FS is enabled:
> > > 
> > > ld.lld: error: undefined symbol: i915_drm_client_fdinfo
> > > > > > referenced by i915_driver.c
> > > > > >                drivers/gpu/drm/i915/i915_driver.o:(i915_drm_driver) in archive vmlinux.a
> > > 
> > > Use the PTR_IF() helper to make the reference NULL otherwise.
> > > 
> > > Fixes: e894b724c316d ("drm/i915: Use the fdinfo helper")
> > > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > > ---
> > >   drivers/gpu/drm/i915/i915_driver.c     | 2 +-
> > >   drivers/gpu/drm/i915/i915_drm_client.h | 2 --
> > >   2 files changed, 1 insertion(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> > > index 75cbc43b326dd..0ad0c5885ec27 100644
> > > --- a/drivers/gpu/drm/i915/i915_driver.c
> > > +++ b/drivers/gpu/drm/i915/i915_driver.c
> > > @@ -1816,7 +1816,7 @@ static const struct drm_driver i915_drm_driver = {
> > >   	.open = i915_driver_open,
> > >   	.lastclose = i915_driver_lastclose,
> > >   	.postclose = i915_driver_postclose,
> > > -	.show_fdinfo = i915_drm_client_fdinfo,
> > > +	.show_fdinfo = PTR_IF(IS_ENABLED(CONFIG_PROC_FS), i915_drm_client_fdinfo),
> > >   	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
> > >   	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
> > > diff --git a/drivers/gpu/drm/i915/i915_drm_client.h b/drivers/gpu/drm/i915/i915_drm_client.h
> > > index 4c18b99e10a4e..67816c912bca1 100644
> > > --- a/drivers/gpu/drm/i915/i915_drm_client.h
> > > +++ b/drivers/gpu/drm/i915/i915_drm_client.h
> > > @@ -47,8 +47,6 @@ static inline void i915_drm_client_put(struct i915_drm_client *client)
> > >   struct i915_drm_client *i915_drm_client_alloc(void);
> > > -#ifdef CONFIG_PROC_FS
> > >   void i915_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file);
> > > -#endif
> > 
> > nice! This is becoming the new trend now.
> > 
> > Reviewed-by: Andi Shyti <andi.shyti@...ux.intel.com>
> 
> Thanks for the fix and review! (And I got to learn about existence of PTR_IF
> too.)
> 
> Andi will you merge once green or should I?

will do! Thanks!

Andi

> Regards,
> 
> Tvrtko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ