[lkml]   [2008]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH/RFC] pci: dynids.use_driver_data considered harmful
On Fri, Aug 15, 2008 at 12:15:01PM -0700, Jesse Barnes wrote:
> On Friday, August 15, 2008 11:55 am Jean Delvare wrote:
> > In fact we can do even better than that. We could accept from
> > user-space only driver_data values which at least one device ID entry in
> > the driver already uses. That should be fairly easy to implement, and
> > would offer a level of safety an order of magnitude above what we have
> > at the moment... And it works both ways: if 0 is not a valid data for
> > some driver, that would force the user to provide a non-zero (and
> > valid) data value. And it guarantees that the user can't ask for
> > something the driver doesn't expect, so drivers don't even need extra
> > checks. And no need for a use_driver_data flag either.
> Meaning a driver audit of the usage? Yeah that would be great.
> > The only drawback is that it prevents the user from passing a "new"
> > data value even if it would be valid. But honestly, I don't expect that
> > case to happen frequently... if ever at all. So I'd say the benefits
> > totally outweight the drawback.
> >
> > If the interested people agree with the idea, I'll look into
> > implementing it.
> Well the audit would show if user supplied "new" values are needed; otherwise
> the approach sounds good to me.

That sounds reasonable, and should work properly.

No objection from me.


greg k-h

 \ /
  Last update: 2008-08-16 08:31    [W:0.106 / U:12.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site