* [PATCH v2] tcp: identify cryptic messages as TCP seq # bugs
@ 2018-07-18 1:27 Randy Dunlap
2018-07-18 5:03 ` Eric Dumazet
2018-07-18 22:26 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2018-07-18 1:27 UTC (permalink / raw)
To: netdev, Eric Dumazet, David Miller; +Cc: 積丹尼 Dan Jacobson
From: Randy Dunlap <rdunlap@infradead.org>
Attempt to make cryptic TCP seq number error messages clearer by
(1) identifying the source of the message as "TCP", (2) identifying the
errors as "seq # bug", and (3) grouping the field identifiers and values
by separating them with commas.
E.g., the following message is changed from:
recvmsg bug 2: copied 73BCB6CD seq 70F17CBE rcvnxt 73BCB9AA fl 0
WARNING: CPU: 2 PID: 1501 at /linux/net/ipv4/tcp.c:1881 tcp_recvmsg+0x649/0xb90
to:
TCP recvmsg seq # bug 2: copied 73BCB6CD, seq 70F17CBE, rcvnxt 73BCB9AA, fl 0
WARNING: CPU: 2 PID: 1501 at /linux/net/ipv4/tcp.c:2011 tcp_recvmsg+0x694/0xba0
Suggested-by: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
v2: drop __func__ because it duplicates part of the error message.
net/ipv4/tcp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-next-20180717.orig/net/ipv4/tcp.c
+++ linux-next-20180717/net/ipv4/tcp.c
@@ -1994,7 +1994,7 @@ int tcp_recvmsg(struct sock *sk, struct
* shouldn't happen.
*/
if (WARN(before(*seq, TCP_SKB_CB(skb)->seq),
- "recvmsg bug: copied %X seq %X rcvnxt %X fl %X\n",
+ "TCP recvmsg seq # bug: copied %X, seq %X, rcvnxt %X, fl %X\n",
*seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt,
flags))
break;
@@ -2009,7 +2009,7 @@ int tcp_recvmsg(struct sock *sk, struct
if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)
goto found_fin_ok;
WARN(!(flags & MSG_PEEK),
- "recvmsg bug 2: copied %X seq %X rcvnxt %X fl %X\n",
+ "TCP recvmsg seq # bug 2: copied %X, seq %X, rcvnxt %X, fl %X\n",
*seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt, flags);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] tcp: identify cryptic messages as TCP seq # bugs
2018-07-18 1:27 [PATCH v2] tcp: identify cryptic messages as TCP seq # bugs Randy Dunlap
@ 2018-07-18 5:03 ` Eric Dumazet
2018-07-18 22:26 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2018-07-18 5:03 UTC (permalink / raw)
To: Randy Dunlap, netdev, Eric Dumazet, David Miller
Cc: 積丹尼 Dan Jacobson
On 07/17/2018 06:27 PM, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Attempt to make cryptic TCP seq number error messages clearer by
> (1) identifying the source of the message as "TCP", (2) identifying the
> errors as "seq # bug", and (3) grouping the field identifiers and values
> by separating them with commas.
>
> E.g., the following message is changed from:
>
> recvmsg bug 2: copied 73BCB6CD seq 70F17CBE rcvnxt 73BCB9AA fl 0
> WARNING: CPU: 2 PID: 1501 at /linux/net/ipv4/tcp.c:1881 tcp_recvmsg+0x649/0xb90
>
> to:
>
> TCP recvmsg seq # bug 2: copied 73BCB6CD, seq 70F17CBE, rcvnxt 73BCB9AA, fl 0
> WARNING: CPU: 2 PID: 1501 at /linux/net/ipv4/tcp.c:2011 tcp_recvmsg+0x694/0xba0
>
> Suggested-by: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Thanks Randy
Signed-off-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] tcp: identify cryptic messages as TCP seq # bugs
2018-07-18 1:27 [PATCH v2] tcp: identify cryptic messages as TCP seq # bugs Randy Dunlap
2018-07-18 5:03 ` Eric Dumazet
@ 2018-07-18 22:26 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-07-18 22:26 UTC (permalink / raw)
To: rdunlap; +Cc: netdev, edumazet, jidanni
From: Randy Dunlap <rdunlap@infradead.org>
Date: Tue, 17 Jul 2018 18:27:45 -0700
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Attempt to make cryptic TCP seq number error messages clearer by
> (1) identifying the source of the message as "TCP", (2) identifying the
> errors as "seq # bug", and (3) grouping the field identifiers and values
> by separating them with commas.
>
> E.g., the following message is changed from:
>
> recvmsg bug 2: copied 73BCB6CD seq 70F17CBE rcvnxt 73BCB9AA fl 0
> WARNING: CPU: 2 PID: 1501 at /linux/net/ipv4/tcp.c:1881 tcp_recvmsg+0x649/0xb90
>
> to:
>
> TCP recvmsg seq # bug 2: copied 73BCB6CD, seq 70F17CBE, rcvnxt 73BCB9AA, fl 0
> WARNING: CPU: 2 PID: 1501 at /linux/net/ipv4/tcp.c:2011 tcp_recvmsg+0x694/0xba0
>
> Suggested-by: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> v2: drop __func__ because it duplicates part of the error message.
Applied, thanks Randy.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-18 23:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18 1:27 [PATCH v2] tcp: identify cryptic messages as TCP seq # bugs Randy Dunlap
2018-07-18 5:03 ` Eric Dumazet
2018-07-18 22:26 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).