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: <1384602797.2329.9.camel@leonhard>
Date:	Sat, 16 Nov 2013 20:53:17 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	David Ahern <dsahern@...il.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: perf tip: fails to convert comm

Hi Frederic,

2013-11-16 (토), 02:02 +0100, Frederic Weisbecker:
> On Fri, Nov 15, 2013 at 09:29:51AM -0700, David Ahern wrote:
> > HI Frederic:
> > 
> > On 11/13/13, 11:03 AM, Frederic Weisbecker wrote:
> > >
> > >I see. I can reproduce, I'll check and see what happens. It would be nice if
> > >we could have an option to dump internal perf events like comm events as well
> > >in the perf script stream.
> > 
> > Any progress on a solution? This is a regression in 3.13.
> 
> So the problem is that when a thread overrides its default ":%pid" comm, we forget
> to tag the thread comm as overriden. Hence, this overriden comm is not inherited on
> future forks.
> 
> So here is a fix. Tell me if you see more issue, I'll cook a proper changelog and
> resend if everyting looks good.
> 
> Thanks.
> 
> diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
> index cd8e2f5..49eaf1d 100644
> --- a/tools/perf/util/thread.c
> +++ b/tools/perf/util/thread.c
> @@ -70,14 +70,13 @@ int thread__set_comm(struct thread *thread, const char *str, u64 timestamp)
>  	/* Override latest entry if it had no specific time coverage */
>  	if (!curr->start) {
>  		comm__override(curr, str, timestamp);
> -		return 0;
> +	} else {
> +		new = comm__new(str, timestamp);
> +		if (!new)
> +			return -ENOMEM;
> +		list_add(&new->list, &thread->comm_list);
>  	}
>  
> -	new = comm__new(str, timestamp);
> -	if (!new)
> -		return -ENOMEM;
> -
> -	list_add(&new->list, &thread->comm_list);
>  	thread->comm_set = true;
>  
>  	return 0;

Looks good to me.

Thanks for the fix.
Namhyung




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