Hi Ying,
On Mon, 2023-07-24 at 16:35 +0800, Ying Huang wrote:
> Hi Mark,
>
> > > diff --git a/libebl/eblreloctypecheck.c b/libebl/eblreloctypecheck.c
> > > index 80e67ef7..e3c43944 100644
> > > --- a/libebl/eblreloctypecheck.c
> > > +++ b/libebl/
impler than creating
a full new HOOK for reloc_type_check.
Cheers,
Mark
s elf specification we are following?
Cheers,
Mark
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.
>
&
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
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
entioned.)
>
> Maybe this can be wrapped in an #ifdef DT_RELR or something like that?
Another good point. Yes, we should do that, we did the same when
SHF_COMPRESSED and ELFCOMPRESS_ZSTD were introduced.
I'll also update rawhide asap with your suggested fixes.
Thanks,
Mark
): 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
with all work. But I
certainly haven't forgotten. I will try to look at it soon since it
would be exciting to finally be able to enable thread safety.
Cheers,
Mark
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
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
mpressed indicates where the total
> size is from and those CURLINFO_SIZE* is skipped. Maybe I should rename
> the variable to something else (it's not always compressed).
>
> Or do you mean that you want to always use written_size even when the
> progress may go beyond 100%?
What is the status of this patch/discussion?
Thanks,
Mark
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
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
only the "child" thread can be unwound, but not the
main thread. I don't know why however, since it doesn't happen always.
It could be that the kernel generates a bad core file or that the main
thread is in a weird state (without unwind cfi) after the clone.
Cheers,
Mark
uncompressed service. Hand testing with
> (unmodified) fedora-38 gdb and debuginfod-find shows dramatically
> improved progress displays: all have quantitative figures when
> fetching from real (unmodified) upstream servers.
>
> Signed-off-by: Frank Ch. Eigler
Very nice and simple. Looks good.
Thanks,
Mark
happen.
Thanks,
Mark
On Tue, 2023-09-05 at 22:01 -0700, ClusterFuzz-External via monorail
via Elfutils-devel wrote:
> Status: New
> Owner:
> CC: elfut...@sourceware.org, da...@adalogics.com, evv...@gmail.com,
> izz...@google.com
> Labels: ClusterFuzz Stability-Memory-A
in _start
> ```
> The fuzz target can be found at
> https://github.com/google/oss-fuzz/blob/master/projects/elfutils/fuzz-libdwfl.c
Thanks. But this doesn't really get me much further. Somehow a NULL key
got into the search tree and I am still unclear how that can happen.
If there is a reproducer/input file that would be really helpful.
Cheers,
Mark
ly I have still been unable to replicate the crash.
But by reading the code carefully I think I have identified how this
might happen. You must get a somewhat unfortunate out of memory or read
error at precisely the wrong point. The attached patch should fix it.
Cheers,
Mark
From 189a689a73db567f2c2c
Hi,
On Sun, Sep 10, 2023 at 12:07:15AM +0800, COCOCO X via Elfutils-devel wrote:
> bug -> but
Thanks, pushed.
Mark
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.
ere is a mingw container setup on builder.sourceware.org which
we might use for doing CI on the port?
https://sourceware.org/cgit/builder/tree/builder/containers/Containerfile-fedora-mingw
Thanks,
Mark
-prefix-map which
I believe doesn't work correctly when also using LTO.
And maybe your /usr/lib64/libc.so.6 might not have any symbols?
Cheers,
Mark
ady catch (haha, pun intended) where/what caused that odd
sparc uncaught exception?
Cheers,
Mark
-patches mailinglists don't have an admin at
the moment. Could someone volunteer to act as list admin for these?
Cheers,
Mark
[*] https://sourceware.org/bugzilla/show_bug.cgi?id=29713
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
, so this fails.
> dwarf_lowpc already handles this fallback, so use it instead.
Nice find. Also interesting varlocs already "tested" for that and we
hadn't noticed before. Applied.
Thanks,
Mark
.dwo otherwise.
>
> 1: https://lists.dwarfstd.org/pipermail/dwarf-discuss/2021-March/002009.html
> 2: https://dwarfstd.org/issues/210310.1.html
Thanks for all these references in the commit message.
With that the 2 line change looks good. Applied.
Thanks,
Mark
n extension for DWARF4 kept the old macinfo format,
just moved it to the dwo.
Thanks for catching this. Applied.
Cheers,
Mark
k here failed. Thanks for fixing.
I had to think a bit on why we didn't need to set the address_size for
the fake_cu. But that is only needed to read address class
forms. Which aren't valid forms in macro data.
Applied,
Mark
when it can't find DW_AT_stmt_list.
Makes sense, it cannot really be any other offset than zero.
Applied,
Mark
obviously caused by your patches. And both
were spurious, later builds are green again.
I'll go through the rest later. But there are more unreviewed patches,
so it might take a bit.
Thanks,
Mark
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).
Since we know the lenght of the table we can just skip such entries
and continue to the
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
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
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
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
g around __libdw_dieabbrev for dwarf_hasattr
libdw: Make libdw_find_split_unit thread-safe
libdw: Make libdw_findcu thread-safe
libdw,libdwfl: Use eu-search for thread-safety
tests: Add eu-search tests
configure: No longer mark --enable-thread-safety as EXPERIMENTAL
Which ca
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
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
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
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
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
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
.
* 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
: 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
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
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
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
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
: 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
: 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
.
* 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
-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
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
> --
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
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
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-
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
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
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
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
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
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
&
?) path of the archive a source file was found in?
Cheers,
Mark
t 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 add that debuginfod-find -v example so people can double check.
Thanks,
Mark
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
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
;sensitive path names" are. Maybe
> > even add that debuginfod-find -v example so people can double check.
>
> OK, rewrote the related text in the man page:
Looks really good and informative.
Thanks,
Mark
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
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
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
bc elf/elf.h.
Cheers,
Mark
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.
>
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
ge-elf-file.sh test?)
Happily things look pretty green for everything else:
https://builder.sourceware.org/buildbot/#/builders?tags=elfutils
Cheers,
Mark
(or anyone else) from
that server, so you don't need to setup git+email yourself locally.
https://man.sr.ht/git.sr.ht/#sending-patches-upstream
Cheers,
Mark
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
ve one question though. __libelf_version is checked in
elf_begin. Should that check be guarded by a lock too?
Thanks,
Mark
y Srđan Milaković also from Rice University).
What do you think?
Cheers,
Mark
/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,
> +
> +
> 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:
> +
r/include/imaevm.h:#define DATA_SIZE4096
OK, reading 4K blocks is fine. But bleah, that is a very generic name
to use in an include header. Boo imaevm.h.
> > > +/* Iterate over the directories in DEBUGINFOD_IMA_CERT_PATH looking
> > > + * for the first verification certificate which matches keyid
> > > + */
> > > +uint32_t keyid = ntohl(((struct signature_v2_hdr *)(bin_sig +
> > > 1))->keyid); // The signature's keyid
> >
> > Eep. Could this have a comment and/or pointer to docs? +1?
> > cast to struct? ntohl?
>
> Yeah. ntohl endianness conversion is not unusual in binary transport
> protocols.
So same as above, this seems like it might trigger undefined behavior.
> > > + init_public_keys(tmp_file);
> >
> > What does init_public_keys do? Is it thread-safe?
>
> Good catch. It initialized a global inside libimaevm.c. It does not
> appear thread-safe. Will wrap this in a pthread-once or somesuch.
libimaevm.c seems not thread-safe in general. You might have to put a big lock
around the whole signature extraction/checking block which uses those library
functions.
Another possible issue might be the initialization of openssl in the
static constructure. How does that interact with how libcurl inits
openssl?
Cheers,
Mark
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
m for a release
Friday 3 November.
Don't worry if a patch doesn't make it for this release, we'll try to
do another early next year (normally there are just 3 or 4 months
between releases, this one took 6, which is an exception).
Cheers,
Mark
bimaevm.c. It does not
> > > appear thread-safe. Will wrap this in a pthread-once or somesuch.
>
> > libimaevm.c seems not thread-safe in general. You might have to put
> > a big lock around the whole signature extraction/checking block
> > which uses those library functions.
>
> OK, will take a look at that. What other global-state conflicting
> things did you notice?
A quick look at the code shows that various functions can read/write a
static public_keys variable linked list, including (indirectly)
ima_verify_signature. So that can cause data-races.
One other issue I noticed is that it seems to be distributed under
GPLv2-only. Which seems to mean that anything based on it should also
be distributed under GPLv2-only, which would include libdebuginfod. Is
there code we can rely on that is GPLv2+ and LGPLv3+ compatible?
> > Another possible issue might be the initialization of openssl in the
> > static constructure. How does that interact with how libcurl inits
> > openssl?
>
> openssl's initialization is fine & thread-safe in practice, despite
> the documentation's warnings.
OK. But even if it is thread-safe, you also need to make sure it inits
the same. This for example worries me a little:
https://github.com/curl/curl/pull/12153
Cheers,
Mark
ws.
It would be great if we could get some volunteer for packaging elfutils
for cygwin.
Cheers,
Mark
5310&state=*
I have reviewed and pushed various of those patches where they made
sense (to me). But as you can see there are various patches that were
just rejected and others where I really don't understand the real
issue/solution.
If someone could help reviewing those that would be really appreciated.
Thanks,
Mark
: 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
searching) that we could fork out to. (OTOH, GPLv2 is
> compatible with GPLv2+.)
But GPLv2-only is not compatible with GPLv3 which is used by e.g. gdb.
This is a bit of a pickle :{
> > > openssl's initialization is fine & thread-safe in practice, despite
> > > the documentation's warnings.
> >
> > OK. But even if it is thread-safe, you also need to make sure it inits
> > the same. [...]
>
> Interesting issue. One openssl initialization call is deep inside
> libcurl, another one in libimaevm's solib ctor. Neither is
> parametrized such that we could influence them. However, things are
> working(tm).
Thanks for checking.
Cheers,
Mark
I did the same for the elfutils-try-gentoo-sparc builder (changing the
tag from elfutils-try to elfutils-try-build). So for try builds you
won't get emails about the sparc builder anymore, but the results will
show up on the builder website and in bunsen.
Sam, could you please let us know wh
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
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 "
* The dir where we found the main Elf.
> */
> + char *elfpath; /* The path where we found the main Elf. */
>
>Dwarf *dw; /* libdw handle for its debugging info. */
>Dwarf *alt;/* Dwarf used for dwarf_setalt, or
> NULL. */
> diff --git a/libdwfl/offline.c b/libdwfl/offline.c
> index e090b42b..50abe8c3 100644
> --- a/libdwfl/offline.c
> +++ b/libdwfl/offline.c
> @@ -151,9 +151,9 @@ process_elf (Dwfl *dwfl, const char *name, const char
> *file_name, int fd,
>/* Don't keep the file descriptor around. */
>if (mod->main.fd != -1 && elf_cntl (mod->main.elf, ELF_C_FDREAD) == 0)
> {
> - /* Grab the dir path in case we want to report this file as
> + /* Grab the path in case we want to report this file as
>Dwarf later. */
> - mod->elfdir = __libdw_debugdir (mod->main.fd);
> + mod->elfpath = __libdw_elfpath (mod->main.fd);
> close (mod->main.fd);
> mod->main.fd = -1;
> }
OK.
Pushed,
Mark
l_function
> __libdw_find_split_unit (Dwarf_CU *cu)
> @@ -98,14 +159,18 @@ __libdw_find_split_unit (Dwarf_CU *cu)
> same id as the skeleton. */
>if (cu->unit_type == DW_UT_skeleton)
> {
> + /* First, try the dwp file. */
> + try_dwp_file (cu);
> +
>Dwarf_Die cudie = CUDIE (cu);
>Dwarf_Attribute dwo_name;
> - /* It is fine if dwo_dir doesn't exists, but then dwo_name needs
> - to be an absolute path. */
> - if (dwarf_attr (&cudie, DW_AT_dwo_name, &dwo_name) != NULL
> - || dwarf_attr (&cudie, DW_AT_GNU_dwo_name, &dwo_name) != NULL)
> + /* Try a dwo file. It is fine if dwo_dir doesn't exist, but then
> + dwo_name needs to be an absolute path. */
> + if (cu->split == (Dwarf_CU *) -1
> + && (dwarf_attr (&cudie, DW_AT_dwo_name, &dwo_name) != NULL
> + || dwarf_attr (&cudie, DW_AT_GNU_dwo_name, &dwo_name) != NULL))
> {
> - /* First try the dwo file name in the same directory
> + /* Try the dwo file name in the same directory
>as we found the skeleton file. */
> const char *dwo_file = dwarf_formstring (&dwo_name);
> const char *debugdir = cu->dbg->debugdir;
OK. Because try_dwp_file will call __libdw_link_skel_split to set
cu->split.
This again will have to be analyzed carefully when we add the
thread-safety work.
Thanks,
Mark
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
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
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
good, but depends
on 8, some questions, specificly about handling split type units. 13
looks good, but depends on 8 and 10.
> Patches 11 and 12 enable testing macro information in dwp files.
Both applied.
> Patch 14 adds support and tests for an LLVM extension to the dwp
> format.
I have to think a bit more on this.
Cheers,
Mark
newp = calloc (sizeof (Elf_ScnList)
> |^
>
> The change swaps arguments to pass larger value as a member size.
Very nice. Patch applied.
Thanks,
Mark
301 - 400 of 3433 matches
Mail list logo