[PATCH 0/7] drm: Sanitize DRM_IOCTL_MODE_CREATE_DUMB input

Thierry Reding thierry.reding at gmail.com
Wed Nov 5 06:45:17 PST 2014


On Wed, Nov 05, 2014 at 02:24:42PM +0000, Russell King - ARM Linux wrote:
> On Wed, Nov 05, 2014 at 02:25:12PM +0100, Thierry Reding wrote:
> > Discussion on IRC lead to the conclusion that new IOCTLs should have
> > input validation and require userspace to zero out output parameters to
> > avoid this kind of mess in the future. In order to help avoid this kind
> > of ambiguity it would be a good idea to start documenting IOCTLs more
> > officially (e.g. in the DRM DocBook).
> 
> That is a good point, however not everyone can build the documentation.
> I tried a while back and the whole documentation subsystem is /soo/
> fragile its untrue.  You have to have the exact right versions installed
> and hope that the exact right versions have configured themselves to
> work together correctly, otherwise you get cryptic unsolvable error
> messages.  Tex is notorious for these problems.

I usually only build the HTML documentation which tends to be less prone
to the issues that you're describing.

> When I tried to generate the docbook stuff, after spending a significant
> amount of time trying to debug it, I just gave up completely with any
> ideas about ever adding to the documentation.  I've since decided that
> I am /never/ going to do anything past adding docbook comments to files.
> 
> If someone cares about linking them into the rest of the docbook system,
> and they have the capability to generate the docbook output, then that's
> fine and dandy, but I believe that requiring everyone to have that
> capability is asking far too much.

It looks as if perhaps running the xmldocs target would at least run
kerneldoc on the files even if it doesn't produce anything very human
readable. If that works for you it'd at least give you a means to check
that the kerneldoc comments you've added are consistent.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141105/a246e612/attachment.sig>


More information about the dri-devel mailing list