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:   Sun, 25 Apr 2021 11:23:56 +0800
From:   Zhenyu Wang <zhenyuw@...ux.intel.com>
To:     Alex Williamson <alex.williamson@...hat.com>
Cc:     Jason Gunthorpe <jgg@...pe.ca>,
        Zhenyu Wang <zhenyuw@...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@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Kevin Tian <kevin.tian@...el.com>,
        Cornelia Huck <cohuck@...hat.com>,
        Arnd Bergmann <arnd@...db.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV

On 2021.04.23 09:20:09 -0600, Alex Williamson wrote:
> On Fri, 23 Apr 2021 09:07:09 -0300
> Jason Gunthorpe <jgg@...pe.ca> wrote:
> 
> > On Fri, Apr 23, 2021 at 11:54:26AM +0800, Zhenyu Wang wrote:
> > > On 2021.04.22 10:58:10 -0300, Jason Gunthorpe wrote:  
> > > > On Thu, Apr 22, 2021 at 03:35:33PM +0200, Arnd Bergmann wrote:  
> > > > > From: Arnd Bergmann <arnd@...db.de>
> > > > > 
> > > > > The Kconfig dependency is incomplete since DRM_I915_GVT is a 'bool'
> > > > > symbol that depends on the 'tristate' VFIO_MDEV. This allows a
> > > > > configuration with VFIO_MDEV=m, DRM_I915_GVT=y and DRM_I915=y that
> > > > > causes a link failure:
> > > > > 
> > > > > x86_64-linux-ld: drivers/gpu/drm/i915/gvt/gvt.o: in function `available_instances_show':
> > > > > gvt.c:(.text+0x67a): undefined reference to `mtype_get_parent_dev'
> > > > > x86_64-linux-ld: gvt.c:(.text+0x6a5): undefined reference to `mtype_get_type_group_id'
> > > > > x86_64-linux-ld: drivers/gpu/drm/i915/gvt/gvt.o: in function `description_show':
> > > > > gvt.c:(.text+0x76e): undefined reference to `mtype_get_parent_dev'
> > > > > x86_64-linux-ld: gvt.c:(.text+0x799): undefined reference to `mtype_get_type_group_id'
> > > > > 
> > > > > Clarify the dependency by specifically disallowing the broken
> > > > > configuration. If VFIO_MDEV is built-in, it will work, but if
> > > > > VFIO_MDEV=m, the i915 driver cannot be built-in here.
> > > > > 
> > > > > Fixes: 07e543f4f9d1 ("vfio/gvt: Make DRM_I915_GVT depend on VFIO_MDEV")
> > > > > Fixes: 9169cff168ff ("vfio/mdev: Correct the function signatures for the mdev_type_attributes")
> > > > > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > > > >  drivers/gpu/drm/i915/Kconfig | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)  
> > > > 
> > > > Oh kconfig stuff like this makes my head hurt, thanks for finding it
> > > > 
> > > > I also can't see an alternative to this ugly thing, besides having the
> > > > i915 guys properly modularize this code someday
> > > > 
> > > > Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
> > > >   
> > > 
> > > I don't really want this mess to propagate further. We should move
> > > mdev related stuff to kvmgt module instead, so not pretend any more to
> > > possibly use that for other hypervisor..
> > > 
> > > Sorry that I didn't realize this issue when Jason proposed this. Let
> > > me do the left cleanup.  
> > 
> > It would be good, but Alex should still take this patch for the
> > upcoming merge window, you can revert it when you do all the cleanups
> 
> I can include it, but I'll wait for confirmation from Zhenyu.  Thanks,
> 

I'm ok with this, future cleanup fixes would still go through i915 pull,
it only lefts for some tests, will send that for next kernel.

Acked-by: Zhenyu Wang <zhenyuw@...ux.intel.com>

thanks

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ