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: <1282721941.2467.705.camel@edumazet-laptop>
Date:	Wed, 25 Aug 2010 09:39:01 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Anton Blanchard <anton@...ba.org>
Cc:	netdev@...r.kernel.org, miltonm@....com
Subject: Re: [PATCH] tcp: Fix sysctl_tcp_max_orphans when PAGE_SIZE != 4k

Le mercredi 25 août 2010 à 17:17 +1000, Anton Blanchard a écrit :
> We were hard coding 4096 when sizing sysctl_tcp_max_orphans which
> causes problems when PAGE_SIZE is not 4k. We calculate an order based on
> PAGE_SHIFT so the count should be based on PAGE_SIZE
> 
> Signed-off-By: Milton Miller <miltonm@....com>
> Signed-off-by: Anton Blanchard <anton@...ba.org>
> ---
> 
> Index: powerpc.git/net/ipv4/tcp.c
> ===================================================================
> --- powerpc.git.orig/net/ipv4/tcp.c	2010-08-25 17:04:51.190305401 +1000
> +++ powerpc.git/net/ipv4/tcp.c	2010-08-25 17:05:15.463884764 +1000
> @@ -3270,7 +3270,7 @@ void __init tcp_init(void)
>  		;
>  	if (order >= 4) {
>  		tcp_death_row.sysctl_max_tw_buckets = 180000;
> -		sysctl_tcp_max_orphans = 4096 << (order - 4);
> +		sysctl_tcp_max_orphans = PAGE_SIZE << (order - 4);
>  		sysctl_max_syn_backlog = 1024;
>  	} else if (order < 3) {
>  		tcp_death_row.sysctl_max_tw_buckets >>= (3 - order);
> --

Considering your previous mail, I suggest you add

	sysctl_tcp_max_orphans = max(sysctl_tcp_max_orphans,
		     percpu_counter_batch * num_possible_cpus());




--
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