From: Vlad Yasevich <vyasevich@gmail.com>
To: netdev@vger.kernel.org, davem@davemloft.net, eric.dumazet@gmail.com
Subject: Re: [PATCH] net: rework recvmsg handler msg_name and msg_namelen logic
Date: Thu, 21 Nov 2013 09:52:30 -0500 [thread overview]
Message-ID: <528E1E2E.20905@gmail.com> (raw)
In-Reply-To: <20131121003828.GA32587@order.stressinduktion.org>
On 11/20/2013 07:38 PM, Hannes Frederic Sowa wrote:
> diff --git a/include/linux/net.h b/include/linux/net.h
> index b292a04..4bcee94 100644
> --- a/include/linux/net.h
> +++ b/include/linux/net.h
> @@ -164,6 +164,14 @@ struct proto_ops {
> #endif
> int (*sendmsg) (struct kiocb *iocb, struct socket *sock,
> struct msghdr *m, size_t total_len);
> + /* Notes for implementing recvmsg:
> + * ===============================
> + * msg->msg_namelen should get updated by the recvmsg handlers
> + * iff msg_name != NULL. It is by default 0 to prevent
> + * returning uninitialized memory to user space. The recvfrom
> + * handlers can assume that msg.msg_name is either NULL or has
> + * a minimum size of sizeof(struct sockaddr_storage).
^^^^^^^
You meant "maximum", right?
-vlad
next prev parent reply other threads:[~2013-11-21 14:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 0:38 [PATCH] net: rework recvmsg handler msg_name and msg_namelen logic Hannes Frederic Sowa
2013-11-21 1:02 ` Joe Perches
2013-11-21 1:07 ` Hannes Frederic Sowa
2013-11-21 1:18 ` Eric Dumazet
2013-11-21 1:23 ` Hannes Frederic Sowa
2013-11-21 14:52 ` Vlad Yasevich [this message]
2013-11-21 15:00 ` Eric Dumazet
2013-11-21 17:04 ` Hannes Frederic Sowa
2013-11-21 17:57 ` David Miller
2013-11-22 6:45 ` Hannes Frederic Sowa
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=528E1E2E.20905@gmail.com \
--to=vyasevich@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.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.