[Intel-gfx] [PATCH] drm/i915: Promote invalid buffer alignment.

Eric Anholt eric at anholt.net
Mon Dec 7 20:56:31 CET 2009


On Sun, 06 Dec 2009 08:15:05 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Sat, 5 Dec 2009 23:57:07 -0800, Kenneth Graunke <kenneth at whitecape.org> wrote:
> > I'm really uncomfortable with this suggestion.  For one, BUG_ON causes a 
> > kernel panic, killing the whole system.  This seems rather extreme...even 
> > with completely dead graphics, it's useful to keep the system alive so one 
> > can at least ssh in and shut down cleanly.
> 
> The suggestion was to move the EINVAL checking to the kernel-userspace
> boundary in the ioctls, and then to BUG_ON if we ever saw an invalid
> alignment -- which would indeed be a kernel programming error. BUG_ON
> does not in itself cause a panic, and in the likely cases here you will
> still be able to ssh in and inspect the system.
> -ickle

While you may be able to ssh in, you've completely hosed the system.  I
won't apply a patch doing this.

I'm not entirely clear here -- with this warning patch, will released
userland trigger this error?  If so, this should be a debug patch that
we don't merge, just use it to track down bad userland ourselves.

The error return on bad reloc offsets was an example of a similar change
that bit us pretty hard.  Userland was doing bad things, but by
making it so that instead of possibly hanging the GPU in some really
rare condition we always dropped people's rendering on the floor, we
regressed a lot of systems.  I don't want to do that again.



More information about the Intel-gfx mailing list