Re: [PATCH 2/5] readelf: Adapt src/readelf -h/-S/-r/-w/-l/-d/-a on mips

2023-08-01 Thread Mark Wielaard
Hi Ying, On Tue, 2023-07-25 at 16:15 +0800, Ying Huang wrote: > In file common-reloc.c, hook functions > reloc_type_check/reloc_type_use/reloc_type_name have these codes: > > #ifdef RELOC_TYPE_ID >   reloc = RELOC_TYPE_ID (reloc); > #endif > > And the macro RELOC_TYPE_ID was defined in file bac

Re: [PATCH 2/5] readelf: Adapt src/readelf -h/-S/-r/-w/-l/-d/-a on mips

2023-08-01 Thread Mark Wielaard
Hi Ying, On Thu, Jul 27, 2023 at 02:08:52PM +0800, Ying Huang wrote: > > Can we add a new file mips.h in backends, and move defines of > ELF64_MIPS_R_TYPE/ELF64_MIPS_R_TYPE2/ELF64_MIPS_R_TYPE3 from elf.h > to mips.h? > > And rename the macro name ELF64_MIPS_R_TYPE to ELF64_MIPS_R_TYPE1 in > mips.h

Re: [PATCH] libelf: Free and clear rawdata_base and zdata_base consistently

2023-08-02 Thread Mark Wielaard
Hi, On Sun, Jul 30, 2023 at 05:44:20PM +0200, Mark Wielaard wrote: > There could be a leak if a program called elf_strptr on a compressed > section, but the program never requests the (uncompressed) section data, > but does explicitly (re)compress that same section data. > &

[PATCH] libelf, readelf, elflint: Add RELR support

2023-08-23 Thread Mark Wielaard
accept a Dwfl_Module. (handle_relocs_relr): New function. (print_dwarf_addr): Make static and declare early. (process_elf_file): Pass dwflmod to print_relocs. (handle_dynamic): Handle DT_RELRSZ and DTRELRENT. Signed-off-by: Mark Wielaard --- libebl

Re: [PATCH] libelf, readelf, elflint: Add RELR support

2023-08-24 Thread Mark Wielaard
Hi Omar, On Thu, Aug 24, 2023 at 12:40:19PM -0700, Omar Sandoval wrote: > On Thu, Aug 24, 2023 at 12:02:11AM +0200, Mark Wielaard wrote: > > > > * libelf/gelf.h (Gelf_Relr): New typedef for Elf64_Relr. > > > > +/* Relative relocation entry (in section of type

Re: [PATCH] libelf, readelf, elflint: Add RELR support

2023-08-24 Thread Mark Wielaard
Hi Omar, On Thu, Aug 24, 2023 at 01:41:42PM -0700, Omar Sandoval wrote: > One more thing, if someone installs a newer elfutils with this change > but their glibc is older and doesn't define Elf64_Relr (which was > apparently added in glibc 2.36), then gelf.h will be unusable: > > /usr/include/gel

[PATCHv2] libelf, readelf, elflint: Add RELR support

2023-08-24 Thread Mark Wielaard
): Likewise. https://sourceware.org/bugzilla/show_bug.cgi?id=28495 Signed-off-by: Mark Wielaard --- v2 - Fix GElf_Relr typedef name - Add RELR typedefs/defines if missing from system elf.h - Add a system-elf-gelf-test libebl/eblsectiontypename.c | 3 +- libelf/elf32_updatenull.c| 3

Re: [PATCH] Fix thread-safety for elfutils

2023-08-25 Thread Mark Wielaard
Hi John, Hi Heather, On Mon, 2023-08-21 at 17:08 -0500, John Mellor-Crummey via Elfutils- devel wrote: > Any thoughts about the patch from my student, Heather McIntyre? Apologies for not responding sooner. The patch was posted when I was on vacation and I still haven't fully caught up with all wo

[COMMITTED] libelf: Remove elf_scncnt from libelf.map

2023-08-28 Thread Mark Wielaard
Reported-by: Kostadin Shishmanov Signed-off-by: Mark Wielaard --- libelf/libelf.map | 1 - 1 file changed, 1 deletion(-) diff --git a/libelf/libelf.map b/libelf/libelf.map index 10dc5059..25760bc4 100644 --- a/libelf/libelf.map +++ b/libelf/libelf.map @@ -50,7 +50,6 @@ ELFUTILS_1.0 { elf_rand

Re: [PATCHv2] libelf, readelf, elflint: Add RELR support

2023-08-29 Thread Mark Wielaard
Hi, On Fri, 2023-08-25 at 01:33 +0200, Mark Wielaard wrote: > Handle RELR as defined here: > https://groups.google.com/g/generic-abi/c/bX460iggiKg/m/YT2RrjpMAwAJ > > Introduce new ELF_T_RELR Elf_Type and handle it for SHT_RELR. Check > various properties in elflint. Print RELR

Re: [PATCH v2 2/2] debuginfod-client.c: Fix x-debuginfod-size counts differently than CURLINFO_SIZE_DOWNLOAD_T

2023-08-29 Thread Mark Wielaard
Hi, On Fri, 2023-03-31 at 12:50 +0800, lilydjwg via Elfutils-devel wrote: > On Thu, Mar 30, 2023 at 01:24:13PM -0400, Frank Ch. Eigler wrote: > > > The written_size is actual file size (uncompressed), but IIUC > > > Content-Length is the compressed size if Content-Encoding says the > > > content i

Re: [PATCH 2/2] backends: Update list of LoongArch relocations

2023-08-29 Thread Mark Wielaard
On Tue, 2023-08-29 at 21:14 +0800, Xi Ruoyao via Elfutils-devel wrote: > * backends/loongarch_reloc.def: Add DELETE, ALIGN, PCREL20_S2, > CFA, ADD6, SUB6, ADD_ULEB128, SUB_ULEB128, 64_PCREL. Thanks, looks correct. Pushed, Mark

Re: [PATCH 1/2] libelf: Sync elf.h from Glibc

2023-08-29 Thread Mark Wielaard
On Tue, 2023-08-29 at 21:14 +0800, Xi Ruoyao via Elfutils-devel wrote: > Adds new LoongArch relocations. > > * elf.h: Update from glibc. Thanks, matches current glibc elf/elf.h. Pushed, Mark

Re: ☠ Buildbot (Sourceware): elfutils - failed test (failure) (master)

2023-08-29 Thread Mark Wielaard
Hi, On Tue, 2023-08-29 at 14:04 +, builder--- via Elfutils-devel wrote: > A new failure has been detected on builder elfutils-centos-x86_64 while > building elfutils. > > Full details are available at: > https://builder.sourceware.org/buildbot/#builders/39/builds/216 > > Build state: fa

Re: PR30809, was Re: [PATCH v2 2/2] debuginfod-client.c: Fix x-debuginfod-size counts differently than CURLINFO_SIZE_DOWNLOAD_T

2023-08-29 Thread Mark Wielaard
Hi Frank, On Tue, Aug 29, 2023 at 02:33:07PM -0400, Frank Ch. Eigler wrote: > commit 3ef3fab0d64c89a52dd6e2ce0d01dd5e713d7b5a > Author: Frank Ch. Eigler > Date: Tue Aug 29 14:08:04 2023 -0400 > > PR30809: improve debuginfod client progress-callback parameters > > * debuginfod-clie

Re: Issue 62071 in oss-fuzz: elfutils:fuzz-libdwfl: Null-dereference READ in chunk_compare

2023-09-07 Thread Mark Wielaard
Hi Evgeny, Do you happen to know what clusterfuzz is trying to tell us? The detailed report and reproducer testcase are not accessible (they seems to require a google or github account to login). It looks like somehow a NULL key got into the search tree. But I cannot figure out how that would hap

Re: Issue 62071 in oss-fuzz: elfutils:fuzz-libdwfl: Null-dereference READ in chunk_compare

2023-09-07 Thread Mark Wielaard
Hi Evgeny, On Thu, 2023-09-07 at 05:31 -0700, evv… via monorail via Elfutils-devel wrote: > Comment #1 on issue 62071 by evv...@gmail.com: elfutils:fuzz-libdwfl: > Null-dereference READ in chunk_compare > https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62071#c1 > > ``` > SCARINESS: 10 (nul

Re: Issue 62071 in oss-fuzz: elfutils:fuzz-libdwfl: Null-dereference READ in chunk_compare

2023-09-07 Thread Mark Wielaard
a30d805665672cae01b4 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 7 Sep 2023 16:14:43 +0200 Subject: [PATCH] libelf: tdelete dummy key if anything goes wrong setting up rawchunk elf_getdata_rawchunk uses a binary search tree cache. If a rawchunk is not yet in the cache we setup a new e

Re: [PATCH] libelf: fix typos in comment

2023-09-10 Thread Mark Wielaard
Hi, On Sun, Sep 10, 2023 at 12:07:15AM +0800, COCOCO X via Elfutils-devel wrote: > bug -> but Thanks, pushed. Mark

Re: Issue 62071 in oss-fuzz: elfutils:fuzz-libdwfl: Null-dereference READ in chunk_compare

2023-09-11 Thread Mark Wielaard
Hi, On Thu, Sep 07, 2023 at 04:25:00PM +0200, Mark Wielaard wrote: > Subject: [PATCH] libelf: tdelete dummy key if anything goes wrong setting up > rawchunk > > elf_getdata_rawchunk uses a binary search tree cache. If a rawchunk is > not yet in the cache we setup a new entry.

Re: Building Elfutils with Mingw32

2023-09-15 Thread Mark Wielaard
Hi Colin, Hi Ulf, On Thu, Sep 14, 2023 at 07:44:08PM +, McAllister, Colin via Elfutils-devel wrote: > I did see that there were quite a few patches sent to the ML toward the end > of 2022 that attempted to add Windows support. > https://sourceware.org/pipermail/elfutils-devel/2022q4/005449.h

Re: make check fails for version 0.189 on aarch64

2023-09-15 Thread Mark Wielaard
Hi Jonatan, On Fri, Sep 15, 2023 at 08:42:28PM +0200, Jonatan Schlag via Elfutils-devel wrote: > I'm currently trying to build elfutils in version 0.189 on an aarch64 > system. Unfortunately, make check fails with the following errors: > > https://nopaste.ipfire.org/view/Sx7pjy4g > > The full l

Re: [PATCH] PR30879: debuginfod intermittent terminate()

2023-10-01 Thread Mark Wielaard
Hi Frank, On Fri, Sep 22, 2023 at 04:36:07PM -0400, Frank Ch. Eigler via Elfutils-devel wrote: > > Author: Frank Ch. Eigler > Date: Fri Sep 22 15:30:51 2023 -0400 > > PR30879: intermittent debuginfod crash with unhandled exception > > Code inspection identified two places where

Updating mailman settings to avoid From rewriting

2023-10-02 Thread Mark Wielaard
Hi, Currently the newlib, binutils, gdb-patches, elfutils-devel and libabigail mailinglists rewrite the From header when a message is from a (strict) dmarc domain. This is to avoid breaking the dmarc policy and get bounces from such messages. However this breaks applying patches posted to the lis

Re: [PATCH 01/14] libdw: Make try_split_file static

2023-10-03 Thread Mark Wielaard
Hi Omar, On Wed, 2023-09-27 at 11:20 -0700, Omar Sandoval wrote: > It's only used in libdw_find_split_unit.c. Obvious correct. Applied. Thanks, Mark

Re: [PATCH 02/14] libdw: Handle split DWARF in dwarf_entrypc

2023-10-03 Thread Mark Wielaard
Hi Omar, On Wed, 2023-09-27 at 11:20 -0700, Omar Sandoval wrote: > From: Omar Sandoval > > If a DIE has no DW_AT_entry_pc attribute, dwarf_entrypc looks for > DW_AT_low_pc in that DIE. But for a split compilation unit DIE, > DW_AT_low_pc is in the corresponding skeleton DIE, so this fails. > dw

Re: [PATCH 03/14] libdw: Handle DW_AT_ranges in split DWARF 5 skeleton in dwarf_ranges

2023-10-03 Thread Mark Wielaard
Hi Omar, On Wed, 2023-09-27 at 11:20 -0700, Omar Sandoval wrote: > From: Omar Sandoval > > When commit 879f3a4f99df ("libdw: Handle .debug_rnglists in > dwarf_ranges.") added support for split DWARF 5 in 2018, GCC put all > range lists for split DWARF in the .debug_rnglists section of the > skel

Re: [PATCH 04/14] libdw: Handle other string forms in dwarf_macro_param2

2023-10-03 Thread Mark Wielaard
Hi Omar, On Wed, 2023-09-27 at 11:20 -0700, Omar Sandoval wrote: > From: Omar Sandoval > > dwarf_getmacros handles the additional macro string forms added by DWARF > 5, but dwarf_macro_param2 doesn't. Update it with the list of all > string forms allowed in .debug_macro. In particular, GCC and

Re: [PATCH 05/14] libdw: Fix dwarf_macro_getsrcfiles for DWARF 5

2023-10-03 Thread Mark Wielaard
Hi Omar, On Wed, Sep 27, 2023 at 11:20:54AM -0700, Omar Sandoval wrote: > Dwarf_Macro_Op_Table::is_64bit conflates the address size and the offset > size: for .debug_macinfo, it is initialized based on the compilation > unit's address size, but for .debug_macro, it is initialized based on > the ma

Re: [PATCH 06/14] libdw: Handle split DWARF in dwarf_macro_getsrcfiles

2023-10-03 Thread Mark Wielaard
Hi Omar, On Wed, Sep 27, 2023 at 11:20:55AM -0700, Omar Sandoval wrote: > Macro information references file names from the line number information > table, which is tricky in split DWARF for a couple of reasons. > > First, the line number information for a macro unit comes from the > .debug_line.

Re: [PATCH 00/14] elfutils: DWARF package (.dwp) file support

2023-10-03 Thread Mark Wielaard
Hi Omar, On Wed, Sep 27, 2023 at 11:20:49AM -0700, Omar Sandoval wrote: > This patch series adds support for DWARF package files to libdw and the > elfutils tools. It supports the GNU DebugFission format for DWARF 4 [1] > and the format standardized in DWARF 5 (section 7.3.5 "DWARF Package > Files

[PATCH] libdw: Skip zero entries in aranges

2023-10-06 Thread Mark Wielaard
end. * libdw/dwarf_getaranges.c (dwarf_getaranges): Calculate endp. When seeing two zero values, check we are at endp. https://sourceware.org/bugzilla/show_bug.cgi?id=27805 Signed-off-by: Mark Wielaard --- libdw/dwarf_getaranges.c | 17 +++-- 1 file changed, 15 insertions

[COMMITTED] strip: Clean up a bit more after errors

2023-10-06 Thread Mark Wielaard
of return 1. Signed-off-by: Mark Wielaard --- src/strip.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/strip.c b/src/strip.c index 2a2cc801..7f4788b3 100644 --- a/src/strip.c +++ b/src/strip.c @@ -2543,8 +2543,7 @@ while computing checksum for debug information

Re: Updating mailman settings to avoid From rewriting

2023-10-06 Thread Mark Wielaard
Hi, On Tue, Oct 03, 2023 at 12:12:40AM +0200, Mark Wielaard wrote: > Currently the newlib, binutils, gdb-patches, elfutils-devel and > libabigail mailinglists rewrite the From header when a message is from > a (strict) dmarc domain. This is to avoid breaking the dmarc policy > and

Re: Updating mailman settings to avoid From rewriting

2023-10-08 Thread Mark Wielaard
Hi, On Sat, Oct 07, 2023 at 03:20:55PM +0300, Benson Muite wrote: > On 10/7/23 06:55, Thiago Jung Bauermann wrote: > > Mark Wielaard writes: > >>> Also the newlib and gdb-patches mailinglists don't have an admin at > >>> the moment. Could someone vo

Re: [PATCH] libdw: Skip zero entries in aranges

2023-10-09 Thread Mark Wielaard
Hi, On Fri, 2023-10-06 at 14:03 +0200, Mark Wielaard wrote: > An address/length entry of two zeros is supposed to mark the end of a > table. But in some cases a producer might leave zero entries in the > table (for example when using gcc -ffunction-sections -gc-sections). > > Si

Re: [PATCH] Fix thread-safety for elfutils

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, 2023-08-08 at 12:07 -0500, Heather McIntyre via Elfutils-devel wrote: > This patch was created to address thread-safety issues reported in bug 26921 > and bug 26930 >

[PATCH 03/16] libelf: Fix deadlock in __libelf_readall

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * libelf/elf_readall.c (__libelf_readall): Move rwlock_unlock before libelf_acquire_all. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- libelf/elf_readall.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a

[PATCH 02/16] libelf: Make elf_version thread-safe

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * elf_version.c (version_once): Define once. (initialize_version): New static function. (elf_version): Use initialize_version version_once. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- libelf/elf_version.c | 11

[PATCH 05/16] libelf: Fix elf_end deadlock

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * libelf/elf_end.c (elf_end): Add rwlock_unlock before early return. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- libelf/elf_end.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libelf/elf_end.c b/libelf

[PATCH 04/16] libelf: Fix deadlock in elf_cntl

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * libelf/elf_cntl.c (elf_cntl): Move rwlock_wrlock, rwlock_unlock, inside case switch statements. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- libelf/elf_cntl.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions

[PATCH 01/16] lib: Add new once_define and once macros to eu-config.h

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * lib/eu-config.h New macros. [USE_LOCKS] (ONCE_CALL): (once_define, once) Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- lib/eu-config.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/lib/eu-config.h b/lib/eu-config.h

[PATCH 08/16] libcpu: Change calls for tsearch/tfind to eu_tsearch/eu_tfind.

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * libcpu/Makefile.am: Add USE_LOCKS condition for -pthread. * libcpu/i386_parse.y: Add eu-search.h and remove search.h. Change calls for tsearch/tfind to eu_tsearch/eu_tfind. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard

[PATCH 06/16] libelf: Make elf32_getchdr and elf64_getchdr thread-safe

2023-10-10 Thread Mark Wielaard
. * libelf/elf_getdata.c: Add elf_getdata_wrlock. * libelf/libelfP.h: Add internal function declarations. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- libelf/elf32_getchdr.c| 46 +++-- libelf/elf32_getchdr.h| 61

[PATCH 07/16] lib: Add eu_tsearch and eu_tfind

2023-10-10 Thread Mark Wielaard
: Heather S. McIntyre Signed-off-by: Mark Wielaard --- lib/Makefile.am | 2 +- lib/eu-search.c | 60 + lib/eu-search.h | 39 3 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 lib/eu-search.c

[PATCH 11/16] libdw: Add locking around __libdw_dieabbrev for dwarf_hasattr

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * libdw/dwarf_hasattr.c (dwarf_hasattr): Use die_abbrev_lock around __libdw_dieabbrev call. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- libdw/dwarf_hasattr.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libdw

[PATCH 12/16] libdw: Make libdw_find_split_unit thread-safe

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * (try_split_file): Use eu_tsearch. Add lock for cu->split. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- libdw/libdw_find_split_unit.c | 43 +-- 1 file changed, 36 insertions(+), 7 deleti

[PATCH 10/16] libdw: make dwarf_getalt thread-safe

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * libdw/dwarf_getalt.c: Add lock for dbg->alt_dwarf/main->alt_dwarf. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- libdw/dwarf_getalt.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff

[PATCH 16/16] configure: No longer mark --enable-thread-safety as EXPERIMENTAL

2023-10-10 Thread Mark Wielaard
From: Heather McIntyre * configure.ac (--enable-thread-safety): Remove experimental warning. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- configure.ac | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac

[PATCH 13/16] libdw: Make libdw_findcu thread-safe

2023-10-10 Thread Mark Wielaard
: Mark Wielaard --- libdw/libdw_findcu.c | 54 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c index ed744231..e546fb0f 100644 --- a/libdw/libdw_findcu.c +++ b/libdw/libdw_findcu.c @@ -32,9 +32,13

[PATCH 09/16] src: Use eu-search in nm and findtextrel.

2023-10-10 Thread Mark Wielaard
: Mark Wielaard --- src/Makefile.am | 3 +++ src/findtextrel.c | 10 +- src/nm.c | 10 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 10d59a48..fea5d43e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am

[PATCH 14/16] libdw,libdwfl: Use eu-search for thread-safety

2023-10-10 Thread Mark Wielaard
. * libdw/fde.c: Likewise. * libdwfl/cu.c: Likewise. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- libdw/cie.c | 8 libdw/dwarf_getlocation.c | 16 libdw/dwarf_getmacros.c | 6 +++--- libdw/dwarf_getsrclines.c | 6 +++--- libdw

[PATCH 15/16] tests: Add eu-search tests

2023-10-10 Thread Mark Wielaard
-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- tests/Makefile.am| 16 ++- tests/eu_search_cfi.c| 234 +++ tests/eu_search_die.c| 262 +++ tests/eu_search_lines.c | 228

Re: [PATCH 01/16] lib: Add new once_define and once macros to eu-config.h

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:42 +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * lib/eu-config.h New macros. > [USE_LOCKS] (ONCE_CALL): (once_define, once) > > Signed-off-by: Heather S. McIntyre > Signed-off-by: Mark Wielaard > --

Re: [PATCH 02/16] libelf: Make elf_version thread-safe

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:42 +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * elf_version.c (version_once): Define once. > (initialize_version): New static function. > (elf_version): Use initialize_version version_once. > > Sig

Re: [PATCH 03/16] libelf: Fix deadlock in __libelf_readall

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:42 +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * libelf/elf_readall.c (__libelf_readall): Move rwlock_unlock > before libelf_acquire_all. > > Signed-off-by: Heather S. McIntyre > Signed-off-by: Mark Wiel

Re: [PATCH 04/16] libelf: Fix deadlock in elf_cntl

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:42 +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * libelf/elf_cntl.c (elf_cntl): Move rwlock_wrlock, rwlock_unlock, > inside case switch statements. > > Signed-off-by: Heather S. McIntyre > Signed-

Re: [PATCH 05/16] libelf: Fix elf_end deadlock

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:42 +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * libelf/elf_end.c (elf_end): Add rwlock_unlock before > early return. > > Signed-off-by: Heather S. McIntyre > Signed-off-by: Mark Wielaard > --- > libe

Re: [PATCH 06/16] libelf: Make elf32_getchdr and elf64_getchdr thread-safe

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:42 +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * libelf/elf32_getchdr.c: Move getchdr function to > elf32_getchdr.h. > * libelf/elf32_getchdr.h: New file. > Add macro to create getchdr_wrlock. That is c

Re: [PATCH 07/16] lib: Add eu_tsearch and eu_tfind

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:42 +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * lib/eu-search.h: New file. > Declarations for read/write locked eu_tsearch/eu_tfind. Like in the previous case, don't forget to add such a new header to noinst_HEA

Re: [PATCH 08/16] libcpu: Change calls for tsearch/tfind to eu_tsearch/eu_tfind.

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, Oct 10, 2023 at 03:42:52PM +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * libcpu/Makefile.am: Add USE_LOCKS condition for -pthread. > * libcpu/i386_parse.y: Add eu-search.h and remove search.h. > Change calls for tsearch/tfin

Re: [PATCH 09/16] src: Use eu-search in nm and findtextrel.

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, Oct 10, 2023 at 03:42:53PM +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * src/Makefile.am: Add USE_LOCKS condition for -pthread. > * src/findtextrel.c: Add eu-search.h and remove search.h. > Change calls of tsearch/tfind to eu_t

Re: [PATCH 10/16] libdw: make dwarf_getalt thread-safe

2023-10-10 Thread Mark Wielaard
Hi Heather, On Tue, Oct 10, 2023 at 03:42:54PM +0200, Mark Wielaard wrote: > * libdw/dwarf_getalt.c: Add lock for > dbg->alt_dwarf/main->alt_dwarf. This takes care of dwarf_getalt. Shouldn't dwarf_setalt also use locking? > Signed-off-by: Heather S. McIntyre &

Re: PATCH PR30962, debuginfod

2023-10-11 Thread Mark Wielaard
Hi Frank, On Tue, 2023-10-10 at 16:37 -0400, Frank Ch. Eigler wrote: > commit e967988e419121cad1d7f40013a316059b1173f0 > Author: Frank Ch. Eigler > Date: Tue Oct 10 16:21:00 2023 -0400 > > PR30962: debuginfod: full paths for X-DEBUGINFOD-FILE/ARCHIVE response > headers > > Previo

Re: PATCH PR30962, debuginfod

2023-10-11 Thread Mark Wielaard
Hi Frank, On Wed, 2023-10-11 at 10:22 -0400, Frank Ch. Eigler wrote: > > I think this makes sense, but it would be good to see an example of the > > paths this now exposes. > > e.g: > % debuginfod-find -v debuginfo /bin/ls > [...] > x-debuginfod-size: 502024 > x-debuginfod-archive: > /mnt/fedora

Re: [PATCH 11/16] libdw: Add locking around __libdw_dieabbrev for dwarf_hasattr

2023-10-11 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:42 +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * libdw/dwarf_hasattr.c (dwarf_hasattr): Use die_abbrev_lock > around __libdw_dieabbrev call. > > Signed-off-by: Heather S. McIntyre > Signed-off-by: Mark Wie

Re: [PATCH 12/16] libdw: Make libdw_find_split_unit thread-safe

2023-10-11 Thread Mark Wielaard
Hi Heather, On Tue, Oct 10, 2023 at 03:42:56PM +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * (try_split_file): Use eu_tsearch. > Add lock for cu->split. > > Signed-off-by: Heather S. McIntyre > Signed-off-by: Mark Wielaard > --- > libd

Re: PATCH PR30962, debuginfod

2023-10-12 Thread Mark Wielaard
Hi Frank, On Wed, 2023-10-11 at 14:57 -0400, Frank Ch. Eigler wrote: > > OK. But I think you should add an explanation or example to "Front-end > > proxies can also elide sensitive path name components" paragraph. So > > the user is fully aware what those "sensitive path names" are. Maybe > > even

Re: [PATCH 13/16] libdw: Make libdw_findcu thread-safe

2023-10-12 Thread Mark Wielaard
Hi Heather, On Tue, Oct 10, 2023 at 03:42:57PM +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * libdw/libdw_findcu.c (findcu_cb): Use eu_tsearch. > (__libdw_findcu): Use eu_tfind and next_tucu_offset_lock. > (__libdw_findcu_addr

Re: [PATCH 14/16] libdw,libdwfl: Use eu-search for thread-safety

2023-10-12 Thread Mark Wielaard
Hi Heather, On Tue, Oct 10, 2023 at 03:42:58PM +0200, Mark Wielaard wrote: > > * libdw/cie.c: Add eu-search.h and remove search.h. > Change calls of tsearch/tfind to eu_tsearch/eu_tfind. > * libdw/dwarf_getlocation.c: Likewise. > * libdw/dwarf_getmac

Re: [PATCH 16/16] configure: No longer mark --enable-thread-safety as EXPERIMENTAL

2023-10-12 Thread Mark Wielaard
Hi Heather, On Tue, Oct 10, 2023 at 03:43:00PM +0200, Mark Wielaard wrote: > > * configure.ac (--enable-thread-safety): Remove experimental > warning. > This all looks good. We should push this once we have all libelf fixes in. BTW. Your original ChangeLog entry also

Re: [PATCH] libelf: Sync elf.h from glibc

2023-10-13 Thread Mark Wielaard
Hi Ying, On Fri, 2023-10-13 at 17:01 +0800, Ying Huang wrote: > MIPS add new ELF file header flags, new relocations and new section > type SHT_MIPS_ABIFLAGS. Thanks pushed. BTW. Even these patches do require a Signed-off-by normally. But I checked it is exactly the same as the one in glibc elf/e

Re: [PATCH 15/16] tests: Add eu-search tests

2023-10-13 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:42 +0200, Mark Wielaard wrote: > From: Heather McIntyre > > * tests/eu_search_cfi.c: New file. > * tests/eu_search_die.c: New file. > * tests/eu_search_lines.c: New file. > * tests/eu_search_macros.c: New file. >

Re: [PATCH] Fix thread-safety for elfutils

2023-10-14 Thread Mark Wielaard
Hi Heather, On Tue, 2023-10-10 at 15:40 +0200, Mark Wielaard wrote: > Very nice. That is a lot of work. And I must admit that I cannot hold > that much work in my little head at the same time. So I have split up > your commit into (what I hope are) logical independent parts. That will

Re: ☠ Buildbot (Sourceware): elfutils - failed test (failure) (master)

2023-10-14 Thread Mark Wielaard
Hi Heather, On Sat, 2023-10-14 at 15:32 +, buil...@sourceware.org wrote: > A new failure has been detected on builder elfutils-gentoo-sparc while > building elfutils. > > Full details are available at: > https://builder.sourceware.org/buildbot/#builders/225/builds/107 > > Build state: f

Re: [PATCH] Fix thread-safety for elfutils

2023-10-17 Thread Mark Wielaard
Hi Heather, On Sat, 2023-10-14 at 13:29 -0500, Heather McIntyre wrote: > I have a quick query regarding how you'd prefer to handle these changes. > Would you like me to implement some of the recommended modifications and > commit them (if possible), or would you prefer that I simply leave > comm

Re: Some ideas for process improvements/changes

2023-10-19 Thread Mark Wielaard
Hi hackers, Coming back to this, because we did start doing some of these, but didn't actually document all of these suggestions. On Thu, 2023-04-06 at 18:30 +0200, Mark Wielaard wrote: > In general it feels like the elfutils community is working well, there > are regular releases wit

Re: [PATCH 02/16] libelf: Make elf_version thread-safe

2023-10-19 Thread Mark Wielaard
Hi Heather, On Tue, Oct 17, 2023 at 02:05:58PM -0500, Heather McIntyre wrote: > John and I discussed that atomic_compare_exchange_strong could have been > used here. I see that this has been pushed to the main branch, but I can > make the change to the atomic operation if you think that is a bette

Re: [PATCH 11/16] libdw: Add locking around __libdw_dieabbrev for dwarf_hasattr

2023-10-19 Thread Mark Wielaard
Hi Heather, On Tue, Oct 17, 2023 at 02:57:39PM -0500, Heather McIntyre wrote: > I see now that this is incomplete considering the other places that also > call this function. I do agree that global locking may be heavy if 1) > implemented in all of these locations, or 2) implemented directly in >

Re: [PATCH] PR28204, debuginfod IMA

2023-10-23 Thread Mark Wielaard
/ChangeLog > +++ b/config/ChangeLog > @@ -1,3 +1,10 @@ > +2023-08-14 Ryan Goldberg > + > + * profile.csh.in: Set DEBUGINFOD_IMA_CERT_PATH directly. > + * profile.sh.in: Set DEBUGINFOD_IMA_CERT_PATH directly. > + * elfutils.spec.in: Add BuildRequires rpm-devel, > +

Re: [PATCH] PR28204, debuginfod IMA

2023-10-24 Thread Mark Wielaard
> + > keyid:FB:31:82:5D:D0:E0:73:68:5B:26:4E:30:38:96:36:73:F7:53:95:9A > + > +Signature Algorithm: sha256WithRSAEncryption > + 1a:1e:c1:2d:65:ad:f0:24:ec:9e:a7:fd:d4:ea:e1:54:dc:31: > + 1c:62:8c:29:0b:7a:56:6e:f7:b4:87:92:3e:ff:d5:40:4b:24: > +

Re: [PATCH] PR28204, debuginfod IMA

2023-10-24 Thread Mark Wielaard
Hi Frank, On Tue, Oct 24, 2023 at 09:27:43AM -0400, Frank Ch. Eigler wrote: > > BTW. The diff doesn't show the newly added binary files. So the patch > > cannot be applied. Please use git send-email or git format-patch for > > that. > > I would not expect the emailed patch to apply, esp. with all

Re: Some ideas for process improvements/changes

2023-10-25 Thread Mark Wielaard
Hi, On Thu, 2023-10-19 at 18:13 +0200, Mark Wielaard wrote: > > - Get rid of ChangeLog files and trivial ChangeLog entries > > I personally love ChangeLog entries. Writing them helps me > > double check I actually intended to make the changes. And > > it is a grea

Preparing for a 0.190 release end of next week

2023-10-26 Thread Mark Wielaard
Hi all, There are various patch reviews and outstanding bugs being worked on. And we'll try to get to all of them. But it would also be good to get a new release out. The last one was in March. There have been 70+ commits by 20 people since 0.189. Lets get a few more patches in and then aim for a

Re: [PATCH] PR28204, debuginfod IMA

2023-10-31 Thread Mark Wielaard
Hi Frank, On Fri, 2023-10-27 at 15:15 -0400, Frank Ch. Eigler wrote: > > > I would not expect the emailed patch to apply, esp. with all the other > > > work done in the intermediate months, which is why the code is also in > > > the git branch. The binary files do not seem effectively reviewable

Re: Building Elfutils with Mingw32

2023-11-01 Thread Mark Wielaard
On Sat, 2023-09-16 at 09:33 +0200, Ulf Hermann via Elfutils-devel wrote: > > I haven't considered shipping cygwin with perfparser. Is that actually > > possible? It looks like it needs some installation procedure I would > > have to burden the user with. > > I guess shipping cygwin with perfpars

Re: Building Elfutils with Mingw32

2023-11-01 Thread Mark Wielaard
Hi, On Mon, 2023-09-18 at 13:18 +, McAllister, Colin via Elfutils-devel wrote: > > There is a large number of developers who build software for ELF-based > > embedded systems on windows and test/debug/profile/deploy it over some > > network or USB connection. Those people want to have elfutils

Re: [PATCH 07/14] libdw: Recognize .debug_[ct]u_index sections in dwarf_elf_begin

2023-11-01 Thread Mark Wielaard
: Add IDX_debug_cu_index and > + IDX_debug_tu_index. > + (scn_to_string_section_idx): Ditto. > + (scn_dwarf_type): Check for .debug_cu_index, .debug_tu_index, > + .zdebug_cu_index, and .zdebug_tu_index. > + (check_section): Change .dwo suffix matching to account fo

Re: [PATCH] PR28204, debuginfod IMA

2023-11-01 Thread Mark Wielaard
Hi Frank, On Tue, 2023-10-31 at 11:46 -0400, Frank Ch. Eigler wrote: > > My point is really that posting with git format-patch or send-email > > makes it possible for someone to simply use git am, b4 or git pw to try > > out a patch. If the patch doesn't apply then that will be the first > > revie

Re: ☠ Buildbot (Sourceware): elfutils - failed test (failure) (master)

2023-11-01 Thread Mark Wielaard
en the sparc builder is a little bit more robust so we can reactivate the email notifications again? Thanks, Mark From 63e9a80421d27f8195b2d96b90af3980c24335ac Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 1 Nov 2023 17:37:12 +0100 Subject: [PATCH] Change tags on elfutils-gentoo-spar

Re: [PATCH 08/14] libdw: Parse DWARF package file index sections

2023-11-01 Thread Mark Wielaard
Add dwarf_cu_dwp_section_info.c. > + * dwarf_end.c (dwarf_end): Free dwarf->cu_index and dwarf->tu_index. > + * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_SECTION. > + * libdw.h (dwarf_cu_dwp_section_info): New declaration. > + * libdw.map (ELFUTILS_0.190): Add d

Re: [PATCH] readelf: Support .gdb_index version 9

2023-11-02 Thread Mark Wielaard
Hi Aaron, On Tue, 2023-10-31 at 16:33 -0400, Aaron Merey wrote: > I'd like to merge this patch before the next release. Unless anyone objects > I'll merge it by Friday Nov 3. Looks good to me. Some small comments below. > Commit message: BTW if you add comments like the above after the first "

Re: [PATCH 09/14] libdw, libdwfl: Save original path of ELF file

2023-11-02 Thread Mark Wielaard
Hi Omar, On Wed, 2023-09-27 at 11:20 -0700, Omar Sandoval wrote: > libdw and libdwfl currently save the path of the directory containing > the ELF file to use when searching for alt and dwo files. To search for > dwp files, we need the file name too. Add an elfpath field to Dwarf, > and set the

Re: [PATCH 10/14] libdw: Try .dwp file in __libdw_find_split_unit()

2023-11-02 Thread Mark Wielaard
Hi Omar, On Wed, Sep 27, 2023 at 11:20:59AM -0700, Omar Sandoval wrote: > Try opening the file in the location suggested by the standard (the > skeleton file name + ".dwp") and looking up the unit in the package > index. The rest is similar to .dwo files, with slightly different > cleanup since a

Re: [PATCH 11/14] tests: Handle DW_MACRO_{define, undef}_{strx, sup} in dwarf-getmacros

2023-11-02 Thread Mark Wielaard
Hi Omar, On Wed, Sep 27, 2023 at 11:21:00AM -0700, Omar Sandoval wrote: > + * dwarf-getmacros.c (mac): Add DW_MACRO_define_sup, > + DW_MACRO_define_strx, DW_MACRO_undef_sup, and DW_MACRO_undef_strx > + cases to opcode switch statement. Looks sane. Applied and pushed. Thanks, Mark

Re: [PATCH 12/14] tests: Optionally dump all units in dwarf-getmacros

2023-11-02 Thread Mark Wielaard
Hi Omar, On Wed, Sep 27, 2023 at 11:21:01AM -0700, Omar Sandoval wrote: > If instead of a CU offset an empty string is given as the second > argument, dump all units. Pushed, Mark

Re: [PATCH 13/14] libdw: Apply DWARF package file section offsets where appropriate

2023-11-02 Thread Mark Wielaard
c (dwarf_scnnames): Add IDX_debug_cu_index and > IDX_debug_tu_index. > (scn_to_string_section_idx): Ditto. > @@ -60,6 +66,8 @@ > __libdw_dwp_find_unit, and use it to adjust abbrev_offset and assign > newp->dwp_row. > * dwarf_cu_dwp_section_info

Re: [PATCH 00/14] elfutils: DWARF package (.dwp) file support

2023-11-02 Thread Mark Wielaard
Hi Omar, On Wed, Sep 27, 2023 at 11:20:49AM -0700, Omar Sandoval wrote: > This patch series adds support for DWARF package files to libdw and the > elfutils tools. It supports the GNU DebugFission format for DWARF 4 [1] > and the format standardized in DWARF 5 (section 7.3.5 "DWARF Package > Files

Re: [PATCH] libelf/elf_newscn.c: fix build failure against gcc-14 (-Walloc-size)

2023-11-02 Thread Mark Wielaard
Hi Sergei, On Thu, Nov 02, 2023 at 07:58:46PM +, Sergei Trofimovich wrote: > `gcc-14` adde a new -Walloc-size warning that makes sure that size of an > individual element matches size of a pointed type: > > https://gcc.gnu.org/PR71219 > > `elfutils` triggers is on `calloc()` call where m

Re: [PATCH v2 0/5] Add support for MIPS

2023-11-03 Thread Mark Wielaard
Hi Yimg, On Thu, 2023-11-02 at 14:55 +0800, Ying Huang wrote: > This is a series of modifications about MIPS. > Support src/readelf, strip, elflint, objdump related tools. Thanks. What are the changes compared to v1? https://patchwork.sourceware.org/project/elfutils/list/?series=18813 > Pass all

<    1   2   3   4   5   6   7   8   9   10   >