lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210907111201.783d5ea2@gandalf.local.home>
Date:   Tue, 7 Sep 2021 11:12:01 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Zhongya Yan <yan2228598786@...il.com>
Cc:     edumazet@...gle.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, kuba@...nel.org, mingo@...hat.com,
        davem@...emloft.net, yoshfuji@...ux-ipv6.org, dsahern@...nel.org,
        hengqi.chen@...il.com, yhs@...com, brendan.d.gregg@...il.com,
        2228598786@...com
Subject: Re: [PATCH] net: tcp_drop adds `reason` and SNMP parameters for
 tracing v4

On Fri,  3 Sep 2021 23:40:44 -0700
Zhongya Yan <yan2228598786@...il.com> wrote:

> @@ -4708,7 +4710,7 @@ static void tcp_ofo_queue(struct sock *sk)
>  		rb_erase(&skb->rbnode, &tp->out_of_order_queue);
>  
>  		if (unlikely(!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt))) {
> -			tcp_drop(sk, skb);
> +			tcp_drop(sk, skb, LINUX_MIB_TCPOFOQUEUE, "Tcp queue error");
>  			continue;
>  		}
>  
> @@ -4764,7 +4766,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
>  	if (unlikely(tcp_try_rmem_schedule(sk, skb, skb->truesize))) {
>  		NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFODROP);
>  		sk->sk_data_ready(sk);
> -		tcp_drop(sk, skb);
> +		tcp_drop(sk, skb, LINUX_MIB_TCPOFODROP, "Tcp rmem failed");
>  		return;
>  	}
>  
> @@ -4827,7 +4829,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
>  				/* All the bits are present. Drop. */
>  				NET_INC_STATS(sock_net(sk),
>  					      LINUX_MIB_TCPOFOMERGE);
> -				tcp_drop(sk, skb);
> +				tcp_drop(sk, skb, LINUX_MIB_TCPOFOMERGE, "Tcp bits are present");

Just curious. Is "Tcp" the normal way to write "TCP" in the kernel? I see
it in snmp_seq_show_tcp_udp() in net/ipv4/proc.c, but no where else
(besides doing CamelCase words). Should these be written using "TCP"
instead of "Tcp". It just looks awkward to me.

But hey, I'm not one of the networking folks, so what do I know?

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ