[Bug debuginfod/26125] New: during debuginfod cache cleanup, try harder to rmdir empty dirs

2020-06-16 Thread fche at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=26125 Bug ID: 26125 Summary: during debuginfod cache cleanup, try harder to rmdir empty dirs Product: elfutils Version: unspecified Status: NEW Severity: normal

[PATCH 09/10] debuginfod: Fix build_id hexadecimal length check.

2020-06-16 Thread Mark Wielaard
When is debuginfod_query_server is given an hexadecimal string as build-id build_id_len will be zero. We were checking the size of the build_id_bytes destination string instead of the string length of build_id input string. Make sure the input string is not too big or strcpy might overwrite then en

[PATCH 01/10] backends: Make the reloc_nametable zero element an one char array.

2020-06-16 Thread Mark Wielaard
We are using the reloc_nametable zero element as an char array. So make that element an actual array (we are actually after one of the next string arrays in the table). Signed-off-by: Mark Wielaard --- backends/ChangeLog | 6 ++ backends/common-reloc.c | 6 +++--- 2 files changed, 9 ins

[PATCH 06/10] ar, ranlib: Call fchown before fchmod, explicitly check and ignore errors.

2020-06-16 Thread Mark Wielaard
In ar and ranlib we don't mind if the fchown call fails (it normally would, then the file simply gets own by the current user). We used to call fchown before fchmod, but that might ignore (or reset) some mode flags, so call fchown first, then try fchmod (like we already do in elfcompress). Also exp

[PATCH 08/10] debuginfod: Make sure suffix can place zero terminator when copying filename

2020-06-16 Thread Mark Wielaard
We need to make sure that we can always place a zero terminator at the end of suffix when we are copying the filename. So add one more char to the suffix array. And make sure that we can always add an extra escape character when we need to escape the current character. Signed-off-by: Mark Wielaard

[PATCH 04/10] libdwfl: When we find a compressed image, use that, don't search for others

2020-06-16 Thread Mark Wielaard
We try to find a compressed vmlinux image ending with either .gz, bz2 or xz. Stop searching if we find one. Otherwise we will leak a file descriptor for an earlier one we opened. Signed-off-by: Mark Wielaard --- libdwfl/ChangeLog | 5 + libdwfl/linux-kernel-modules.c | 2 +- 2 f

[PATCH 03/10] elflint: Explicitly check and ignore elf_compress error.

2020-06-16 Thread Mark Wielaard
We just want to make sure that any section data is decompressed before use, if the section was already decompressed that is fine, so just ignore any errors. The make this more clear, explicitly check for errors, then don't do anything. This is better than silently ignoring since everywhere else in

[PATCH 07/10] debuginfod: Handle not being able to fopen interval_path.

2020-06-16 Thread Mark Wielaard
Although we check for and/or create the interval_path right before, there is still a possibility that the fopen call fails. Handle that as if the file is unreadable. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 5 + debuginfod/debuginfod-client.c | 9 +++-- 2 files c

[PATCH 05/10] libdwfl: Flag an error if CIE return_address_register is invalid.

2020-06-16 Thread Mark Wielaard
If the CIE return address register is invalid (unknown) for the architecture immediately flag an error and return. Signed-off-by: Mark Wielaard --- libdwfl/ChangeLog | 5 + libdwfl/frame_unwind.c | 6 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libdwfl/ChangeLo

[PATCH 10/10] debuginfod: Make sure handle_data can be allocated and is always freed.

2020-06-16 Thread Mark Wielaard
When allocating handle_data we should check for out of memory failures. Also when the allocation has succeeded make sure we always clean up by going to out1 on any future errors. So move the curl_multi_init call earlier, because that goes to out0 on failure. Signed-off-by: Mark Wielaard --- debu

[PATCH 02/10] libdw: Add missing FALLTHROUGH in execute_cfi.

2020-06-16 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- libdw/ChangeLog | 4 libdw/cfi.c | 1 + 2 files changed, 5 insertions(+) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index c75b0958..72cd5003 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,7 @@ +2020-06-16 Mark Wielaard + + * c