[PATCH v3] debuginfod: Support queries for ELF/DWARF sections

2022-10-27 Thread Aaron Merey via Elfutils-devel
| 134 +++ 17 files changed, 804 insertions(+), 83 deletions(-) create mode 100644 doc/debuginfod_find_section.3 create mode 100755 tests/run-debuginfod-section.sh diff --git a/ChangeLog b/ChangeLog index 60624183..6f9b416a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2022-10-27 Aaron

[PATCH v3] debuginfod: Support queries for ELF/DWARF sections

2022-10-31 Thread Aaron Merey via Elfutils-devel
section query support, the client will attempt to download the debuginfo matching the build-id and extract the section. If the debuginfo file cannot be found or the section has type SHT_NOBITS, the server will attempt to download the executable file matching the build-id and extract the sect

[PATCH OB] debuginfod-client: Fix out-of-bounds write

2022-11-01 Thread Aaron Merey via Elfutils-devel
Pushed as obvious. Return early from path_escape when '\0' is seen in order to prevent an out-of-bounds write to the dest buffer. Signed-off-by: Aaron Merey --- debuginfod/debuginfod-client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debuginfod/debuginfod-

[PATCH OB] run-debuginfod-section.sh: Avoid zstd-compressed rpms

2022-11-01 Thread Aaron Merey via Elfutils-devel
Pushed as obvious. Only test using rpms without zstd compression. Older versions of libarchive may fail to handle these. Signed-off-by: Aaron Merey --- tests/run-debuginfod-section.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-debuginfod-section.sh b/tests

[PATCH OB] Changelog: Update entries from previous commits.

2022-11-01 Thread Aaron Merey via Elfutils-devel
Pushed as obvious. Update Changelogs with details from commits 04b1a3aa and 054b3bde9. Signed-off-by: Aaron Merey --- debuginfod/ChangeLog | 4 tests/ChangeLog | 5 + 2 files changed, 9 insertions(+) diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index 92a880f8

[COMMITTED] debuginfod_find_section: Always update rc with most recent error code

2022-11-04 Thread Aaron Merey via Elfutils-devel
debuginfod_find_section may attempt to download both the debuginfo and executable matching the given build-id. If neither of these files can be found, update rc to ensure that we always return an accurate error code in this case. Signed-off-by: Aaron Merey --- debuginfod/ChangeLog

Re: [COMMITTED] debuginfod_find_section: Always update rc with most recent error code

2022-11-07 Thread Aaron Merey via Elfutils-devel
Hi Mark, On Mon, Nov 7, 2022 at 9:19 AM Mark Wielaard wrote: > >if (rc == -EEXIST) > > { > > - /* The section should be found in the executable. */ > > + /* Either the debuginfo couldn't be found or the section should > > + be in the executable. */ > >fd = debugi

[COMMITTED] debuginfod-client.c: Don't treat 0 as an error code.

2022-11-07 Thread Aaron Merey via Elfutils-devel
Replace 'fd > 0' with 'fd >= 0' to avoid treating a possible file descriptor as an error code. Signed-off-by: Aaron Merey --- debuginfod/ChangeLog | 5 + debuginfod/debuginfod-client.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --gi

[OB PATCH] debuginfod-client.c: Download section even if cached executable didn't contain it.

2023-02-07 Thread Aaron Merey via Elfutils-devel
even if the section could be downloaded. Fix this by having cache_find_section not return -ENOENT unless cached debuginfo was able to be read. Signed-off-by: Aaron Merey --- debuginfod/ChangeLog | 5 + debuginfod/debuginfod-client.c | 26 -- 2 files change

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

2023-02-07 Thread Aaron Merey via Elfutils-devel
> Build state: failed test (failure) > Revision: 53b596ef4018693403395d702045c15762af3da7 > Worker: gentoo-sparc > Build Reason: (unknown) > Blamelist: Aaron Merey > > Steps: > [...] > - 7: make check ( failure ) > Logs: > - stdio: > https://builder.sou

[PATCH OB] debuginfod-client.c: Skip empty file creation for cancelled queries

2023-03-17 Thread Aaron Merey via Elfutils-devel
essfn cancels a query. Signed-off-by: Aaron Merey --- debuginfod/ChangeLog | 5 + debuginfod/debuginfod-client.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index f861eb72..5db5a753 100644 --- a/debuginfod/Chan

[OB PATCH] debuginfod-client.c: Avoid sscanf on mixed-case component of string

2023-03-30 Thread Aaron Merey via Elfutils-devel
uot;x-debuginfod-size" from the format string. Signed-off-by: Aaron Merey --- debuginfod/ChangeLog | 5 + debuginfod/debuginfod-client.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index 44dc3a15..c8de6ca0 10

[PATCH] [PATCH] debuginfod: Use the debuginfod-size response header

2022-01-11 Thread Aaron Merey via Elfutils-devel
erred, the actual transfer length will be less than debuginfod-size. In this case debuginfod-size is a best-guess upper bound on the size of the transfer. Signed-off-by: Aaron Merey --- debuginfod/debuginfod-client.c | 83 ++ 1 file changed, 43 insertions(+

[PATCH] PR29022: 000-permissions files cause problems for backups

2022-04-05 Thread Aaron Merey via Elfutils-devel
000-permission files currently used for negative caching can cause permission problems for some backup software and disk usage checkers. Fix this by using empty files to for negative caching instead. https://sourceware.org/bugzilla/show_bug.cgi?id=29022 Signed-off-by: Aaron Merey

Re: caching failed lookups of debuginfo?

2022-04-08 Thread Aaron Merey via Elfutils-devel
Hi Milian, On Fri, Apr 8, 2022 at 5:08 PM Milian Wolff wrote: > I can reproduce it now suddenly with debuginfod-find too: > > ``` > $ > debuginfod-find debuginfo 85766e9d8458b16e9c7ce6e07c712c02b8471dbc > debuginfod_find_debuginfo 85766e9d8458b16e9c7ce6e07c712c02b8471dbc > server urls "https://de

Re: caching failed lookups of debuginfo?

2022-04-08 Thread Aaron Merey via Elfutils-devel
Thanks for spotting this Milian. On Fri, Apr 8, 2022 at 6:40 PM Mark Wielaard wrote: > I think we as developers keep clearing the cache to test stuff. But > that means we recreate the cache_miss file every time, so that gets a > new mtime. And if you are just testing for 10 minutes everything lo

Re: [PATCH] PR29022: 000-permissions files cause problems for backups

2022-04-08 Thread Aaron Merey via Elfutils-devel
Signed-off-by: Aaron Merey --- debuginfod/ChangeLog | 5 + debuginfod/debuginfod-client.c| 94 --- tests/ChangeLog | 5 + tests/Makefile.am | 4 +- tests/run-debuginfod-federation-lin

Re: [PATCH] PR29022: 000-permissions files cause problems for backups

2022-04-13 Thread Aaron Merey via Elfutils-devel
Hi Mark, Thanks for the review. I fixed the issues you pointed out (good catch re. setting rc before closing fd) and pushed as commit 8b568fdea8 with Tested-by: Milian Wolff added. Milian, thanks again for taking a look at this. Aaron

Re: [PATCH] [PATCH] debuginfod: Use the debuginfod-size response header

2022-04-21 Thread Aaron Merey via Elfutils-devel
On Thu, Mar 31, 2022 at 1:44 PM Mark Wielaard wrote: > Just a question about this part: > > > + /* If Content-Length is -1, try to get the size from > > + X-Debuginfod-Size */ > > + if (dl_size == -1 && c->winning_headers != NULL) > > +{ > > +

[PATCH 2/2] debuginfod: ensure X-DEBUGINFOD-SIZE contains file size

2022-04-22 Thread Aaron Merey via Elfutils-devel
For archived files X-DEBUGINFOD-SIZE currently contains the size of the archive instead of the size of the uncompressed file. Fix this. Also add testcases to verify X-DEBUGINFOD-SIZE contains uncompressed file sizes. Signed-off-by: Aaron Merey --- debuginfod/debuginfod.cxx| 11

Re: [PATCH 2/2] debuginfod: ensure X-DEBUGINFOD-SIZE contains file size

2022-04-22 Thread Aaron Merey via Elfutils-devel
Please ignore the "2/2" in the subject line, this patch is not part of a series. Aaron

Re: [PATCH] debuginfod: Use the debuginfod-size response header

2022-04-22 Thread Aaron Merey via Elfutils-devel
vel/2022q2/004936.html >From b56f1568b832fe1c23ffb711aa0486fbd2c5067f Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Tue, 11 Jan 2022 22:07:55 -0500 debuginfod: Use the debuginfod-size response header In some cases the content-length header may not be available in order to pass to a progressfn

Re: [PATCH] debuginfod: Use the debuginfod-size response header

2022-04-25 Thread Aaron Merey via Elfutils-devel
On Sun, Apr 24, 2022 at 11:05 AM Mark Wielaard wrote: > Looks good. Pleas commit. Thanks, pushed as: commit 55fee962676fbff60c6b0469305bcb077910d64f Author: Aaron Merey Date: Tue Jan 11 22:07:55 2022 -0500 debuginfod: Use the debuginfod-size response header In some cases

[PATCH] debuginfod: ensure X-DEBUGINFOD-SIZE contains file size

2022-04-25 Thread Aaron Merey via Elfutils-devel
throw libc_exception (errno, string("stat ") + b_source1 + " > > archive " + b_source0); > > +} > > It shouldn't require a new fstat -- the archive component file's size > should be available from libarchive already: archive_entry_size(e); Fixed

Re: [PATCH] Introduce public dwfl_get_debuginfod_client API

2022-07-07 Thread Aaron Merey via Elfutils-devel
Hi Milian, On Thu, Jul 7, 2022 at 10:47 AM Milian Wolff wrote: > > Dwfl can use debuginfod internally, which was so far totally opaque > to the outside. While the functionality is great for users of the > dwfl API, the long wait times induced by downloading of data over > debuginfod lead to compl

Re: [PATCH] Introduce public dwfl_get_debuginfod_client API

2022-07-07 Thread Aaron Merey via Elfutils-devel
On Thu, Jul 7, 2022 at 12:59 PM Milian Wolff wrote: > > On Donnerstag, 7. Juli 2022 18:40:05 CEST Aaron Merey wrote: >> > > Some line breaks may have accidentally snuck into the patch. I had to > > manually remove the line break right after "dwfl_error.c" for

Re: [PATCH] Introduce public dwfl_get_debuginfod_client API

2022-07-07 Thread Aaron Merey via Elfutils-devel
Thanks. Let's wait for a maintainer to give it the ok before merging. Aaron

Re: [PATCH] Introduce public dwfl_get_debuginfod_client API

2022-07-13 Thread Aaron Merey via Elfutils-devel
Hi Milian, There weren't any concerns with the patch so I've gone ahead and merged it as commit a4b1839c3c46. Thanks, Aaron

Re: [PATCH] Introduce public dwfl_get_debuginfod_client API

2022-07-13 Thread Aaron Merey via Elfutils-devel
On Wed, Jul 13, 2022 at 3:36 PM Milian Wolff wrote: > I got spammed by a flood of mails from buildbot, but from what I can tell the > issues are all unrelated to my patch? Or did I break something? See e.g.: > > [1]: https://builder.sourceware.org/buildbot/#/builders/39/builds/41 These issues are

<    1   2   3   4