[PATCH v11 0/7] Validate binary before use

Jan Kratochvil
2015-07-23T17:21:19Z

Hi,

git://sourceware.org/git/archer.git
jankratochvil/gdbserverbuildid

an update. There were some changes since the last series post which I had to
revert due to the change:
* Use configure.tgt+ALL_TARGET_OBS instead of config/**.mh .

I am not sure if it needs a new approval but the change above is unreviewed and
not upon any maintainer's request.

Jan

v11
* Use configure.tgt+ALL_TARGET_OBS instead of config/**.mh .
* Move linux-maps.[ch] nat/ -> common/ .
* Rename set solib-build-id-force -> set validate-build-id .
* Rebase: Remove bfd_target_elf_flavour and elf_tdata->build_id requirement.
* More descriptive warning messages.

v7
* move linux-maps.[ch] common/->nat/ and target-utils.[ch] common/->target/
* remove GDBSERVER #ifdefs
* rebase on top of the new 'struct inferior *inf' parameter

v6
* move also gdb_regex* to common/ as discussed above, also in config*.ac
* skip_to_space{,_const}() were moved to common/
* common/common-defs.h #include reordering
* new passing of enum filterflags from linux_qxfer_libraries_svr4()
* dropped refactoring of code moved to common/ that avoided GDB exceptions
* new svr4_copy_library_list() needs to handle new so_list->build_id

v5
* svr4_validate() considers missing local build-id as not-a-match
* target_so_ops->validate() now returns not-a-match reason as a string
* rename common/common-target.[ch] -> common/target-utils.[ch]
* testcase runs (but broken) even on different-filesystem remote target
* testcase simplified by using with_test_prefix()

v4
* NEWS, doc/gdb.texinfo additions.
* Used host-defs.h.
* New set/show solib-build-id-force.
* testsuite: Do not run on non-localhost remote targets.

v3
[patchv3 0/8] Validate binary before use
https://sourceware.org/ml/gdb-patches/2014-02/msg00842.html
Message-ID: <20140227213229.GA21121@host2.jankratochvil.net>
* Implemented the review comments I made.
* Removed fetching build-id in solib-svr4.c for NAT run.

v2
[PATCH 0/8] v2 - validate binary before use
https://sourceware.org/ml/gdb-patches/2013-04/msg00472.html
Message-ID: <1366127096-5744-1-git-send-email-ARistovski@qnx.com>

---

gdb/Makefile.in | 24 +
gdb/NEWS | 14 +
gdb/common/common.m4 | 29 +
gdb/common/gdb_regex.c | 73 +++
gdb/common/gdb_regex.h | 35 ++
gdb/common/linux-maps.c | 493 +++++++++++++++++++++
gdb/common/linux-maps.h | 64 +++
gdb/configure | 102 ++--
gdb/configure.ac | 29 -
gdb/configure.tgt | 54 +-
gdb/doc/gdb.texinfo | 55 ++
gdb/features/library-list-svr4.dtd | 13 -
gdb/gdb_regex.h | 36 --
gdb/gdbserver/Makefile.in | 12 -
gdb/gdbserver/config.in | 3
gdb/gdbserver/configure | 56 ++
gdb/gdbserver/configure.srv | 2
gdb/gdbserver/linux-low.c | 398 ++++++++++++++++-
gdb/gdbserver/target.c | 36 ++
gdb/linux-tdep.c | 558 ++----------------------
gdb/solib-darwin.c | 1
gdb/solib-dsbt.c | 1
gdb/solib-frv.c | 1
gdb/solib-spu.c | 1
gdb/solib-svr4.c | 103 ++++
gdb/solib-target.c | 2
gdb/solib.c | 64 +++
gdb/solib.h | 4
gdb/solist.h | 18 +
gdb/target.c | 95 +---
gdb/target.h | 10
gdb/target/target-utils.c | 100 ++++
gdb/target/target-utils.h | 35 ++
gdb/target/target.h | 11
gdb/testsuite/gdb.base/solib-mismatch-lib.c | 30 +
gdb/testsuite/gdb.base/solib-mismatch-libmod.c | 30 +
gdb/testsuite/gdb.base/solib-mismatch.c | 56 ++
gdb/testsuite/gdb.base/solib-mismatch.exp | 156 +++++++
gdb/utils.c | 55 --
39 files changed, 2008 insertions(+), 851 deletions(-)
create mode 100644 gdb/common/gdb_regex.c
create mode 100644 gdb/common/gdb_regex.h
create mode 100644 gdb/common/linux-maps.c
create mode 100644 gdb/common/linux-maps.h
delete mode 100644 gdb/gdb_regex.h
create mode 100644 gdb/target/target-utils.c
create mode 100644 gdb/target/target-utils.h
create mode 100644 gdb/testsuite/gdb.base/solib-mismatch-lib.c
create mode 100644 gdb/testsuite/gdb.base/solib-mismatch-libmod.c
create mode 100644 gdb/testsuite/gdb.base/solib-mismatch.c
create mode 100644 gdb/testsuite/gdb.base/solib-mismatch.exp