On Wed, May 13, 2015 at 09:19:09AM +0200, Daniel Vetter wrote: > On Wed, May 13, 2015 at 07:54:48AM +0100, Peter Antoine wrote: > > As these functions are only used by one driver and there are security holes > > in these functions. Make the functions optional. > > > > These changes are based on the two patches: > > commit c21eb21cb50d58e7cbdcb8b9e7ff68b85cfa5095 > > Author: Dave Airlie <airlied@xxxxxxxxxx> > > > > And the commit that the above patch reverts: > > commit 7c510133d93dd6f15ca040733ba7b2891ed61fd1 > > Author: Daniel Vetter <daniel.vetter@xxxxxxxx> > > > > This should now turn off the context feature. > > > > Issue: VIZ-5485 > > Signed-off-by: Peter Antoine <peter.antoine@xxxxxxxxx> > > Please cc drm core patches to dri-devel. Review below. > -Daniel > > > --- > > drivers/gpu/drm/drm_context.c | 36 ++++++++++++++++++++++++++++++++++++ > > drivers/gpu/drm/drm_drv.c | 12 +++++++----- > > 2 files changed, 43 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c > > index 9b23525..574be2a 100644 > > --- a/drivers/gpu/drm/drm_context.c > > +++ b/drivers/gpu/drm/drm_context.c > > @@ -53,6 +53,9 @@ struct drm_ctx_list { > > */ > > void drm_legacy_ctxbitmap_free(struct drm_device * dev, int ctx_handle) > > { > > + if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT)) > > + return -EINVAL; > > This doesn't compile too well. Also like with the previous patch, drivers > without DRIVER_MODESET still need these ioctls. Only via actually needs them AFAIK, but continuing to allow them for the rest of the old drivers is no worse than what we have today. And I think nouveau just needs a nop create/destroy ioctls, so I think we should really just make those two nops for nouveau (or maybe for all modern drivers?) and reject the rest of the ioctls even for nouveau. -- Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx