From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, ARistovski@qnx.com
Subject: Re: [PATCH v4 0/8] Validate binary before use
Date: Wed, 19 Mar 2014 22:33:00 -0000 [thread overview]
Message-ID: <20140319223258.GA5398@host2.jankratochvil.net> (raw)
In-Reply-To: <834n37p4dc.fsf@gnu.org>
On Sun, 09 Mar 2014 20:18:55 +0100, Eli Zaretskii wrote:
> > "Shared object" is terminology in GDB, it is in fact the symbol file because
> > GDB never modifies the inferior itself where the real target shared object
> > exists.
> >
> > Just with the build-id comparisons I used "shared library" (as the target
> > in-memory data) vs. "symbol file" to highlight this difference.
>
> Sorry, I don't follow: libfoo.so.1 is a shared library, isn't it?
> There's no reference in the message to any symbol file, right?
target in-memory data:
Found by iterating memory structures like link_map.
Name like "libfoo.so.1" is found in link_map->l_name in target memory.
symbol file:
Found on host disk, from transforming the target name "libfoo.so.1"
(such as by adding "set sysroot" prefix).
These two files do not have to match. This patch ensures that if they do not
match then the second file is not loaded.
I do not think there is currently any established term for the first file
so it is questionable how to communicate the non-matching situation to user.
> > > and doesn't even mention the fact that the problem is a mismatch of the
> > > 2 build-ids. Why not say explicitly that the build-id of the symbol file
> > > doesn't match that of the shared library?
> >
> > This comes from the API, I can rework the patch. The API currently uses
> > method "validate" which can validate it in arbitary way. The current only
> > implmentation in solib-svr4 implements the validation using build-ids but the
> > error/warning message is currently handled by the caller, not the
> > build-id-specific implementation in solib-svr4.
>
> I think it's fine to leave the validation details unspecified, if you
> want. But then we shouldn't reveal that its actual implementation is
> comparing the build-ids. If we want to leave it opaque, let's do it
> consistently, i.e. both in the warnings printed by GDB and in the
> manual. OTOH, if we do want to tell that build-ids should be
> identical, then let's say that in the warning/error messages as well,
> again for consistency.
I have changed the code to print the build IDs instead.
Thanks,
Jan
next prev parent reply other threads:[~2014-03-19 22:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-02 19:53 Jan Kratochvil
2014-03-02 19:53 ` [PATCH v4 6/8] gdbserver build-id attribute generator Jan Kratochvil
2014-03-02 20:47 ` Eli Zaretskii
2014-03-02 19:53 ` [PATCH v4 2/8] Merge multiple hex conversions Jan Kratochvil
2014-03-02 19:53 ` [PATCH v4 5/8] Move linux_find_memory_regions_full & co Jan Kratochvil
2014-03-02 19:53 ` [PATCH v4 1/8] Move utility functions to common/ Jan Kratochvil
2014-03-02 19:53 ` [PATCH v4 4/8] Prepare linux_find_memory_regions_full & co. for move Jan Kratochvil
2014-03-02 19:53 ` [PATCH v4 3/8] Create empty common/linux-maps.[ch] and common/common-target.[ch] Jan Kratochvil
2014-03-10 3:46 ` Yao Qi
2014-03-19 22:33 ` Jan Kratochvil
2014-03-02 19:54 ` [PATCH v4 8/8] Tests for validate symbol file using build-id Jan Kratochvil
2014-03-10 3:38 ` Yao Qi
2014-03-19 22:33 ` Jan Kratochvil
2014-03-20 12:16 ` Yao Qi
2014-03-20 13:12 ` Pedro Alves
2014-03-21 16:58 ` Jan Kratochvil
2014-03-02 19:54 ` [PATCH v4 7/8] Validate " Jan Kratochvil
2014-03-02 20:47 ` [PATCH v4 0/8] Validate binary before use Eli Zaretskii
2014-03-08 19:57 ` Jan Kratochvil
2014-03-09 16:53 ` Eli Zaretskii
2014-03-09 18:58 ` Jan Kratochvil
2014-03-09 19:19 ` Eli Zaretskii
2014-03-19 22:33 ` Jan Kratochvil [this message]
2014-03-21 16:58 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140319223258.GA5398@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=ARistovski@qnx.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox