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: <20140130201018.GD8098@ghostprotocols.net>
Date:	Thu, 30 Jan 2014 17:10:18 -0300
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Adrian Hunter <adrian.hunter@...el.com>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH V2 1/9] perf tools: Fix symbol annotation for relocated
 kernel

Em Thu, Jan 30, 2014 at 03:15:30PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Jan 30, 2014 at 03:12:32PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Jan 30, 2014 at 03:08:23PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Getting segfaults with:
> >  
> > > [acme@...andy linux]$ git log --oneline | head -10
> > > c059c953531f perf tests: vmlinux-kallsyms test does not need to set up ref_reloc_sym
> > > be2530836ebe perf symbols: Prevent the use of kcore if the kernel has moved
> > > 9b2fd7840cb0 perf record: Get ref_reloc_sym from kernel map

bummer, I got the message with 4/9 delayed and didn't notice it was
missing, after applying it in the intended order, the segfault was
cured.

thanks to Adrian for bringing this to my attention.

- Arnaldo

> > > bcf5e06a0c75 perf symbols: Add kallsyms__get_function_start()
> > > 94591ed0963e perf machine: Add machine__get_kallsyms_filename()
> > > 18923cddb839 perf symbols: Fix symbol annotation for relocated kernel
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > perf_event__synthesize_kernel_mmap (tool=0x81fd20 <record>, process=0x42ad51 <process_synthesized_event>, machine=0x916380) at util/event.c:520
> > 520		size = snprintf(event->mmap.filename, sizeof(event->mmap.filename),
> > 521				"%s%s", mmap_name, kmap->ref_reloc_sym->name) + 1;
> > (gdb) p mmap_name
> > $4 = 0x7fffffffabd0 "[kernel.kallsyms]"
> > (gdb) p kmap->ref_reloc_sym
> > $5 = (struct ref_reloc_sym *) 0x0
> > (gdb)
> 
> This is the buggy one:
> 
> [acme@...andy linux]$ perf record usleep 1
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.018 MB perf.data (~770 samples) ]
> [acme@...andy linux]$ git show 9b2fd7840cb0d23068bc97e08db46f57f41021fe
> commit 9b2fd7840cb0d23068bc97e08db46f57f41021fe
> Author: Adrian Hunter <adrian.hunter@...el.com>
> Date:   Wed Jan 29 16:14:40 2014 +0200
> 
>     perf record: Get ref_reloc_sym from kernel map
>     
>     Now that ref_reloc_sym is set up when the kernel map is created, 'perf
>     record' does not need to pass the symbol names to
>     perf_event__synthesize_kernel_mmap() which can read the values needed
>     from ref_reloc_sym directly.
--
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