Re: [take6 1/3] kevent: Core files.

David Miller
2006-08-10T06:42:31Z

From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Date: Thu, 10 Aug 2006 10:14:33 +0400

> On Wed, Aug 09, 2006 at 03:21:27PM -0700, Andrew Morton (akpm@osdl.org) wrote:
> > On big-endian machines, this pointer will appear to be word-swapped as far
> > as a 64-bit kernel is concerned. Or something.
> >
> > IOW: What's going on here??
>
> It is user data - I put there a union just to simplify userspace, so it
> sould not require some typecasting.

And this is consistent with similar mechianism we use for
netlink socket dumping, so that we don't have compat layer
crap just because we provide a place for the user to store
his pointer or whatever there.

> > > + k->kevent_entry.next = LIST_POISON1;
> > > + k->storage_entry.prev = LIST_POISON2;
> > > + k->ready_entry.next = LIST_POISON1;
> >
> > Nope ;)
>
> I use pointer checks to determine if entry is in the list or not, why it
> is frowned upon here?

As Andrew mentioned in another posting, these poison macros
are likely to simply go away some day, so you should not use
them.

If you want pointer encoded tags you use internally, define your own.