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] [day] [month] [year] [list]
Message-ID: <87oblkc4zm.fsf@sejong.aot.lge.com>
Date:	Thu, 06 Sep 2012 10:30:37 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	David Ahern <dsahern@...il.com>
Cc:	Arnaldo Carvalho de Melo <acme@...radead.org>,
	Namhyung Kim <namhyung.kim@....com>,
	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH 14/17] perf header: Set tracepoint event name only if not set

On Wed, 05 Sep 2012 18:01:16 -0600, David Ahern wrote:
> On 9/5/12 5:08 PM, Arnaldo Carvalho de Melo wrote:
>> From: Namhyung Kim <namhyung.kim@....com>
>>
>> The event name can be set already by processing a event_desc data.
>>
>> So check it before setting to prevent possible leak.
>>
>> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
>> Cc: Ingo Molnar <mingo@...nel.org>
>> Cc: Paul Mackerras <paulus@...ba.org>
>> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
>> Link: http://lkml.kernel.org/r/1346821373-31621-3-git-send-email-namhyung@kernel.org
>> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
>> ---
>>   tools/perf/util/header.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
>> index a124b93..05c9310 100644
>> --- a/tools/perf/util/header.c
>> +++ b/tools/perf/util/header.c
>> @@ -2314,7 +2314,7 @@ static int perf_evlist__set_tracepoint_names(struct perf_evlist *evlist,
>>   	struct perf_evsel *pos;
>>
>>   	list_for_each_entry(pos, &evlist->entries, node) {
>> -		if (pos->attr.type == PERF_TYPE_TRACEPOINT &&
>> +		if (pos->attr.type == PERF_TYPE_TRACEPOINT && !pos->name &&
>>   		    perf_evsel__set_tracepoint_name(pos, pevent))
>>   			return -1;
>>   	}
>>
>
> I'm getting a segfault running perf-script due to this patch. Most
> likely this is exposing another problem. Back trace is:

Hmm.  It's because evsel->tp_format being not set, not sure why I didn't
detect this during tests.  Will find out a solution.

Thanks,
Namhyung


>
> #0  0x000000000049f4f2 in pevent_event_info (s=0x7fffffffdab0,
> event=0x0, record=0x7fffffffda70)
>     at tools/lib/traceevent/event-parse.c:4183
> #1  0x000000000046cd52 in event_format__print (event=0x0,
> cpu=<optimized out>, data=<optimized out>, size=<optimized out>)
>     at util/trace-event-parse.c:182
> #2  0x000000000042d41b in process_event (event=0x7fffef9d1e60,
> sample=0x7fffffffdc90, evsel=0x90d870, machine=0x906f80,
>     al=<optimized out>) at builtin-script.c:415
> #3  0x000000000042c4e1 in process_sample_event (tool=<optimized out>,
> event=0x7fffef9d1e60, sample=0x7fffffffdc90, evsel=
>     0x90d870, machine=0x906f80) at builtin-script.c:515
> #4  0x000000000046864d in perf_session_deliver_event
> (session=<optimized out>, event=0x7fffef9d1e60, sample=0x7fffffffdc90,
>     tool=0x79d020, file_offset=<optimized out>) at util/session.c:1065
> #5  0x0000000000468c5a in flush_sample_queue (s=0x906f20,
> tool=0x79d020) at util/session.c:719
> #6  0x0000000000468d46 in process_finished_round (tool=<optimized
> out>, event=<optimized out>, session=0x906f20)
>     at util/session.c:790
> #7  0x0000000000469055 in perf_session__process_user_event
> (file_offset=541768, tool=0x79d020, event=0x7fffefa2b448,
>     session=0x906f20) at util/session.c:1129
> #8  perf_session__process_event (session=0x906f20,
> event=0x7fffefa2b448, tool=0x79d020, file_offset=541768)
>     at util/session.c:1161
> #9  0x000000000046a851 in __perf_session__process_events
> (session=0x906f20, data_offset=<optimized out>,
>     data_size=<optimized out>, file_size=2564784, tool=0x79d020) at
> util/session.c:1429
> #10 0x000000000042ebdc in __cmd_script (session=0x906f20) at
> builtin-script.c:548
--
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