lkml.org 
[lkml]   [2006]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [take12 0/3] kevent: Generic event handling mechanism.
On Wed, Aug 23, 2006 at 11:49:22AM +0200, Jari Sundell (sundell.software@gmail.com) wrote:
> >> Only void * I'm seeing belongs to the user, (udata) perhaps you are
> >> talking of something different?
> >
> >Yes, exactly about it.
> >
> >I put union {
> > u32 a[2];
> > void *b;
> >}
> >epcially to eliminate that problem.
>
> It's just random data of a known maximum size appended to the struct,
> I'm sure you can find a clean way to handle it. If you mangle the
> first variable name in your union, you'll end up with something that
> should be usable instead of udata.

If there will be usual pointer, size of the whole structure will be
different in kernel and userspace.

> >And I'm not that sure aboit stuff like uptr_t or how they call pointers
> >in userspace and kernelspace.
>
> Well, I can't find any use of pointers in your struct ukevent, nor in
> any of the kqueue events in my man page. So if this is a deficit it
> applies to both, I guess?

No, it will change sizes of the structure in kernelspace and userspace,
so they just can not communicate.

> >ukevent is aligned to 8 bytes already (it's size selected to be 40 bytes),
> >so it should not be a problem.
> >
> >> Eric
>
> Even if it is so, wouldn't it be better to be explicit about it?

Ok, I will add a comment about it.

> Rakshasa

--
Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-23 12:25    [W:0.084 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site