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: <1339042844.26966.75.camel@edumazet-glaptop>
Date:	Thu, 07 Jun 2012 06:20:44 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Vijay Subramanian <subramanian.vijay@...il.com>
Cc:	netdev@...r.kernel.org, Stephen Hemminger <shemminger@...tta.com>
Subject: Re: [PATCH IPROUTE2] ss: Add support for sk_meminfo_backlog

On Wed, 2012-06-06 at 16:11 -0700, Vijay Subramanian wrote:
> This adds the ability to print the backlog length of sockets that is provided by
> recent Linux kernels since commit (d594e987c6 sock_diag: add
> SK_MEMINFO_BACKLOG).
> 
> Signed-off-by: Vijay Subramanian <subramanian.vijay@...il.com>
> ---
>  include/linux/sock_diag.h |    1 +
>  misc/ss.c                 |    5 +++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
> index 39e4b1c..ac9db19 100644
> --- a/include/linux/sock_diag.h
> +++ b/include/linux/sock_diag.h
> @@ -18,6 +18,7 @@ enum {
>  	SK_MEMINFO_FWD_ALLOC,
>  	SK_MEMINFO_WMEM_QUEUED,
>  	SK_MEMINFO_OPTMEM,
> +	SK_MEMINFO_BACKLOG,
>  
>  	SK_MEMINFO_VARS,
>  };
> diff --git a/misc/ss.c b/misc/ss.c
> index cf529ef..ea14e2b 100644
> --- a/misc/ss.c
> +++ b/misc/ss.c
> @@ -1338,14 +1338,15 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r)
>  
>  	if (tb[INET_DIAG_SKMEMINFO]) {
>  		const __u32 *skmeminfo =  RTA_DATA(tb[INET_DIAG_SKMEMINFO]);
> -		printf(" skmem:(r%u,rb%u,t%u,tb%u,f%u,w%u,o%u)",
> +		printf(" skmem:(r%u,rb%u,t%u,tb%u,f%u,w%u,o%u,bl%u)",
>  			skmeminfo[SK_MEMINFO_RMEM_ALLOC],
>  			skmeminfo[SK_MEMINFO_RCVBUF],
>  			skmeminfo[SK_MEMINFO_WMEM_ALLOC],
>  			skmeminfo[SK_MEMINFO_SNDBUF],
>  			skmeminfo[SK_MEMINFO_FWD_ALLOC],
>  			skmeminfo[SK_MEMINFO_WMEM_QUEUED],
> -			skmeminfo[SK_MEMINFO_OPTMEM]);
> +			skmeminfo[SK_MEMINFO_OPTMEM],
> +			skmeminfo[SK_MEMINFO_BACKLOG]);
>  	}else if (tb[INET_DIAG_MEMINFO]) {
>  		const struct inet_diag_meminfo *minfo
>  			= RTA_DATA(tb[INET_DIAG_MEMINFO]);


This is not the right way to handle this.

I already have a patch and was waiting the appropriate time to submit
it.

Thanks


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ