Roland Dreier <[EMAIL PROTECTED]> wrote on 11/14/2005 11:47:13 AM:

>     Pradeep> I am trying to use copy_from_user()/copy_to_user of data
>     Pradeep> structures that contains pointers.
>
> If you are defining a new interface, then the simplest thing is not to
> do that: always put pointers in a 64-bit field.
>
> If it is an existing interface that can't be changed, then there
> should be an existing compat wrapper for the system call.
>
This is for address translation. Address translations use "write()"

to a character device. write() does not have a compat wrapper and so
there are two possible approaches:

1) convert the write() to ioctl() and use the compat wrapper
approach.
2) use the test_thread_flag(TIF_32BIT) or an alternative to ascertain
if it is a 32-bit app on a 64 bit kernel and do the compat_ptr(),
else use the regular copy_*_user().

I am leaning towards the first option, since that is the correct way to
approach this and will work across all platforms. Any other suggestions?

Pradeep
[EMAIL PROTECTED]

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to