From: Jan Kiszka <jan.kiszka@web.de>
To: Manuel Huber <manuel.h87@gmail.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] rtdm: minimal patch for sys_rtdm_recvmsg
Date: Sat, 22 Jun 2013 08:56:08 +0200 [thread overview]
Message-ID: <51C54A88.3050003@web.de> (raw)
In-Reply-To: <51BEDC9B.6040603@gmail.com>
On 2013-06-17 11:53, Manuel Huber wrote:
>> Please post patches inline, makes reviewing easier. The explanatory
>> part, like above, can be put after the "---" so that it won't show up in
>> the commit log.
> Oh, sorry; I forgot to send it plain-text...
>
>> Let's just only copy back what can change, msg_flags and msg_controllen,
>> just like the kernel does.
> I have already implemented a version that does that, but then I looked at
> rt_udp_recvmsg implementation (stack/ipv4/udp/udp.c) and saw that it also
> sets msg_namelen field. This member will never be used in RTnet source
> code, so I think it should be copied back to the user...
> I mean it seems a little useless, because the user has to know the structur
> anyway; I'm not sure if code really relies on this behaviour....
>
> So if it's necessary to write back the msg_namelen field, I would need 3
> __xn_put_user calls. I just though it looks ugly and probably does worse
> then a single __xn_copy_to_user call.
>
> Do you think it's necessary to write back msg_namelen? Because otherwise
> I would definitely prefer using __xn_put_user twice.
>
I think you stumbled over one of the very old and broken edges of RTnet.
It really makes no sense to copy namelen back. Rather, RTnet should
check msg_namelen before blindly copying the address into the msg_name
buffer.
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130622/5d6c982e/attachment.pgp>
next prev parent reply other threads:[~2013-06-22 6:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-16 21:04 [Xenomai] rtdm: minimal patch for sys_rtdm_recvmsg Manuel Huber
2013-06-17 5:27 ` Jan Kiszka
2013-06-17 9:53 ` Manuel Huber
2013-06-17 10:04 ` [Xenomai] Fwd: " Manuel Huber
2013-06-22 6:56 ` Jan Kiszka [this message]
[not found] ` <51C5F102.8010803@gmail.com>
2013-06-22 21:35 ` [Xenomai] Problem accessing msg_name in rt_udp_recvmsg Manuel Huber
2013-06-23 12:23 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51C54A88.3050003@web.de \
--to=jan.kiszka@web.de \
--cc=manuel.h87@gmail.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.