Skip to contentSkip to conversation

recv.2: Mention SOCK_SEQPACKET in MSG_TRUNC flag description

PATCH In review Vladislav Ivanishin 2 participants 8 messages Nov 27, 2022 – Mar 5, 2023 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 recv.2: Mention SOCK_SEQPACKET in MSG_TRUNC flag description

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.

---
 man2/recv.2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
man2/recv.2 +2 -1
index d492976c4..c5f1a9d70 100644
@@ -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,
Signature · 1 line
2.37.3
#1 lore raw

Hi Vladislav,

Quoted 6 lines · Vladislav Ivanishin

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.

Could you please point to the relevant kernel commits, or quote the relevant lines of code, in the commit message?

Thanks,

Alex

Quoted 19 lines
---
  man2/recv.2 | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
man2/recv.2 +2 -2
index d492976c4..c5f1a9d70 100644
@@ -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.37.3
Signature · 1 line
<http://www.alejandro-colomar.es/>
#2 lore raw

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.

---

Hi Alex,

Quoted 9 lines · Alejandro Colomar

Hi Vladislav,

Quoted 5 lines · Vladislav Ivanishin

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.

Quoted 6 lines

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(-)
man2/recv.2 +2 -1
index 5298a2745..81cd1957c 100644
@@ -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,
Signature · 1 line
2.39.1
#3 lore raw

Hi Vladislav!

Quoted 29 lines · Vladislav Ivanishin

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.

---

Hi Alex,

Quoted 9 lines · Alejandro Colomar

Hi Vladislav,

Quoted 5 lines · Vladislav Ivanishin

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.

Quoted 8 lines
Quoted 6 lines

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.

Thanks! I CCd those involved in the referred commit. I'll give them a week or so to have a look. Could you please ping me again in a week or so?

Cheers,

Alex

Quoted 20 lines

Vlad

 man2/recv.2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
man2/recv.2 +2 -1
index 5298a2745..81cd1957c 100644
@@ -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,
Signature · 2 lines
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
#4 lore raw
Quoted 2 lines · Alejandro Colomar

Thanks! I CCd those involved in the referred commit. I'll give them a week or so to have a look.

Great, thank you!

Quoted 1 line

Could you please ping me again in a week or so?

No problem, will do.

Vlad

#5 lore raw

Hi Alex; ping!

Quoted 9 lines · Vladislav Ivanishin
Quoted 2 lines · Alejandro Colomar

Thanks! I CCd those involved in the referred commit. I'll give them a week or so to have a look.

Great, thank you!

Quoted 1 line

Could you please ping me again in a week or so?

No problem, will do.

#6 lore raw

Ping (there haven't been any objections to the current version of the patch at https://lore.kernel.org/linux-man/[email protected]/).

Quoted 12 lines · Vladislav Ivanishin

Hi Alex; ping!

Quoted 9 lines · Vladislav Ivanishin
Quoted 2 lines · Alejandro Colomar

Thanks! I CCd those involved in the referred commit. I'll give them a week or so to have a look.

Great, thank you!

Quoted 1 line

Could you please ping me again in a week or so?

No problem, will do.

#7 lore raw

Hi Vlad,

Quoted 5 lines · Vladislav Ivanishin

Ping (there haven't been any objections to the current version of the patch at https://lore.kernel.org/linux-man/[email protected]/).

Quoted 1 line · Vladislav Ivanishin

Hi Alex; ping!

Thanks for both pings, and sorry for the delay :)

Patch applied.

Cheers,

Alex

Quoted 11 lines
Quoted 11 lines · Vladislav Ivanishin
Quoted 9 lines · Alejandro Colomar
Quoted 2 lines

Thanks! I CCd those involved in the referred commit. I'll give them a week or so to have a look.

Great, thank you!

Quoted 1 line

Could you please ping me again in a week or so?

No problem, will do.

Signature · 2 lines
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5