lkml.org 
[lkml]   [2000]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: need type to carry kernel pointers to user space
Date
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@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@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.031 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site