elfutils 0.187 released

2022-04-25 Thread Mark Wielaard
debuginfod: use single ipv4+ipv6 microhttpd daemon configuration AUTHORS: Use generator script & git mailmap Luca Boccassi (1): libebl: recognize FDO Packaging Metadata ELF note Mark Wielaard (71): tests: Don't set DEBUGINFOD_TIMEOUT tests: Add -rdynamic to dwfl_proc_attach_L

Re: [PATCH 0/4] Add AARCH64 pointer authentication support

2022-04-28 Thread Mark Wielaard
on, which would be slightly ugly imho. I had hoped it could be a variant of the func_addr_mask. But maybe this is too different to make more generic. Cheers, Mark

[COMMITTED] configure: Don't use valgrind and sanitize-undefined for make distcheck

2022-05-02 Thread Mark Wielaard
From: Mark Wielaard make distcheck would always run with --enable-valgrind and --enable-sanitize-undefined. Assuming the maintainer would run this just before doing a release. But this makes distcheck really, really, really slow. And we have various buildbots now that run various combinations of

Re: ☺ Buildbot (GNU Toolchain): elfutils - build successful (master)

2022-05-03 Thread Mark Wielaard
gt; > Build state: build successful > Revision: 6d0c3b57429add5b6494259c1c06499e52cff4d5 > Worker: fedora-x86_64 > Build Reason: (unknown) > Blamelist: Mark Wielaard This is a little cheating. I removed the --enable-valgrind from make distcheck and this failed before because of s

[COMMITTED] config: Move the 2>/dev/null inside the sh -c '' quotes for profile.csh.

2022-05-03 Thread Mark Wielaard
csh/tcsh would warn about "Ambiguous output redirect" if not done inside the sh -c command. Fix-by: наб https://bugzilla.redhat.com/show_bug.cgi?id=2080957 Signed-off-by: Mark Wielaard --- config/ChangeLog | 4 config/profile.csh.in | 2 +- 2 files changed, 5 insert

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

2022-05-04 Thread Mark Wielaard
y the asan or ubsan "interceptor". But if so, why haven't we seen this before? Cheers, Mark

[PATCH] debuginfod: Try without MHD_USE_DUAL_STACK if MHD_start_daemon fails

2022-05-05 Thread Mark Wielaard
igned-off-by: Mark Wielaard --- debuginfod/ChangeLog | 7 debuginfod/debuginfod.cxx | 74 +++ 2 files changed, 58 insertions(+), 23 deletions(-) diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index 619ebd8c..e108f847 100644 --- a/debug

[PATCH] debuginfod: Use MHD_USE_EPOLL for libmicrohttpd version 0.9.51 or higher

2022-05-05 Thread Mark Wielaard
Also disable MHD_USE_THREAD_PER_CONNECTION when using MHD_USE_EPOLL. https://sourceware.org/bugzilla/show_bug.cgi?id=29123 Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 6 ++ debuginfod/debuginfod.cxx | 15 ++- 2 files changed, 16 insertions(+), 5 deletions

[PATCH] debuginfod: Check result of curl_easy_getinfo in debuginfod_write_callback

2022-05-09 Thread Mark Wielaard
This was the only place in debuginfod-client.c where we didn't check the result of curl_easy_getinfo. Just check it to make things consistent. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 5 + 1 file changed, 5 insertions(+) diff --git a/debuginfod/ChangeLog b/debug

[PATCHv2] debuginfod: Check result of curl_easy_getinfo in debuginfod_write_callback

2022-05-09 Thread Mark Wielaard
This was the only place in debuginfod-client.c where we didn't check the result of curl_easy_getinfo. Just check it to make things consistent. Signed-off-by: Mark Wielaard --- v2 This time with the actual code change... debuginfod/ChangeLog | 5 + debuginfod/debuginfod-cli

[PATCH] debuginfod: Check all curl_easy_setopt calls

2022-05-09 Thread Mark Wielaard
curl_easy_setup can fail for various reasons. Add a curl_easy_setopt_ck macro to check all curl_easy_setopt calls and provides a human readable error message in verbose mode. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 5 +++ debuginfod/debuginfod-client.c | 61

[PATCH] libdw: Add sanity check to store_implicit_value

2022-05-09 Thread Mark Wielaard
Don't just skip the block length, but check it is equal to the op->number that we are going to use as length. Signed-off-by: Mark Wielaard --- libdw/ChangeLog | 4 libdw/dwarf_getlocation.c | 5 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libdw/Cha

[PATCH] strip: Add more NULL check

2022-05-09 Thread Mark Wielaard
When gelf_getshdr, gelf_getrela, gelf_getrel or gelf_getsymshndx return NULL it is an internal error which we want to report instead of crashing. Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/strip.c | 12 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff

[PATCH] debuginfod: Always request servname from getnameinfo for conninfo.

2022-05-09 Thread Mark Wielaard
always request both hostname and servname with NI_NUMERICHOST | NI_NUMERICSERV. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 4 debuginfod/debuginfod.cxx | 15 ++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/debuginfod/ChangeLog b/debuginfod

Optimize debuginfod-client cache lookup/cleanup a little

2022-05-09 Thread Mark Wielaard
lso try to clean up the cache dir. Because that is just duplicate work. [PATCH 3/3] debuginfod: update mtime of interval_path as early as possible Cheers, Mark

[PATCH 1/3] debuginfod: Make sure debuginfod_config_cache always returns valid stat

2022-05-09 Thread Mark Wielaard
d for either writing the default value or reading the config file value. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 6 ++ debuginfod/debuginfod-client.c | 21 ++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/debuginfod/Change

[PATCH 2/3] debuginfod: Remove debuginfod_init_cache

2022-05-09 Thread Mark Wielaard
emove debuginfod_init_cache before calling debuginfod_clean_cache. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 6 debuginfod/debuginfod-client.c | 61 +- 2 files changed, 15 insertions(+), 52 deletions(-) diff --git a/debuginfod/Change

[PATCH 3/3] debuginfod: update mtime of interval_path as early as possible

2022-05-09 Thread Mark Wielaard
will try to delete the files in the same order. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 5 + debuginfod/debuginfod-client.c | 7 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index c9aa4fcf..209

[PATCH] elfcompress: Add sanity checks to make sure to not override variable

2022-05-10 Thread Mark Wielaard
The process_file code is a little tricky. Add sanity checks to make sure shstrtab_name, shstrtab_newname and symstrents are only set once. Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/elfcompress.c | 24 2 files changed, 29 insertions(+) diff

Re: [PATCH] debuginfod: Try without MHD_USE_DUAL_STACK if MHD_start_daemon fails

2022-05-11 Thread Mark Wielaard
Hi, On Fri, May 06, 2022 at 12:37:35AM +0200, Mark Wielaard wrote: > On a systems that have ipv6 disabled debuginfod doesn't start up > anymore because libhttpd MHD_USE_DUAL_STACK only works if it can > open an ipv6 socket. If MHD_start_daemon with MHD_USE_DUAL_STACK > fails

Re: [PATCH] debuginfod: Use MHD_USE_EPOLL for libmicrohttpd version 0.9.51 or higher

2022-05-11 Thread Mark Wielaard
On Fri, May 06, 2022 at 12:38:40AM +0200, Mark Wielaard wrote: > Also disable MHD_USE_THREAD_PER_CONNECTION when using MHD_USE_EPOLL. Pushed after OK from Frank on irc and some testing in Fedora. Cheers, Mark

Re: [PATCH] elfcompress: Add sanity checks to make sure to not override variable

2022-05-14 Thread Mark Wielaard
Hi, On Tue, May 10, 2022 at 12:35:01PM +0200, Mark Wielaard wrote: > The process_file code is a little tricky. Add sanity checks to make > sure shstrtab_name, shstrtab_newname and symstrents are only set once. Pushed. Cheers, Mark

Re: [PATCHv2] debuginfod: Check result of curl_easy_getinfo in debuginfod_write_callback

2022-05-14 Thread Mark Wielaard
Hi, On Mon, May 09, 2022 at 05:40:39PM +0200, Mark Wielaard wrote: > This was the only place in debuginfod-client.c where we didn't check > the result of curl_easy_getinfo. Just check it to make things consistent. Pushed. Cheers, Mark

Re: [PATCH] debuginfod: Check all curl_easy_setopt calls

2022-05-14 Thread Mark Wielaard
Hi, On Mon, May 09, 2022 at 06:22:29PM +0200, Mark Wielaard wrote: > curl_easy_setup can fail for various reasons. Add a curl_easy_setopt_ck > macro to check all curl_easy_setopt calls and provides a human readable > error message in verbose mode. Pushed. Cheers, Mark

Re: [PATCH] libdw: Add sanity check to store_implicit_value

2022-05-14 Thread Mark Wielaard
Hi, On Mon, May 09, 2022 at 06:48:58PM +0200, Mark Wielaard wrote: > Don't just skip the block length, but check it is equal to the > op->number that we are going to use as length. Pushed. Cheers, Mark

Re: [PATCH] strip: Add more NULL check

2022-05-14 Thread Mark Wielaard
Hi, On Mon, May 09, 2022 at 10:24:35PM +0200, Mark Wielaard wrote: > When gelf_getshdr, gelf_getrela, gelf_getrel or gelf_getsymshndx > return NULL it is an internal error which we want to report instead of > crashing. Pushed. Cheers, Mark

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

2022-05-14 Thread Mark Wielaard
s/27 > > Build state: failed test (failure) > Revision: 0f2c8af3ba82ac54acc63ab7cb068578a6c0d96e > Worker: debian-armhf > Build Reason: (unknown) > Blamelist: Mark Wielaard > > Steps: > [...] > - 7: make check ( failure ) > Logs: > - stdio: > http

Re: [PATCH] debuginfod: Always request servname from getnameinfo for conninfo.

2022-05-14 Thread Mark Wielaard
Hi, On Mon, May 09, 2022 at 11:10:44PM +0200, Mark Wielaard wrote: > When getting the connection info getnameinfo is called getting the > hostname and servname except when the sockaddr is a pure ipv6 > address. In that last case only hostname is requested. Since servname > is stack a

Re: Optimize debuginfod-client cache lookup/cleanup a little

2022-05-14 Thread Mark Wielaard
Hi, On Tue, May 10, 2022 at 12:57:20AM +0200, Mark Wielaard wrote: > debuginfod-client would try to create the cache config files twice, > once through debuginfod_init_cache, which was always called before the > debuginfod_clean_cache check. Which called debuginfod_config_cache > whic

[PATCH] libdwfl: Update docs and nonnull attributes for dwfl_module_addrinfo

2022-05-15 Thread Mark Wielaard
Make clear that both the offset and sym arguments cannot be NULL. https://bugzilla.redhat.com/show_bug.cgi?id=1986555 Signed-off-by: Mark Wielaard --- libdwfl/ChangeLog | 5 + libdwfl/libdwfl.h | 32 2 files changed, 21 insertions(+), 16 deletions(-) diff

Re: [PATCH] readelf: Support --dynamic with --use-dynamic

2022-05-19 Thread Mark Wielaard
Hi, On Thu, May 05, 2022 at 09:01:24PM +0800, Di Chen via Elfutils-devel wrote: > From 3ac23c2584d76114deab0c0af6f4af99068dc7f4 Mon Sep 17 00:00:00 2001 > From: Di Chen > Date: Thu, 28 Apr 2022 19:55:33 +0800 > Subject: [PATCH] readelf: Support --dynamic with --use-dynamic > > Currently, eu-read

Re: [PATCH] libdwfl: Update docs and nonnull attributes for dwfl_module_addrinfo

2022-05-27 Thread Mark Wielaard
Hi, On Sun, 2022-05-15 at 22:00 +0200, Mark Wielaard wrote: > Make clear that both the offset and sym arguments cannot be NULL. > > https://bugzilla.redhat.com/show_bug.cgi?id=1986555 I didn't get feedback on the actual wording, but I think this is better than we had. So pushed. Cheers, Mark

Re: [Bug debuginfod/28577] Make run-...-fd-prefetch-caches.sh test something

2022-05-27 Thread Mark Wielaard
chive_test c36708a78618d597dee15d0dc989f093ca5f9120 > /usr/src/debug/hello2-1.0-2.x86_64/hello.c $SHA > archive_test 41a236eb667c362a1c4196018cc4581e09722b1b > /usr/src/debug/hello2-1.0-2.x86_64/hello.c $SHA > archive_test bc1febfd03ca05e030f0d205f7659db29f8a4b30 > /usr/src/debug/hello-1.0/hello.c $SHA > archive_test f0aa15b8aba4f3c28cac3c2a73801fefa644a9f2 > /usr/src/debug/hello-1.0/hello.c $SHA > archive_test bbbf92ebee5228310e398609c23c2d7d53f6e2f9 > /usr/src/debug/hello-1.0/hello.c $SHA > -archive_test d44d42cbd7d915bc938c81333a21e355a6022fb7 > /usr/src/debug/hello-1.0/hello.c $SHA OK, test that the hello.c source file is found in the scanned archives, that the fdcache is used and that the sha1sum checks out. > metrics=$(curl http://127.0.0.1:$PORT1/metrics) > -regex="fdcache_bytes ([0-9]+).*fdcache_prefetch_bytes ([0-9]+)" > +regex="fdcache_bytes ([0-9]+)" > mb=$((1024*1024)) > if [[ $metrics =~ $regex ]]; then >fdbytes=${BASH_REMATCH[1]} > - pfbytes=${BASH_REMATCH[2]} > - if [ $fdbytes -gt $mb ] || [ $pfbytes -gt $mb ]; then > + if [ $fdbytes -gt $mb ] ; then > err >fi OK, check that the prefetch cache isn't bigger than 10MB. Why that number? Thanks, Mark

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

2022-05-27 Thread Mark Wielaard
gt; > Build state: failed test (failure) > Revision: b8713b3fd0617415c76df8c9da70f8e2f26d3134 > Worker: centos-x86_64 > Build Reason: (unknown) > Blamelist: Mark Wielaard > > Steps: > [...] > - 7: make check ( failure ) > Logs: > - stdio: > https://

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

2022-05-28 Thread Mark Wielaard
6.6G Swap: 511M 0B511M So maybe / was slightly full. The buildbot itself runs under /srv/ I freed 2.5G from / and uninstalled abrt so it doesn't intercept generating the core files. Cheers, Mark

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

2022-05-28 Thread Mark Wielaard
s/33 > > Build state: failed test (failure) > Revision: b8713b3fd0617415c76df8c9da70f8e2f26d3134 > Worker: centos-x86_64 > Build Reason: (unknown) > Blamelist: Mark Wielaard > > - 7: make check ( failure ) > Logs: > - stdio: > https://builder.sourceware.

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

2022-05-28 Thread Mark Wielaard
On Sat, May 28, 2022 at 11:35:19AM +0200, Mark Wielaard wrote: > Retrying with ulimit -c unlimited... > > O! It failed again, now with core > > (gdb) where > #0 0x7f4d528be387 in __GI_raise (sig=sig@entry=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:55 > #

Re: [Bug debuginfod/28577] Make run-...-fd-prefetch-caches.sh test something

2022-05-30 Thread Mark Wielaard
Hi Noah, Hope you don't mind me adding elfutils-devel back to the CC. On Fri, 2022-05-27 at 15:32 -0400, Noah Sanci wrote: > On Fri, May 27, 2022 at 12:29 PM Mark Wielaard > wrote: > > > On Wed, 2022-05-25 at 14:44 -0400, Noah Sanci via Elfutils-devel > > wrot

Re: [PATCH] strip: keep .ctf section in stripped file

2022-05-31 Thread Mark Wielaard
possible. But it would be good to at least try and discuss it. If only so that elfutils eu-strip and binutils strip agree on how to handle/coordinate on such special sections. Cheers, Mark > Signed-off-by: Guillermo E. Martinez > --- > ChangeLog |

[PATCH] Arm Ehdr flag printing

2022-06-01 Thread Mark Wielaard
back cp is moved past the NUL byte. It should move to the NUL byte. Otherwise one cannot anything but the first added flag description. Finally some cosmetic changes (space after each comma in the output). Signed-off-by: Mark Wielaard --- Code is by Ulrich, I just added a quick testcase.

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

2022-06-02 Thread Mark Wielaard
On Sat, 2022-05-28 at 11:43 +0200, Mark Wielaard wrote: > On Sat, May 28, 2022 at 11:35:19AM +0200, Mark Wielaard wrote: > > Retrying with ulimit -c unlimited... > > > > O! It failed again, now with core > > > > (gdb) where > > #0 0x7f4d528b

Re: [Bug debuginfod/28577] Make run-...-fd-prefetch-caches.sh test something

2022-06-03 Thread Mark Wielaard
Hi Noah, On Mon, 2022-05-30 at 17:36 +0200, Mark Wielaard wrote: > > Please find the new patch attached. > > Thanks for adding all the comments. Looks good. The only issue is that although it seems to work well on Fedora I am having problems getting to test to work on an older Cent

Re: [Bug debuginfod/28577] Make run-...-fd-prefetch-caches.sh test something

2022-06-03 Thread Mark Wielaard
Hi Noah, Adding the mailinglist back to CC so other can jump in if there is anything obvious from the logs. On Fri, 2022-06-03 at 10:51 -0400, Noah Sanci wrote: > Nothing immediately jumps out, would you mind sending the entire log? Attached. Cheers, Mark curl is /usr/bin/curl rpm2cpio

Re: [Bug debuginfod/28577] Make run-...-fd-prefetch-caches.sh test something

2022-06-03 Thread Mark Wielaard
Hi, On Fri, 2022-06-03 at 17:02 +0200, Mark Wielaard wrote: > On Fri, 2022-06-03 at 10:51 -0400, Noah Sanci wrote: > > Nothing immediately jumps out, would you mind sending the entire > > log? > > Attached. And Noah figured it out. The machine where it failed has /tmp 92%

Re: [PATCH] Arm Ehdr flag printing

2022-06-06 Thread Mark Wielaard
On Wed, 2022-06-01 at 16:31 +0200, Mark Wielaard wrote: > From: Ulrich Drepper > > Arm needs to decode flags and I modeled it after the binutils code. > The same messages are printed. Given the requirement of the > interface > and the ABIs the current version of the callb

[PATCH] config: Remove unnecessary setting/unsetting of prefix in profiles

2022-06-29 Thread Mark Wielaard
In both profile.csh.in and profile.sh.in we set and then unset prefix, but never use it. Signed-off-by: Mark Wielaard --- config/ChangeLog | 5 + config/profile.csh.in | 2 -- config/profile.sh.in | 2 -- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/ChangeLog

Re: [PATCH] config: Remove unnecessary setting/unsetting of prefix in profiles

2022-06-29 Thread Mark Wielaard
quot;, which requires the shell variable $prefix > to be set. O, I see. Indeed the default is '${prefix}/etc'. But I never saw that because in a package install configure is called with everything expanded [*]. Should have tried by hand. Patch retracted. Thanks, Mark [*] --pref

Re: [PATCH] Introduce public dwfl_get_debuginfod_client API

2022-07-13 Thread Mark Wielaard
e_only, 2, 3)’ 50 | extern ssize_t __REDIRECT (__pread_alias, |^~ cc1: all warnings being treated as errors That needs investigation. The ar file format is a little odd, those fields are in (non-zero terminated) ASCII decimal notation. Which probably confuses t

Re: [PATCH v2] libdw/libdwfl: Add API for accessing registers

2022-07-21 Thread Mark Wielaard
OR (INVALID_REGISTER, N_("Invalid register")) \ > + DWFL_ERROR (INVALID_REGNO, N_("Invalid register number")) \ So maybe call this UNKNOWN_REGISTER_VALUE? >DWFL_ERROR (PROCESS_MEMORY_READ, N_("Error reading process memory")) > \ >DWFL_ERROR (PROCESS_NO_ARCH, N_("Couldn't find architecture of any > ELF")) \ >DWFL_ERROR (PARSE_PROC, N_("Error parsing /proc filesystem")) \ > @@ -786,6 +787,7 @@ INTDECL (dwfl_getthread_frames) > INTDECL (dwfl_getthreads) > INTDECL (dwfl_thread_getframes) > INTDECL (dwfl_frame_pc) > +INTDECL (dwfl_frame_reg) > INTDECL (dwfl_get_debuginfod_client) > > /* Leading arguments standard to callbacks passed a Dwfl_Module. */ Cheers, Mark

Re: runtime validation of DT_SYMTAB lookups - why is there no DT_SYMSZ?

2022-07-26 Thread Mark Wielaard
7227: st_value out of bounds > ``` > > Does anyone know how this can happen? Is this a bug in the toolchain? Try with eu-elflint --gnu which suppresses some known issues. Also could you show those symbol values (1272, 3684, 25720, 27227) they might have a special type, so their st_value isn't really an address? Cheers, Mark

[PATCH] libdwfl: Rewrite reading of ar_size in elf_begin_rand

2022-07-28 Thread Mark Wielaard
error disappears. Signed-off-by: Mark Wielaard --- libdwfl/ChangeLog | 5 + libdwfl/core-file.c | 26 -- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 75c53948..acdaa013 100644 --- a/libdwfl/ChangeLog +++ b/li

Re: [PATCH] libdwfl: Rewrite reading of ar_size in elf_begin_rand

2022-07-28 Thread Mark Wielaard
On Thu, 2022-07-28 at 15:48 +0200, Mark Wielaard wrote: > With GCC 12.1.1, glibc 2.3a, -fsanitize=undefined and > -D_FORTIFY_SOURCE=3 we get the following error message: Sorry for the typo, it is glibc 2.35. Basically an up to date Fedora 36 system (replicated on x86_64, ppc64le and s390x).

buildbot users try branch builders for elfutils

2022-07-28 Thread Mark Wielaard
/#/builders?tags=elfutils-try My workflow to use this looks like: - git checkout -b ar_size - hack, hack, hack... OK, looks good to submit - git commit -a -m "Now who got an ar_size?" - git push origin ar_size:users/mark/try-ar_size - ... wait for the emails to come in or watch bui

Re: debuginfod Credential Helper RFC

2022-07-28 Thread Mark Wielaard
by setting a proxy environment variable so the requests goes through a local proxy that is setup to do some kind of authentication transparently? Or by simply defining the base DEBUGINFOD_URL with https://user:p...@debuginfod.example.com/ ? Thanks, Mark

Re: runtime validation of DT_SYMTAB lookups - why is there no DT_SYMSZ?

2022-07-28 Thread Mark Wielaard
e symbol names? Currently through the section tables, which point to the string table section used. But Di Chen's patch would change that by going through the dynamic segment and phdrs to find the strtab for the dynsym segment (but will of course still need to go through the sections for the .symtab symbols since those aren't accessible through the phdrs). Cheers, Mark

Re: [PATCH] libdwfl: Rewrite reading of ar_size in elf_begin_rand

2022-07-29 Thread Mark Wielaard
Hi, On Thu, 2022-07-28 at 15:48 +0200, Mark Wielaard wrote: > With GCC 12.1.1, glibc 2.3a, -fsanitize=undefined and > -D_FORTIFY_SOURCE=3 we get the following error message: > > In file included from /usr/include/ar.h:22, > from ../libelf/libelfP.h:33, >

Re: debuginfod Credential Helper RFC

2022-07-29 Thread Mark Wielaard
implified, since it assumes you just have one DEBUGINFOD_URL that needs the Authorization, but that seems fine, it seems an obscure enough feature that it doesn't really matter if other servers get the Authorization header too, they will just ignore it and don't even know against what other server they could use the Bearer token. Would any of the above work for your use case? Cheers, Mark

Re: [PATCH v2] libdw/libdwfl: Add API for accessing registers

2022-07-30 Thread Mark Wielaard
, 2022 at 9:27 PM Di Chen wrote: > > > Thanks for the review, Mark. > > > > Re-pushed a patch for it. > > > > 1. NEWS entry added. > > 2. __libdwfl_frame_reg_get/dwfl_frame_reg updated with return int. > > 3. New DWFL_ERROR added: REGISTER_VAL_UNKNOWN

Re: [PATCH] readelf: Support --dynamic with --use-dynamic

2022-07-31 Thread Mark Wielaard
b_data->d_buf) + dyn->d_un.d_ptr; + } That does the check whether dyn->d_un.d_ptr is valid early, so it doesn't need to be checked in each case statement. Also it adds an extra memrchr check to make sure the string is zero terminated. Pushed with those changes. Thanks, M

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

2022-07-31 Thread Mark Wielaard
e, but don't immediately see which mistake I made. Maybe I should use d_val instead of d_ptr (but those are both uint64_t so that shouldn't really matter). Cheers, Mark

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

2022-08-01 Thread Mark Wielaard
Hi, On Mon, Aug 01, 2022 at 02:09:52AM +0200, Mark Wielaard wrote: > > - 7: make check ( failure ) > > Logs: > > - stdio: > > https://builder.sourceware.org/buildbot/#builders/43/builds/47/steps/7/logs/stdio > > - test-suite.log: > > htt

Re: ☺ Buildbot (GNU Toolchain): elfutils - build successful (master)

2022-08-01 Thread Mark Wielaard
gt; > Build state: build successful > Revision: d0ff4e224738adf34eba38dc33ffda67e5da6634 > Worker: fedora-s390x > Build Reason: (unknown) > Blamelist: Di Chen , Mark Wielaard That is good! \o/ > A new failure has been detected on builder elfutils-opensusetw-x86_64 while > b

Re: [Bug debuginfod/27277] Describe retrieved files when verbose

2022-08-04 Thread Mark Wielaard
gress function and afterwards if there was an error during download (then we seem to clean them). Which probably good, but should be documented. Also I probably won't mind providing all header, at least during the progress function callback. But you might be right that they aren't as informative. Cheers, Mark

Re: debuginfod Credential Helper RFC

2022-08-04 Thread Mark Wielaard
f programs just reuse the debuginfod_client objects. Or maybe it should just be one control file that can have entries for all of the variables. Cheers, Mark

[PATCH] lib: Add documentation to explain concurrent htab resizing.

2022-08-05 Thread Mark Wielaard
Document which lock is held by which thread and how moving the htab data is coordinated. Signed-off-by: Mark Wielaard --- lib/ChangeLog| 8 lib/dynamicsizehash_concurrent.c | 26 -- 2 files changed, 28 insertions(+), 6 deletions(-) diff

[PATCH] po: standardize Project-Id-Version to just elfutils

2022-08-05 Thread Mark Wielaard
The po/pl.po file already just said Project-Id-Version: elfutils\n Do the same for the other po files which had somewhat odd names. The generated pot file will still include the version number too. Signed-off-by: Mark Wielaard --- po/ChangeLog | 7 +++ po/de.po | 2 +- po/es.po | 2

Re: [PATCH v2] tests: do not fail on zero sized DIEs (binutils-2.39 compatible)

2022-08-07 Thread Mark Wielaard
special case. > > https://sourceware.org/bugzilla/show_bug.cgi?id=29450 Thanks for finding this and suggesting a workaround. But lets first try to fix binutils. This seems like a pretty bad bug, lets hope it gets fixed soon. So we don't need these kind of workarounds. I added a comment to the binutils bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29451#c2 Cheers, Mark

Re: [PATCH] tests: run-low_high_pc.sh: drop redundant 'lx' suffix

2022-08-07 Thread Mark Wielaard
Hi, On Sat, Aug 06, 2022 at 09:55:06AM +0100, Sergei Trofimovich via Elfutils-devel wrote: > Noticed when debugged test failure: > > lowpc: 8049000, highpc: 8049000lx > ../sysdeps/i386/crti.S: [2def] '_init' highpc <= lowpc Thanks, looks obviously correct. Pushed. Cheers, Mark

Re: [Bug debuginfod/27277] Describe retrieved files when verbose

2022-08-08 Thread Mark Wielaard
Hi Noah, On Fri, Aug 05, 2022 at 03:21:48PM -0400, Noah Sanci wrote: > On Thu, Aug 4, 2022 at 9:12 AM Mark Wielaard wrote: > > > > Hi Noah, > > > > On Thu, 2022-07-14 at 11:32 -0400, Noah Sanci via Elfutils-devel wrote: > > > Please find the patch for pr28284

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

2022-08-08 Thread Mark Wielaard
ic_tag_name was updated to handle the new RELR dynamic tags. Thanks, looks good. Pushed. Cheers, Mark

Re: Making DT_HASH optional?

2022-08-09 Thread Mark Wielaard
ng a DT_SYMTAB_COUNT or DT_SYMTABSZ? It is not intuitive that one can find the number of entries through the hash table. I don't think DT_GNU_HASH can simply be made optional and replace DT_HASH without adding something like DT_SYMTAB_COUNT or DT_SYMTABSZ because the gnu hashtable doesn't come with a simple symbol count. To find the symbol count you have to go through the whole gnu hash table to count the number of entries (which is a non-trivial amount of work). Cheers, Mark

Re: [PATCH] backends: Handle new RISC-V specific definitions

2022-08-09 Thread Mark Wielaard
On Tue, Aug 09, 2022 at 09:54:28AM +0200, Andreas Schwab wrote: > Handle PT_RISCV_ATTRIBUTES, SHT_RISCV_ATTRIBUTES, DT_RISCV_VARIANT_CC. Thanks, looks good. Added a ChangeLog entry and pushed. Cheers, Mark

Re: [PATCH] elflint: Allow zero p_memsz for PT_RISCV_ATTRIBUTES

2022-08-09 Thread Mark Wielaard
Hi Andreas, On Tue, Aug 09, 2022 at 10:29:53AM +0200, Andreas Schwab wrote: > The RISCV_ATTRIBUTES segment is not meant to be loaded. That makes sense. Pushed. Thanks, Mark

Re: [PATCH 6/6] Use file stream or format variants of stdio print functions

2024-10-14 Thread Mark Wielaard
the whole series first before asking questions on some of the previous commits. So this is why you (already) tried to replace putchar_unlocked with fputc. If we are trying to be more consistent then I think I would prefer we use putchar, puts and printf, instead of adding stdout to all these calls

Re: [PATCH 2/6] libcpu: Include config.h before standard headers in lexer source

2024-10-14 Thread Mark Wielaard
libcpu/i386_lex.l (%top): add flex %top block > and move config.h header inclusion to it. configure already checks we have flex, so this is fine. Pushed, Mark

Re: [PATCH 1/6] lib: Add missing config.h include to next_prime.c

2024-10-14 Thread Mark Wielaard
Looks good and is more consistent. Pushed. There isn't much code in this file. What kind of build issue are you seeing without this? Does config.h contain some construct that affects the build of this file? Thanks, Mark

Re: [PATCH 5/6] Remove usage of "unlocked" variant of stdio print functions

2024-10-14 Thread Mark Wielaard
utchar_unlocked(), > so consistently use the safer fputc() instead. I agree the use of the _unlocked variants is inconsistent and it would be better to consistently use the standard versions. But shouldn't we simply replace putchar_unlocked with putchar instead of using fputc (c, stdout)? Cheers, Mark

Re: [PATCH 3/6] libdw: Let clean targets be unconditional

2024-10-14 Thread Mark Wielaard
in the rest of the project. > > * libdw/Makefile.am: move MAINTAINERCLEANFILES > variable to the end of the file > as a non-conditional definition. You are right, there is no reason to only define MAINTAINERCLEANFILES conditionally. Pushed. Thanks, Mark

Re: [PATCH 2/9 v2] doc: Add elf32_fsize.3 and elf64_fsize.3

2024-10-15 Thread Mark Wielaard
Hi Aaron, On Wed, 2024-10-02 at 22:26 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > > --- > v2 changes: > Reword description. > > State EV_CURRENT is the only valid version. > > Mention possibility of integer overflow. > > On Tue, Aug 27, 2024

Re: [PATCH 3/9 v2] doc: Add elf32_getchdr.3 and elf64_getchdr.3

2024-10-15 Thread Mark Wielaard
found in other libelf implementations". > > On Tue, Aug 27, 2024 at 1:23 PM Mark Wielaard wrote: > > > > It should also mention what the Elf32_Chdr structure looks > > like and what the meaning the fields have. What the legal values of > > ch_type are, that ch

Re: [PATCH 1/9 v2] doc: Add elf32_checksum.3 and elf64_checksum.3

2024-10-15 Thread Mark Wielaard
Hi Aaron, On Wed, 2024-10-02 at 22:26 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > > --- > v2 changes: > elf64_checksum.3 now refers to elf32_checksum.3. > > Explained which sections are used to calculate the checksum. > > Mentioned DT_CHECKSUM. > > Mentioned that the checksum is

Re: [PATCH 5/9 v2] doc: Add elf32_getshdr.3 and elf64_getshdr.3

2024-10-15 Thread Mark Wielaard
Hi Aaron, On Wed, 2024-10-02 at 22:26 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > > v2 changes: > Mention elf_flagshdr. > > Mention NULL is returned if scn is NULL. This version looks good to me. Thanks, Mark

Re: [PATCH 7/9 v2] doc: Add elf32_newphdr.3 and elf64_newphdr.3

2024-10-15 Thread Mark Wielaard
Hi Aaron, On Wed, 2024-10-02 at 22:26 -0400, Aaron Merey wrote: > v2 changes: > Mention new program header table is zero'ed out and that > NULL is returned if elf is NULL. Looks good. Thanks, Mark

Re: [PATCH 4/9 v2] doc: Add elf32_getphdr.3 and elf64_getphdr.3

2024-10-15 Thread Mark Wielaard
version looks good to me. Thanks, Mark

Re: [PATCH 6/9 v2] doc: Add elf32_newehdr.3 and elf64_newehdr.3

2024-10-15 Thread Mark Wielaard
Hi Aaron, On Wed, 2024-10-02 at 22:26 -0400, Aaron Merey wrote: > v2 changes: > Mention that the existing header will be returned if one is > already present. > > Mention that an ELF header must be present before callling > elf_newscn or elf_newphdr Looks good to me. Thanks, Mark

Re: [PATCH] PR32218: debuginfod-client: support very long source file

2024-10-15 Thread Mark Wielaard
nts of the original > sections > tempfiles ${BUILDID}.debug_info > objcopy F/prog.debug -O binary --only-section=.debug_info > --set-section-flags .debug_info=alloc $BUILDID.debug_info > -cmp ${BUILDID}.debug_info > ${DEBUGINFOD_CACHE_PATH}/${BUILDID}/section-.debug_info > +cmp ${BUILDID}.debug_info > ${DEBUGINFOD_CACHE_PATH}/${BUILDID}/section-*.debug_info > > tempfiles ${BUILDID}.text > objcopy F/prog -O binary --only-section=.text ${BUILDID}.text > -cmp ${BUILDID}.text ${DEBUGINFOD_CACHE_PATH}/${BUILDID}/section-.text > +cmp ${BUILDID}.text ${DEBUGINFOD_CACHE_PATH}/${BUILDID}/section-*.text > > # Download the original debuginfo/executable files. > DEBUGFILE=`env LD_LIBRARY_PATH=$ldpath > ${abs_top_builddir}/debuginfod/debuginfod-find debuginfo $RPM_BUILDID` > @@ -110,11 +110,11 @@ testrun ${abs_top_builddir}/debuginfod/debuginfod-find > -vvv executable $BUILDID > if test "$(arch)" == "x86_64"; then >tempfiles DEBUGFILE.debug_info >objcopy $DEBUGFILE -O binary --only-section=.debug_info > --set-section-flags .debug_info=alloc DEBUGFILE.debug_info > - testrun diff -u DEBUGFILE.debug_info > ${DEBUGINFOD_CACHE_PATH}/${RPM_BUILDID}/section-.debug_info > + testrun diff -u DEBUGFILE.debug_info > ${DEBUGINFOD_CACHE_PATH}/${RPM_BUILDID}/section-*.debug_info > >tempfiles EXECFILE.text >objcopy $EXECFILE -O binary --only-section=.text EXECFILE.text > - testrun diff -u EXECFILE.text > ${DEBUGINFOD_CACHE_PATH}/${RPM_BUILDID}/section-.text > + testrun diff -u EXECFILE.text > ${DEBUGINFOD_CACHE_PATH}/${RPM_BUILDID}/section-*.text > fi > > # Kill the server. > @@ -123,10 +123,10 @@ wait $PID1 > PID1=0 > > # Delete the section files from the cache. > -rm -f ${DEBUGINFOD_CACHE_PATH}/${RPM_BUILDID}/section-.text > -rm -f ${DEBUGINFOD_CACHE_PATH}/${RPM_BUILDID}/section-.debug_info > -rm -f ${DEBUGINFOD_CACHE_PATH}/${BUILDID}/section-.text > -rm -f ${DEBUGINFOD_CACHE_PATH}/${BUILDID}/section-.debug_info > +rm -f ${DEBUGINFOD_CACHE_PATH}/${RPM_BUILDID}/section-*.text > +rm -f ${DEBUGINFOD_CACHE_PATH}/${RPM_BUILDID}/section-*.debug_info > +rm -f ${DEBUGINFOD_CACHE_PATH}/${BUILDID}/section-*.text > +rm -f ${DEBUGINFOD_CACHE_PATH}/${BUILDID}/section-*.debug_info > > # Verify that the client can extract sections from the debuginfo or > executable > # if they're already in the cache. Indeed, looks like too specific an expected cache name. Cheers, Mark

Re: [patch] test tempdir move

2024-10-09 Thread Mark Wielaard
IT (0) themselves should call this explicitly. exit_cleanup() { rm -f $remove_files; cd ..; rmdir $test_dir } trap exit_cleanup 0 On clean exit we remove all (tempfiles) and then try to remove the $test_dir. Note that this fails (the test) if any non-tmp-file is left behind. I think this works, but the cd .. doesn't end up where it originally did. Maybe save the orig_dir="${PWD}" before creating the test_dir and cd $orig_dir here? Cheers, Mark

Re: elf_memory again, readonly or readwrite...

2024-10-18 Thread Mark Wielaard
Hi, On Thu, 2024-08-29 at 15:47 +0200, Mark Wielaard wrote: > So we changed elf_memory so it pretends the in-memory Elf image is > read with ELF_C_READ_MMAP. This helps when calling elf_memory on > read-only memory which still wants to change some things about the Elf > like unc

Re: [PATCH] PR32218: debuginfod-client: support very long source file

2024-10-16 Thread Mark Wielaard
sparent change to clients, who are not to make any > assumptions about cache file naming structure. However, one existing > test did make such assumptions, so is fixed with some globness. A new > test is also added, using a pre-baked tarball with a very long srcfile > name. Looks good with or without the suggested s/PATH_MAX/NAME_MAX/ tweak suggested above. Thanks, Mark

Re: [PATCH] libelf: elf_compress doesn't handle multiple elf_newdata chunks correctly

2024-10-18 Thread Mark Wielaard
Hi Aaron, On Fri, Oct 18, 2024 at 12:08:11AM -0400, Aaron Merey wrote: > LGTM. The new testcases pass on the trybots. And when I revert the > elf_compress.c changes and run the new tests they fail as expected, so > the elf_compress.c changes do in fact fix PR32102. Thanks, pushed. Cheers, Mark

Re: [PATCH] doc: Add libelf man page

2024-10-18 Thread Mark Wielaard
Hi Aaron, I think if still possible you should include this in the release. I made some comments below, but they can be addressed later. They are just clarifications. On Fri, 2024-10-18 at 00:02 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > config/elfutils.spec.in | 1 + > do

Re: [PATCH v2 5/6] Remove usage of "unlocked" variant of stdio print functions

2024-10-17 Thread Mark Wielaard
s of these print functions. > > There is inconsistent use of fputc_unlocked() with putc_unlocked(), > so consistently use the safer fputc() instead. Looks good. Pushed. Thanks, Mark

Re: [PATCH v2 4/5] src: add unwind origin diagnostics to eu-stack

2024-10-17 Thread Mark Wielaard
print_frames): Take unwound_source field from struct frame and pass > it on. > (parse_opt): Add --cfi-type,-c option to set show_unwound_source. > (main): Ditto. > * tests/run-stack-i-test.sh: Add testcase for --cfi-type. I like this version. Thanks, Mark

Re: [patch] test tempdir move

2024-10-10 Thread Mark Wielaard
rather than whatever-build-filesystem > speed. Individual test scripts are all unaffected. (One could > consider /tmp instead, which is a RAM disk on modern systems, except > that some of the elfutils tests produce GB-sized temporary files. > That's probably too big for RAM.) Looks good to me. Thanks, Mark

Re: Preparing for the 0.192 release on Friday October 18

2024-10-10 Thread Mark Wielaard
other pending patches like the just posted Openwrt compat patches. Cheers, Mark > [1] https://patchwork.sourceware.org/project/elfutils/list >

[PATCH] configure: better error message for [lib]debuginfod missing dependencies

2024-10-22 Thread Mark Wielaard
ima verification check. https://sourceware.org/bugzilla/show_bug.cgi?id=32294 Signed-off-by: Mark Wielaard --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index f191488f9402..0a62fece137e 100644 --- a/configure.ac +++ b

[PATCH] libelf: Add libeu objects to libelf.a static archive

2024-10-22 Thread Mark Wielaard
, add libeu_objects. https://sourceware.org/bugzilla/show_bug.cgi?id=32293 Signed-off-by: Mark Wielaard --- libelf/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libelf/Makefile.am b/libelf/Makefile.am index 3402863ef174..2d3dbdf22756 100644 --- a/libelf/Makefile.am +++ b/l

[PATCH] tests: run-debuginfod-seekable.sh depends on LZMA and DEBUGINFOD

2024-10-22 Thread Mark Wielaard
The run-debuginfod-seekable.sh test would run (and fail) if lzma support was enabled, but debuginfod wasn't build. Only run it when both are available. * tests/Makefile.am (TESTS): Add run-debuginfod-seekable.sh if DEBUGINFOD and LZMA. Signed-off-by: Mark Wielaard ---

Re: [PATCH] config: Enable Debuginfod RPM sig checking and eu-stacktrace in spec

2024-10-25 Thread Mark Wielaard
Hi Aaron, On Thu, 2024-10-24 at 10:23 -0400, Aaron Merey wrote: > On Thu, Oct 24, 2024 at 5:34 AM Mark Wielaard wrote: > > > > For testing that the eu-stacktrace and debuginfod ima verification > > code builds correctly explicitly add --enable-stacktrace and > &

[PATCH] stacktrace: Init elf_fd in sysprof_init_dwfl

2024-10-25 Thread Mark Wielaard
); | ^ This code won't be reached because if find_procfile doesn't initialize elf_fd, it will return an error. But help the compiler by initializing elf_fd to -1. * src/stacktrace.c (sysprof_init_dwfl): Init elf_fd to -1. Signed-off-by: Mark Wielaard --- src/stacktrace.c | 2

<    20   21   22   23   24   25   26   27   28   29   >