From: Vojtech P. <vo...@su...> - 2002-01-27 03:54:17
|
On Sat, Jan 26, 2002 at 11:37:27PM -0200, Rodrigo Damazio wrote: > >You are right. Anyway, I think we should stick to ANSI C. Not for the > >driver itself of course, but for the user-visible headers. > >Yet another solution would be that the user provides a pointer to a buffer > >describing the custom effect. > >Isn't this solution nicer ? I personnaly dislike the idea of having > >several ioctls perform one operation (the uploading of a full-effect) > > > The idea is good...would also need a buffer size in there...is > that safe enough? To just invade userspace and take the buffer?? What > happens if the user allocated a 1-byte buffer and tells us it has 1000 > bytes?? Would it be possible that we'd be invading another process's > memory?? (excuse me, I hate memory management, hehe) No, that can't happen. But the process will either crash or the data transfer will fail with -EFAULT. -- Vojtech Pavlik SuSE Labs |