From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH] drm/i915: Add OACONTROL to the command parser register whitelist. Date: Fri, 16 May 2014 13:14:01 -0700 Message-ID: <20140516131401.56756f89@jbarnes-desktop> References: <20140327075721.GA26878@phenom.ffwll.local> <20140327155708.GA4690@bdvolkin-ubuntu-desktop> <53349971.3000806@whitecape.org> <5334B2C4.5000702@whitecape.org> <20140516120545.23ddf6d7@jbarnes-desktop> <20140516192050.GA4495@nuc-i3427.alporthouse.com> <20140516123408.75e68aed@jbarnes-desktop> <20140516125330.040ca508@jbarnes-desktop> <20140516201227.GA12671@bdvolkin-ubuntu-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from gproxy2-pub.mail.unifiedlayer.com (gproxy2-pub.mail.unifiedlayer.com [69.89.18.3]) by gabe.freedesktop.org (Postfix) with SMTP id 6866A6F00A for ; Fri, 16 May 2014 13:13:51 -0700 (PDT) In-Reply-To: <20140516201227.GA12671@bdvolkin-ubuntu-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Volkin, Bradley D" Cc: Daniel Vetter , "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Fri, 16 May 2014 13:12:27 -0700 "Volkin, Bradley D" wrote: > On Fri, May 16, 2014 at 12:53:30PM -0700, Jesse Barnes wrote: > > On Fri, 16 May 2014 12:34:08 -0700 > > Jesse Barnes wrote: > > > > > On Fri, 16 May 2014 20:20:50 +0100 > > > Chris Wilson wrote: > > > > Yes, X only sets the secure bit when it pokes the display registers, and > > > > those registers should be privileged even with a cmd parser in place > > > > (which they are). > > > > > > > > Daniel's argument presumes that we haven't been patching out the > > > > cmd parser all this time anyway. > > > > > > Yeah I know we have some perf issues as it is; it would be nice if the > > > overhead were so minimal that it didn't matter. But just on principle, > > > scanning secure buffers seems wrong, and I'm trying to understand why > > > Daniel would want it. > > > > Ok Daniel explained on IRC that we actually have a special whitelist > > for the secure batch case. The idea is to allow a DRM_MASTER to submit > > secure batches, but still prevent a local root exploit. I suppose that > > means preventing access to most commands and registers, but allowing a > > few extra things like wait events and display register updates. > > Just to clarify further: the additional register whitelist and commands > are only based on DRM_MASTER. Setting I915_EXEC_SECURE is not required. So > I suppose we could stop scanning batches that have I915_EXEC_SECURE and > userspace could stop sending such batches when the parser is fully enabled. Ah ok, yeah that's another option, but now I understand where Daniel is coming from with testing, since that's not how the current X driver behaves. -- Jesse Barnes, Intel Open Source Technology Center