public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladislav Ivanishin <vlad@ispras.ru>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: linux-man@vger.kernel.org
Subject: Re: [patch] recv.2: Mention SOCK_SEQPACKET in MSG_TRUNC flag description
Date: Sun, 12 Feb 2023 16:38:04 +0300	[thread overview]
Message-ID: <87cz6fqa0z.fsf@ispras.ru> (raw)
In-Reply-To: <00e2987e-0f37-b572-256c-163ded066fa0@gmail.com> (Alejandro Colomar's message of "Sun, 11 Dec 2022 17:09:11 +0100")


unix_seqpacket_recvmsg() calls unix_dgram_recvmsg() which handles
MSG_TRUNC. This has been the case since the handling was added in
9f6f9af7694ede6314bed281eec74d588ba9474f; see net/unix/af_unix.c:

static int unix_seqpacket_recvmsg([...])
{
        [...]
	return unix_dgram_recvmsg(iocb, sock, msg, size, flags);
}

The sequential-packet socket type seems to have been left out from the
description by an oversight.

Signed-off-by: Vladislav Ivanishin <vlad@ispras.ru>
---

Hi Alex,

On Sun, Dec 11 2022, Alejandro Colomar <alx.manpages@gmail.com> wrote:
> Hi Vladislav,
>
> On 11/27/22 11:38, Vladislav Ivanishin wrote:
>> unix_seqpacket_recvmsg() calls unix_dgram_recvmsg() which handles
>> MSG_TRUNC. This has been the case since the support for this flag was
>> implemented in the latter; the sequential-packet socket type seems to
>> have been left out from the description by an oversight.
>> Signed-off-by: Vladislav Ivanishin<vlad@ispras.ru>
>
> Could you please point to the relevant kernel commits, or quote the relevant
> lines of code, in the commit message?
>
> Thanks,
>
> Alex
    
Sure, here's an updated version.

Vlad

 man2/recv.2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/man2/recv.2 b/man2/recv.2
index 5298a2745..81cd1957c 100644
--- a/man2/recv.2
+++ b/man2/recv.2
@@ -226,7 +226,8 @@ subsequent receive call will return the same data.
 For raw
 .RB ( AF_PACKET ),
 Internet datagram (since Linux 2.4.27/2.6.8),
-netlink (since Linux 2.6.22), and UNIX datagram
+netlink (since Linux 2.6.22),
+and UNIX datagram as well as sequenced-packet
 .\" commit 9f6f9af7694ede6314bed281eec74d588ba9474f
 (since Linux 3.4) sockets:
 return the real length of the packet or datagram,
-- 
2.39.1

  reply	other threads:[~2023-02-12 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-27 10:38 [patch] recv.2: Mention SOCK_SEQPACKET in MSG_TRUNC flag description Vladislav Ivanishin
2022-12-11 16:09 ` Alejandro Colomar
2023-02-12 13:38   ` Vladislav Ivanishin [this message]
2023-02-12 19:14     ` Alejandro Colomar
2023-02-13  5:38       ` Vladislav Ivanishin
2023-02-20  5:37         ` Vladislav Ivanishin
2023-03-05 18:06           ` Vladislav Ivanishin
2023-03-05 18:33             ` Alejandro Colomar

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=87cz6fqa0z.fsf@ispras.ru \
    --to=vlad@ispras.ru \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox