On Tue, Sep 22, 2009 at 11:51 PM, Corbin Simpson
<mostawesomed...@gmail.com>wrote:

> On 09/22/2009 01:19 PM, Nicolai Hähnle wrote:
> > I'm pretty confident that you can write a perfectly legal OpenGL
> application
> > that creates commands that take *minutes* to run on decent graphics
> cards.
> > Just produce a huge number of screen-sized primitives and use a very long
> > fragment program that samples from a huge, non-mipmapped texture in an
> > entirely non-locally-coherent way - and that doesn't even take GLSL loops
> into
> > account!
>
> I don't have any examples with me, but you could, as an admittedly
> contrived possibility, take several hundred thousand verts, submit them
> in immediate mode without VBOs, multitexture from all eight texture
> samplers using 256x256x256 3D textures, use 4 4096x4096 render targets,
> and 16x FSAA multisample the whole shebang. Should (barely) fit on a
> 512MB r500, and take at least half a minute to execute, probably more.
>
> And as you said, GLSL can be used to write *very* long-running shaders.
>
> Really, there's no solution to this that won't also lock out legitimate
> uses, I fear.
>
> ~ C.
>
> Too bad GPU reset is already now stopping this use case while it doesn't
protect user from possible attack causing multiple GPU reset in row. So this
long rendering operation blocking GPU is more like scheduler or mesa bug
that it doesn't split rendering to small enough parts that we can scheduler
something else in between for user interface. Is it possible to scheduler
something els to GPU wile only part of GPU runs the slow and long running
shader? If no then it looks like big limitation in hw design.

I can see also possible attacks that use GPU hang as way to disable
computers from local use possible scenario. And if this only requires access
to normal user account it is real problem and should be protected. It is
possible that someone would write virus that targets Linux desktop and tries
to casue harm to users.
This kind of virus in corporate network causing many computers fall to
unusable state would cost quite a lot. Even tough admin could clean the
virus with ssh but it still cost a lot of money when computer is unusable
even for short time.

Do I have to come up with more scenarios why GPU reset would need to protect
local access to computer? I think it is just bad if normal user can cause
local access to be unusable for extended period of time.

Of course this protections has to be configurable in runtime or boot time.

And I posted idea here before even exploring how it would be practically
possible to get more toughs what should be taken in account.
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to