Re: [PATCH 1/8] drm/i915: expose helper mapping exec flag engine to intel_engine_cs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Lionel Landwerlin (2018-05-03 21:09:01)
> On 03/05/18 19:00, Tvrtko Ursulin wrote:
> >> One other thing I've been wondering is whether we should strictly 
> >> validate the input from userspace.
> >> Right now we min/max the numbers and never raise any error.
> >
> > It does feel low level enough that we should reject userspace trying 
> > to feed in nonsense for its own good.
> 
> Okay, adding that.

As a general rule, validate input to protect the kernel and not the
user. It's a fine line between strict validation and preventing the user
from doing something you didn't consider/appreciate but is perfectly
valid (and turns out to be the preferred way down the line).

(Not enough validation hits the headlines; too much and we just curse
you as we have to carry two interfaces to do the job of one ;)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux