Zhang Yuchen schrieb:
Hi, Jan,
I am a bit confused about the rtdm_recvmsg_lxrt and rtdm_sendmsg_lxrt
functions. In the implementation, the first copy_from_user seems transfer
the "msg" from user space to kernel space "krnl_msg", but then in the next
rtdm_xxx kernel fucntion call, still the original "msg" is used, why and how
is the krnl_msg used in this case?
Yep, that's a bug.
And the RTDM_USER_MODE_CALL is used in rtdm_xxx to indicate the call from
user space, but then I could not find out how RTDM_USER_MODE_CALL is used in
udp's functions, e.g. rt_udp_sendmsg/recvmsg. Does udp support rtdm
send/recvmsg call from user space?
RTnet respectively the RTDM layer *do* support user space access to UDP
services. The point with current RTnet is that not all desirable safety
checks are performed on the user-passed data structures and pointers -
and those that are performed contain bugs as you noticed. :-/
Actually, full parameter check is still on the roadmap as you can see on
the RTnet homepage ("improve user mode API"). As soon this will be
implemented (preferably already against the "official" RTDM layer that
will be part of RTAI), the RTDM_USER_MODE_CALL will also be found in the
source code of RTnet.
Jan
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users