From: "Thomas Hellström" <thomas@tungstengraphics.com>
To: Dave Airlie <airlied@gmail.com>
Cc: Greg KH <greg@kroah.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Eric Anholt <eric@anholt.net>
Subject: Re: [RFC] [PATCH] DRM TTM Memory Manager patch
Date: Tue, 01 May 2007 02:10:48 +0200 [thread overview]
Message-ID: <46368588.3040503@tungstengraphics.com> (raw)
In-Reply-To: <21d7e9970704301610u5d5132uc282ac697c9df2be@mail.gmail.com>
Dave Airlie wrote:
>
> Most likely in doxygen as that is what Mesa uses and the intersection
> of developers is higher in that area, I'll take it as a task to try
> and kerneldoc the drm at some stage..
>
>> - what's with the /proc interface? Don't add new proc code for
>> non-process related things. This should all go into sysfs
>> somewhere. And yes, I know /proc/dri/ is there today, but don't add
>> new stuff please.
>
>
> Well we should move all that stuff to sysfs, but we have all the
> infrastructure for publishing this stuff under /proc/dri and adding
> new files doesn't take a major amount, as much as I appreciate sysfs,
> it isn't suitable for this sort of information dump, the whole one
> value per file is quite useless to provide this sort of information
> which is uni-directional for users to send to us for debugging without
> have to install some special tool to join all the values into one
> place.. and I don't think drmfs is the answer either... or maybe it
> is....
>
>> - struct drm_bo_arg can't use an int or unsigned, as it crosses the
>> userspace/kernelspace boundry, use the proper types for all values
>> in those types of structures (__u32, etc.)
>
>
> int is defined, unsigned I'm not so sure about, the drm user space
> interface is usually specified in non-system specific types so the
> drm.h file is consistent across systems, so we would probably have to
> use uint32_t which other people have objected to, but I'd rather use
> uint32_t than unspecified types..
>
>> - there doesn't seem to be any validity checking for the arguments
>> passed into this new ioctl. Possibly that's just the way the rest
>> of the dri interface is, which is scary, but with the memory stuff,
>> you really should check things properly...
>
>
> Okay this needs fixing, we do check most ioctls args, the main thing
> passed in are handles and these are all looked up in the hash table,
> it may not be so obvious, also most of the ioctls are probably going
> to end up root or DRM master only, I'd like do an ioctl fuzzer at some
> stage, I'd suspect a lot more then the dri would be oopsable with
> permissions...
>
> Thanks,
> Dave.
I agree with Dave for most if not all of the above.
Typing, for example unsigned / uint32 vs u32, __u32 is very easily
fixable once we decide on a clear way to go to keep (if we want to
keep) compatibility with *bsd.
For the IOCTL checking, as Dave states, most invalid data will be
trapped in hash lookups and
checks in the buffer validation system, but probably far from all. A
fuzzer would be a nice tool to trap the exceptions.
/Thomas
next prev parent reply other threads:[~2007-05-01 0:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 6:55 [RFC] [PATCH] DRM TTM Memory Manager patch Dave Airlie
2007-04-27 16:39 ` Greg KH
2007-04-30 23:10 ` Dave Airlie
2007-04-30 23:50 ` Dave Jones
2007-05-01 0:10 ` Thomas Hellström [this message]
2007-05-01 22:36 ` Ingo Oeser
2007-05-02 3:59 ` Greg KH
2007-05-02 20:21 ` Eric Anholt
2007-05-02 23:01 ` Thomas Hellström
2007-05-04 4:07 ` Keith Packard
2007-05-04 8:07 ` Thomas Hellström
2007-05-04 8:49 ` Jerome Glisse
2007-05-04 9:40 ` Jerome Glisse
2007-05-04 15:28 ` Keith Packard
2007-05-04 11:03 ` Thomas Hellström
2007-05-04 11:57 ` Jerome Glisse
2007-05-04 12:32 ` Thomas Hellström
2007-05-04 12:52 ` Jerome Glisse
2007-05-04 15:32 ` Keith Packard
2007-05-04 15:15 ` Keith Packard
2007-05-04 15:57 ` Keith Whitwell
2007-05-04 16:26 ` Keith Packard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46368588.3040503@tungstengraphics.com \
--to=thomas@tungstengraphics.com \
--cc=airlied@gmail.com \
--cc=eric@anholt.net \
--cc=greg@kroah.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.