need type to carry kernel pointers to user space
Werner Almesberger
almesber en lrc.di.epfl.ch
Jue Ene 20 12:14:54 CST 2000
Richard B. Johnson wrote:
> Okay. I get it. The "catch-all" which will work on every architecture,
> including those which have not been invented yet, is a (don't laugh)
> character array. Think about it. Simple casts+dereference gets to/from
> anything you want. Sixteen bytes per element, with the start aligned
> properly, will store anything up to 128 bits in length.
Yes, zeroing and casts would work for the kernel (zeroing in order to
avoid garbage from confusing user space if we don't use the entire
fixed-size field), along with the right alignment, and the user space
could just do a memcmp-equivalent that's optimized this type of object.
Still looks a bit clumsy to me when compared to the sheer elegance of
an assignment and "normal" operations, but maybe that's just a
question of perception.
Yep, sounds okay. Let's go for this approach then.
Thanks,
- Werner
--
_________________________________________________________________________
/ Werner Almesberger, ICA, EPFL, CH werner.almesberger en ica.epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda