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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <538DCFFD.8030306@gmail.com>
Date:	Tue, 03 Jun 2014 07:39:09 -0600
From:	David Ahern <dsahern@...il.com>
To:	Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org
CC:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Jean Pihet <jean.pihet@...aro.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 06/13] perf tools: Cache dso data file descriptor

On 6/2/14, 3:18 PM, Jiri Olsa wrote:
> +static rlim_t get_fd_limit(void)
> +{
> +	struct rlimit l;
> +	rlim_t limit = 0;
> +
> +	/* Allow half of the current open fd limit. */
> +	if (getrlimit(RLIMIT_NOFILE, &l) == 0) {
> +		if (l.rlim_cur == RLIM_INFINITY)
> +			limit = l.rlim_cur;


Why not limit this to something reasonable -- 512 or 1024 -- rather 
"infinity" (~0UL).

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ