Re: [PATCH] libdw: pre-compute leb128 loop limits

2014-12-15 Thread Mark Wielaard
On Mon, 2014-12-15 at 22:42 +0100, Mark Wielaard wrote: > On Mon, 2014-12-15 at 12:18 -0800, Josh Stone wrote: > > On Fedora 21, this appears to be slightly faster, although pretty close > > to noise levels. Mark, can you see if this helps the performance slip > > on your el7 system? > > It is sl

Re: [PATCH 1/3] libdw: Make srclines use a stable sort

2014-12-15 Thread Josh Stone
On 12/13/2014 03:18 PM, Mark Wielaard wrote: > On Thu, Dec 11, 2014 at 05:34:06PM -0800, Josh Stone wrote: >> BTW, I want to point out this change in compare_lines: >> >>> - return (*p1)->addr - (*p2)->addr; >> [...] >>> + if (line1->addr != line2->addr) >>> +return (line1->addr < line2->addr

Re: [PATCH] libdw: pre-compute leb128 loop limits

2014-12-15 Thread Mark Wielaard
On Mon, 2014-12-15 at 12:18 -0800, Josh Stone wrote: > On Fedora 21, this appears to be slightly faster, although pretty close > to noise levels. Mark, can you see if this helps the performance slip > on your el7 system? It is slightly faster ~0.5 secs on ~55 secs. >/* Unrolling 0 like uleb1

Re: [PATCH] libdw: Add get_uleb128 and get_sleb128 bounds checking.

2014-12-15 Thread Mark Wielaard
On Mon, 2014-12-15 at 11:34 -0800, Josh Stone wrote: > On 12/14/2014 02:18 PM, Mark Wielaard wrote: > > This finally adds bounds checking to get_[us]leb128 (with two exceptions, > > see below). The performance results are a little puzzling, so I hope > > Josh can take a look how things are for him.

Re: [PATCH] Add config/compile as installed by automake 1.14

2014-12-15 Thread Josh Stone
On 12/15/2014 01:11 PM, Mark Wielaard wrote: > On Mon, 2014-12-15 at 11:05 -0800, Josh Stone wrote: >> +2014-12-15 Josh Stone >> + >> +* .gitignore: Add config/compile as installed by automake 1.14. > > Yes, please. Pushed.

Re: [PATCH] Add config/compile as installed by automake 1.14

2014-12-15 Thread Mark Wielaard
On Mon, 2014-12-15 at 11:05 -0800, Josh Stone wrote: > +2014-12-15 Josh Stone > + > + * .gitignore: Add config/compile as installed by automake 1.14. Yes, please. Thanks, Mark

[PATCH] libdw: pre-compute leb128 loop limits

2014-12-15 Thread Josh Stone
Signed-off-by: Josh Stone --- On Fedora 21, this appears to be slightly faster, although pretty close to noise levels. Mark, can you see if this helps the performance slip on your el7 system? --- libdw/ChangeLog | 6 ++ libdw/memory-access.h | 17 +++-- 2 files changed,

Re: [PATCH] libdw: Add get_uleb128 and get_sleb128 bounds checking.

2014-12-15 Thread Josh Stone
On 12/14/2014 02:18 PM, Mark Wielaard wrote: > This finally adds bounds checking to get_[us]leb128 (with two exceptions, > see below). The performance results are a little puzzling, so I hope > Josh can take a look how things are for him. > > On one system, with 3.10.0-123.13.1.el7.x86_64, varlocs

[PATCH] Add config/compile as installed by automake 1.14

2014-12-15 Thread Josh Stone
Signed-off-by: Josh Stone --- .gitignore | 1 + ChangeLog | 4 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 1eda00b80774..8e33bb9b5114 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ config.h.in config.log config.status config/ar-lib +config/com

[PATCH] readelf: Warn, don't assert, if loclist or rangelist offset is too big.

2014-12-15 Thread Mark Wielaard
We use a couple of bits to keep track of the addr size, dwarf size and warning given for a loclist or rangelist offset. Normally offset won't be that big and will fit in 61-bits easily. But if not, don't assert, but just warn we don't handle such large offsets. Signed-off-by: Mark Wielaard --- s

[PATCH] readelf: Don't assert when addr_size or ref_size is not 4 or 8 in print_ops.

2014-12-15 Thread Mark Wielaard
Just report invalid data and continue. Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/readelf.c | 23 --- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 182c9cd..08f9ee4 100644 --- a/src/ChangeLog +++ b/src

[PATCH] libdw: dwarf_getpubnames set error to DWARF_E_NO_ENTRY for zero entries.

2014-12-15 Thread Mark Wielaard
realloc in get_offsets will return NULL otherwise and dwarf_getpubnames might think there was no issue and try to use that NULL pointer. Signed-off-by: Mark Wielaard --- libdw/ChangeLog | 2 +- libdw/dwarf_getpubnames.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH] readelf: Add more bounds checks to print_gdb_index_section.

2014-12-15 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- src/ChangeLog | 4 src/readelf.c | 8 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a193f40..182c9cd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2014-12-15 Mark Wielaard +

[PATCH] libdw: Add bounds checking to dwarf_getpubnames.

2014-12-15 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- libdw/ChangeLog | 7 +++ libdw/dwarf_getpubnames.c | 16 +--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 0543740..93651df 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@

[PATCH] readelf: Make sure there is enough room for reading .debug_line unit_length.

2014-12-15 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- src/ChangeLog | 3 ++- src/readelf.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7247ea9..a193f40 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,8 @@ 2014-12-15 Mark Wielaard *

[PATCH] readelf: Check there is enough room for the DW_LNE_set_address argument

2014-12-15 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/readelf.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index a4f42e4..7247ea9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-12-15 Mark Wielaard + + * readelf.c (pr

[PATCH] libelf: Clear any garbage left in the ar name table.

2014-12-15 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- libelf/ChangeLog | 5 + libelf/elf_begin.c | 8 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libelf/ChangeLog b/libelf/ChangeLog index cf168e7..7406509 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,8 @@ +2014-12-

Re: Preparing for elfutils 0.161 - Dec 12/15 -> Dec 18/19?

2014-12-15 Thread Mark Wielaard
On Tue, 2014-12-02 at 11:40 +0100, Mark Wielaard wrote: > It is December already. Which means it has been more than 3 months since > the last elfutils 0.160 release. We have had lots of bugfixes and some > new features. So lets see if we are ready for 0.161. My goal is to > release elfutils 0.161 a

Re: [PATCH] readelf: Check TType base offset and Action table are sane in exception table.

2014-12-15 Thread Mark Wielaard
On Thu, 2014-12-11 at 18:26 +0100, Mark Wielaard wrote: > 2014-12-11 Mark Wielaard > > + * readelf.c (print_debug_exception_table): Check TType base offset > + and Action table are sane. I pushed this to master.

Re: [PATCH] readelf: Don't print more augmentation characters than there are.

2014-12-15 Thread Mark Wielaard
On Thu, 2014-12-11 at 17:22 +0100, Mark Wielaard wrote: > +2014-12-11 Mark Wielaard > + > + * readelf.c (print_debug_frame_section): Check number of augmentation > + chars to print. I pushed this to master.

Re: [PATCH] libelf: Correct ELF64 section offset check in file_read_elf.

2014-12-15 Thread Mark Wielaard
On Thu, 2014-12-11 at 16:37 +0100, Mark Wielaard wrote: > The ELF64 case didn't check for overflow and accidentially used the 32bit > Shdr size. > > 2014-12-11 Mark Wielaard > > + * elf_begin.c (file_read_elf): Correct ELF64 section offset check. I pushed this to master.

Re: [PATCH] libelf: Add some ar header sanity checking.

2014-12-15 Thread Mark Wielaard
On Thu, 2014-12-11 at 16:30 +0100, Mark Wielaard wrote: > Don't allow entries or size to overflow the parent file size. > > +2014-12-11 Mark Wielaard > + > + * elf_begin.c (read_long_names): Check for offset overflow. > + (__libelf_next_arhdr_wrlock): Likewise. Sanity check the ar_size.