Re: find_aux_sym triggers a kernel heuristic

2014-03-10 Thread Josh Stone
On 03/10/2014 02:23 PM, Mark Wielaard wrote: > On Fri, 2014-03-07 at 17:39 -0800, Josh Stone wrote: >> The gist is that I have an ET_EXEC binary, /usr/bin/ls. When I call >> dwfl_module_getsymtab -> find_symtab -> find_aux_sym -> open_elf, the >> following heuristic is triggered: >> >> libdwfl/dwf

Re: find_aux_sym triggers a kernel heuristic

2014-03-10 Thread Mark Wielaard
On Fri, 2014-03-07 at 17:39 -0800, Josh Stone wrote: > The gist is that I have an ET_EXEC binary, /usr/bin/ls. When I call > dwfl_module_getsymtab -> find_symtab -> find_aux_sym -> open_elf, the > following heuristic is triggered: > > libdwfl/dwfl_module_getdwarf.c > 134│ mod->e_type = ehdr->e_

Re: [patch 0/3] Live PIDs with deleted files by /dev/PID/mem

2014-03-10 Thread Jan Kratochvil
On Mon, 10 Mar 2014 21:38:31 +0100, Mark Wielaard wrote: > On Thu, 2014-03-06 at 20:55 +0100, Jan Kratochvil wrote: > > In general I believe reading /proc/PID/maps is safer than the guessing by > > elf_from_remote_memory(), for example because the image may come from mmap() > > and not from dlopen(

Re: [patch 0/3] Live PIDs with deleted files by /dev/PID/mem

2014-03-10 Thread Mark Wielaard
On Thu, 2014-03-06 at 20:55 +0100, Jan Kratochvil wrote: > On Tue, 04 Mar 2014 11:40:21 +0100, Mark Wielaard wrote: > > +/* Structure used for keeping track of ptrace attaching a thread. > > + Shared by linux-pid-attach and linux-proc-maps. If it has been setup > > + then get the instance thro

Re: [PATCH 1/2] libdwfl: elf_from_remote_memory should use pagesize, not p_align.

2014-03-10 Thread Mark Wielaard
On Thu, 2014-03-06 at 22:11 +0100, Jan Kratochvil wrote: > On Mon, 03 Mar 2014 15:31:27 +0100, Mark Wielaard wrote: > > --- a/libdwfl/elf-from-memory.c > > +++ b/libdwfl/elf-from-memory.c > [...] > > @@ -195,21 +200,28 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, > >bool found_base = false; >

Re: [PATCH 2/2] libdwfl: elf_from_remote_memory only trust shdrs of last file-only segment.

2014-03-10 Thread Mark Wielaard
On Thu, 2014-03-06 at 22:19 +0100, Jan Kratochvil wrote: > On Mon, 03 Mar 2014 15:31:28 +0100, Mark Wielaard wrote: > > If the last PT_LOAD segment that contains the whole shdrs also extends > > the segment in memory beyond the end of file the program might be reusing > > the memory space that we e

Re: [PATCH] readelf: Print DW_FORM_sdata values as signed numbers.

2014-03-10 Thread Mark Wielaard
On Wed, 2014-03-05 at 16:23 +0100, Mark Wielaard wrote: > Printing DW_FORM_sdata numbers as unsigned values is misleading. > +2014-03-05 Mark Wielaard > + > + * readelf.c (attr_callback): Print DW_FORM_sdata values as signed > + numbers. I pushed this to master.