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]
Date:	Fri, 18 Jun 2010 11:40:17 -0300
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Gui Jianfeng <guijianfeng@...fujitsu.com>
Cc:	Adam Schrotenboer <adam@...ris.net>, mingo@...e.hu,
	linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf: excluding "." and ".." directories when
 calculating tids.

Em Thu, Jun 17, 2010 at 11:11:35AM +0800, Gui Jianfeng escreveu:
> Adam Schrotenboer wrote:
> > On 06/15/2010 10:21 PM, Gui Jianfeng wrote:
> >> Introduce a filter function to skip "." and ".." directories when calculating
> >> tid number.
> >>
> >> +/* Skip "." and ".." directories */
> >> +static int filter(const struct dirent *dir)
> >> +{
> >> +	if (dir->d_name[0] == '.')
> >> +		return 0;
> >> +	else
> >> +		return 1;
> > 
> > Is this safe? Can you _never_ have a d_name with a leading dot, like '
> > .hidden' ??
> > Admittedly I don't think it happens in the current procfs, but I'd want
> > to be careful regardless.
> 
> Actually, we only care the numeral directories. So, even if there's a ".hidden",
> it's fine to filter out this directory. Just keep things simple here.

Agreed, applying to perf/core, thanks,

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