On Thu, Feb 18, 2021 at 12:29:29PM +0100, Mark Kettenis wrote:
> > Date: Thu, 18 Feb 2021 22:24:10 +1100
> > From: Jonathan Gray <j...@jsg.id.au>
> > 
> > On Thu, Feb 18, 2021 at 12:01:28PM +0100, Mark Kettenis wrote:
> > > > Date: Thu, 18 Feb 2021 21:18:51 +1100
> > > > From: Jonathan Gray <j...@jsg.id.au>
> > > 
> > > I suspect that there are some ports that need to get their unveils
> > > updated if we do this.
> > 
> > firefox ports were updated.  Not aware of anything else in ports that
> > unveils /dev/drm.
> 
> Doesn't chromium use unveil?

chromium opens the device outside of the sandbox

> 
> Anyway, this should make unveiling easier and if you are coordinating
> with the ports folks, this is ok kettenis@
> 
> > > > Index: lib/libdrm/xf86drm.h
> > > > ===================================================================
> > > > RCS file: /cvs/xenocara/lib/libdrm/xf86drm.h,v
> > > > retrieving revision 1.21
> > > > diff -u -p -r1.21 xf86drm.h
> > > > --- lib/libdrm/xf86drm.h        11 Feb 2021 10:27:08 -0000      1.21
> > > > +++ lib/libdrm/xf86drm.h        18 Feb 2021 10:02:03 -0000
> > > > @@ -76,18 +76,11 @@ extern "C" {
> > > >         (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
> > > >  #define DRM_DEV_MODE    (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
> > > >  
> > > > -#ifdef __OpenBSD__
> > > > -#define DRM_DIR_NAME  "/dev"
> > > > -#define DRM_PRIMARY_MINOR_NAME  "drm"
> > > > -#define DRM_CONTROL_MINOR_NAME  "drmC"
> > > > -#define DRM_RENDER_MINOR_NAME   "drmR"
> > > > -#else
> > > >  #define DRM_DIR_NAME  "/dev/dri"
> > > >  #define DRM_PRIMARY_MINOR_NAME  "card"
> > > >  #define DRM_CONTROL_MINOR_NAME  "controlD"
> > > >  #define DRM_RENDER_MINOR_NAME   "renderD"
> > > >  #define DRM_PROC_NAME "/proc/dri/" /* For backward Linux compatibility 
> > > > */
> > > > -#endif
> > > >  
> > > >  #define DRM_DEV_NAME          "%s/" DRM_PRIMARY_MINOR_NAME "%d"
> > > >  #define DRM_CONTROL_DEV_NAME  "%s/" DRM_CONTROL_MINOR_NAME "%d"
> > > > Index: xserver/hw/xfree86/drivers/modesetting/driver.c
> > > > ===================================================================
> > > > RCS file: 
> > > > /cvs/xenocara/xserver/hw/xfree86/drivers/modesetting/driver.c,v
> > > > retrieving revision 1.9
> > > > diff -u -p -r1.9 driver.c
> > > > --- xserver/hw/xfree86/drivers/modesetting/driver.c     12 Dec 2020 
> > > > 09:30:54 -0000      1.9
> > > > +++ xserver/hw/xfree86/drivers/modesetting/driver.c     18 Feb 2021 
> > > > 10:02:03 -0000
> > > > @@ -226,7 +226,7 @@ open_hw(const char *dev)
> > > >      else {
> > > >          dev = getenv("KMSDEVICE");
> > > >          if ((NULL == dev) || ((fd = priv_open_device(dev)) == -1)) {
> > > > -            dev = "/dev/drm0";
> > > > +            dev = "/dev/dri/card0";
> > > >              fd = priv_open_device(dev);
> > > >          }
> > > >      }
> > > > 
> > > > 
> > > 
> > 
> 

Reply via email to