diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2019-05-17 16:53:08 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-05-21 12:56:33 +0100 |
commit | ebedc1511dc0a24f86186bb847b32868bf2ae04a (patch) | |
tree | 5355ccd78d2185704a8e3419626361680d817dd3 /meta | |
parent | 1df11198ee3d4264c8dc12519be284c573fd4c30 (diff) | |
download | poky-ebedc1511dc0a24f86186bb847b32868bf2ae04a.tar.gz |
gdb: Upgrade from 8.2.1 to 8.3
Bump GDB and change the oeqa selftest expression to allow ptests to
pass.
(From OE-Core rev: f31986ed9f82c48834b2f25979c93697228acbf7)
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
13 files changed, 24 insertions, 234 deletions
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index 668f31324e..744c6c3247 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc | |||
@@ -21,7 +21,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext" | |||
21 | GCCVERSION ?= "8.%" | 21 | GCCVERSION ?= "8.%" |
22 | SDKGCCVERSION ?= "${GCCVERSION}" | 22 | SDKGCCVERSION ?= "${GCCVERSION}" |
23 | BINUVERSION ?= "2.32%" | 23 | BINUVERSION ?= "2.32%" |
24 | GDBVERSION ?= "8.2%" | 24 | GDBVERSION ?= "8.3%" |
25 | GLIBCVERSION ?= "2.29%" | 25 | GLIBCVERSION ?= "2.29%" |
26 | LINUXLIBCVERSION ?= "5.0%" | 26 | LINUXLIBCVERSION ?= "5.0%" |
27 | QEMUVERSION ?= "4.0%" | 27 | QEMUVERSION ?= "4.0%" |
diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py index 7a00753821..291627877e 100644 --- a/meta/lib/oeqa/selftest/cases/package.py +++ b/meta/lib/oeqa/selftest/cases/package.py | |||
@@ -7,6 +7,7 @@ from oeqa.utils.commands import bitbake, get_bb_vars, get_bb_var, runqemu | |||
7 | import stat | 7 | import stat |
8 | import subprocess, os | 8 | import subprocess, os |
9 | import oe.path | 9 | import oe.path |
10 | import re | ||
10 | 11 | ||
11 | class VersionOrdering(OESelftestTestCase): | 12 | class VersionOrdering(OESelftestTestCase): |
12 | # version1, version2, sort order | 13 | # version1, version2, sort order |
@@ -134,7 +135,7 @@ class PackageTests(OESelftestTestCase): | |||
134 | return False | 135 | return False |
135 | 136 | ||
136 | # Check debugging symbols works correctly | 137 | # Check debugging symbols works correctly |
137 | elif "Breakpoint 1, main () at hello.c:4" in l: | 138 | elif re.match("Breakpoint 1.*hello\.c.*4", l): |
138 | return True | 139 | return True |
139 | 140 | ||
140 | self.logger.error("GDB result:\n%d: %s", status, output) | 141 | self.logger.error("GDB result:\n%d: %s", status, output) |
diff --git a/meta/recipes-devtools/gdb/gdb-8.2.1.inc b/meta/recipes-devtools/gdb/gdb-8.3.inc index f28b57439c..db8d5f349f 100644 --- a/meta/recipes-devtools/gdb/gdb-8.2.1.inc +++ b/meta/recipes-devtools/gdb/gdb-8.3.inc | |||
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | |||
5 | file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" | 5 | file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" |
6 | 6 | ||
7 | SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ | 7 | SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ |
8 | file://0001-gdbserver-ctrl-c-handling.patch \ | ||
8 | file://0002-make-man-install-relative-to-DESTDIR.patch \ | 9 | file://0002-make-man-install-relative-to-DESTDIR.patch \ |
9 | file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ | 10 | file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ |
10 | file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ | 11 | file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ |
@@ -15,11 +16,6 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ | |||
15 | file://0009-Change-order-of-CFLAGS.patch \ | 16 | file://0009-Change-order-of-CFLAGS.patch \ |
16 | file://0010-resolve-restrict-keyword-conflict.patch \ | 17 | file://0010-resolve-restrict-keyword-conflict.patch \ |
17 | file://0011-Fix-invalid-sigprocmask-call.patch \ | 18 | file://0011-Fix-invalid-sigprocmask-call.patch \ |
18 | file://gdbserver-ctrl-c-handling.patch \ | 19 | " |
19 | file://0001-Fix-build-with-latest-GCC-9.0-tree.patch \ | 20 | SRC_URI[md5sum] = "bbd95b2f9b34621ad7a19a3965476314" |
20 | file://CVE-2017-9778.patch \ | 21 | SRC_URI[sha256sum] = "802f7ee309dcc547d65a68d61ebd6526762d26c3051f52caebe2189ac1ffd72e" |
21 | file://0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch \ | ||
22 | " | ||
23 | SRC_URI[md5sum] = "f8b2562e830a4098dd5b5ea9e9296c70" | ||
24 | SRC_URI[sha256sum] = "0a6a432907a03c5c8eaad3c3cffd50c00a40c3a5e3c4039440624bae703f2202" | ||
25 | |||
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc index 475e4f08ef..c9daf25a41 100644 --- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc | |||
@@ -40,4 +40,3 @@ do_install_append() { | |||
40 | rm -rf ${D}${exec_prefix}/lib | 40 | rm -rf ${D}${exec_prefix}/lib |
41 | cross_canadian_bindirlinks | 41 | cross_canadian_bindirlinks |
42 | } | 42 | } |
43 | |||
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_8.2.1.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.bb index 301035940c..301035940c 100644 --- a/meta/recipes-devtools/gdb/gdb-cross-canadian_8.2.1.bb +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.bb | |||
diff --git a/meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb b/meta/recipes-devtools/gdb/gdb-cross_8.3.bb index 50cf159fdb..50cf159fdb 100644 --- a/meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb +++ b/meta/recipes-devtools/gdb/gdb-cross_8.3.bb | |||
diff --git a/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch b/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch deleted file mode 100644 index 2a962929d7..0000000000 --- a/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 7406a50077773e78282a495cb32ef5b8179f6a33 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dimitar Dimitrov <dimitar@dinux.eu> | ||
3 | Date: Mon, 17 Dec 2018 21:30:52 +0200 | ||
4 | Subject: [PATCH] Fix build with latest GCC 9.0 tree | ||
5 | |||
6 | A recent patch [1] to fix a GCC PR [2] actually broke the GDB build. | ||
7 | To fix, remove the stack pointer clobber. GCC will ignore the clobber | ||
8 | marker, and will not save or restore the stack pointer. | ||
9 | |||
10 | I ran "make check-gdb" on x86_64 to ensure there are no regressions. | ||
11 | |||
12 | gdb/ChangeLog: | ||
13 | |||
14 | 2018-12-17 Dimitar Dimitrov <dimitar@dinux.eu> | ||
15 | |||
16 | * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove sp clobbers. | ||
17 | |||
18 | [1] https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00532.html | ||
19 | [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813 | ||
20 | |||
21 | Upstream-Status: Backport | ||
22 | Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu> | ||
23 | --- | ||
24 | gdb/ChangeLog | 5 +++++ | ||
25 | gdb/nat/linux-ptrace.c | 4 ++-- | ||
26 | 2 files changed, 7 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c | ||
29 | index d4c1b8f9fd..187cfeb9bc 100644 | ||
30 | --- a/gdb/nat/linux-ptrace.c | ||
31 | +++ b/gdb/nat/linux-ptrace.c | ||
32 | @@ -161,14 +161,14 @@ linux_ptrace_test_ret_to_nx (void) | ||
33 | ".globl linux_ptrace_test_ret_to_nx_instr;" | ||
34 | "linux_ptrace_test_ret_to_nx_instr:" | ||
35 | "ret" | ||
36 | - : : "r" (return_address) : "%esp", "memory"); | ||
37 | + : : "r" (return_address) : "memory"); | ||
38 | #elif defined __x86_64__ | ||
39 | asm volatile ("pushq %0;" | ||
40 | ".globl linux_ptrace_test_ret_to_nx_instr;" | ||
41 | "linux_ptrace_test_ret_to_nx_instr:" | ||
42 | "ret" | ||
43 | : : "r" ((uint64_t) (uintptr_t) return_address) | ||
44 | - : "%rsp", "memory"); | ||
45 | + : "memory"); | ||
46 | #else | ||
47 | # error "!__i386__ && !__x86_64__" | ||
48 | #endif | ||
49 | -- | ||
50 | 2.20.1 | ||
diff --git a/meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch b/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch index 71fe7f83b6..71fe7f83b6 100644 --- a/meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch +++ b/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch | |||
diff --git a/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch index bbe0020bf3..170d512ef7 100644 --- a/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch +++ b/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | |||
@@ -1,24 +1,24 @@ | |||
1 | From 1dd5c44474b01d84de60faded960fef4a0a87e41 Mon Sep 17 00:00:00 2001 | 1 | From da30370c1e3ff7728a857e119e0529a9f097086e Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 30 Apr 2016 18:32:14 -0700 | 3 | Date: Sat, 30 Apr 2016 18:32:14 -0700 |
4 | Subject: [PATCH 04/11] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC | 4 | Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems |
5 | systems | ||
6 | 5 | ||
7 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
8 | 7 | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
9 | |||
10 | --- | 10 | --- |
11 | gdb/gdbserver/linux-ppc-low.c | 6 ++++++ | 11 | gdb/gdbserver/linux-ppc-low.c | 6 ++++++ |
12 | gdb/nat/ppc-linux.h | 6 ++++++ | 12 | gdb/nat/ppc-linux.h | 6 ++++++ |
13 | 2 files changed, 12 insertions(+) | 13 | 2 files changed, 12 insertions(+) |
14 | 14 | ||
15 | diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c | 15 | diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c |
16 | index 47428c1529..841a5e02b9 100644 | 16 | index 1b695e53..1978347c 100644 |
17 | --- a/gdb/gdbserver/linux-ppc-low.c | 17 | --- a/gdb/gdbserver/linux-ppc-low.c |
18 | +++ b/gdb/gdbserver/linux-ppc-low.c | 18 | +++ b/gdb/gdbserver/linux-ppc-low.c |
19 | @@ -21,7 +21,13 @@ | 19 | @@ -23,7 +23,13 @@ |
20 | #include "linux-low.h" | 20 | #include "elf/common.h" |
21 | 21 | #include <sys/uio.h> | |
22 | #include <elf.h> | 22 | #include <elf.h> |
23 | +#if !defined(__GLIBC__) | 23 | +#if !defined(__GLIBC__) |
24 | +# define pt_regs uapi_pt_regs | 24 | +# define pt_regs uapi_pt_regs |
@@ -31,12 +31,12 @@ index 47428c1529..841a5e02b9 100644 | |||
31 | #include "arch/ppc-linux-common.h" | 31 | #include "arch/ppc-linux-common.h" |
32 | #include "arch/ppc-linux-tdesc.h" | 32 | #include "arch/ppc-linux-tdesc.h" |
33 | diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h | 33 | diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h |
34 | index 3d4d4fdc56..5b93af8d3a 100644 | 34 | index f1561b3b..40399361 100644 |
35 | --- a/gdb/nat/ppc-linux.h | 35 | --- a/gdb/nat/ppc-linux.h |
36 | +++ b/gdb/nat/ppc-linux.h | 36 | +++ b/gdb/nat/ppc-linux.h |
37 | @@ -18,7 +18,13 @@ | 37 | @@ -18,7 +18,13 @@ |
38 | #ifndef PPC_LINUX_H | 38 | #ifndef NAT_PPC_LINUX_H |
39 | #define PPC_LINUX_H 1 | 39 | #define NAT_PPC_LINUX_H |
40 | 40 | ||
41 | +#if !defined(__GLIBC__) | 41 | +#if !defined(__GLIBC__) |
42 | +# define pt_regs uapi_pt_regs | 42 | +# define pt_regs uapi_pt_regs |
@@ -48,6 +48,3 @@ index 3d4d4fdc56..5b93af8d3a 100644 | |||
48 | #include <asm/cputable.h> | 48 | #include <asm/cputable.h> |
49 | 49 | ||
50 | /* This sometimes isn't defined. */ | 50 | /* This sometimes isn't defined. */ |
51 | -- | ||
52 | 2.18.0 | ||
53 | |||
diff --git a/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch b/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch index d32352b813..95bec5fd60 100644 --- a/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch +++ b/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From d97878b272bd7c4993f4205983ae8b7ecddbcf82 Mon Sep 17 00:00:00 2001 | 1 | From bab0b34672727c50313eb98b8522355cbe1bde36 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 30 Apr 2016 15:31:40 -0700 | 3 | Date: Sat, 30 Apr 2016 15:31:40 -0700 |
4 | Subject: [PATCH 08/11] Use exorted definitions of SIGRTMIN | 4 | Subject: [PATCH] Use exorted definitions of SIGRTMIN |
5 | 5 | ||
6 | Define W_STOPCODE if not defined already | 6 | Define W_STOPCODE if not defined already |
7 | 7 | ||
@@ -14,16 +14,17 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=13012 | |||
14 | Upstream-Status: Submitted | 14 | Upstream-Status: Submitted |
15 | 15 | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
17 | |||
17 | --- | 18 | --- |
18 | gdb/linux-nat.c | 4 ++-- | 19 | gdb/linux-nat.c | 4 ++-- |
19 | gdb/nat/linux-nat.h | 4 ++++ | 20 | gdb/nat/linux-nat.h | 4 ++++ |
20 | 2 files changed, 6 insertions(+), 2 deletions(-) | 21 | 2 files changed, 6 insertions(+), 2 deletions(-) |
21 | 22 | ||
22 | diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c | 23 | diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c |
23 | index 64015e7520..acf950c38b 100644 | 24 | index 063afe26..fb1d2d5d 100644 |
24 | --- a/gdb/linux-nat.c | 25 | --- a/gdb/linux-nat.c |
25 | +++ b/gdb/linux-nat.c | 26 | +++ b/gdb/linux-nat.c |
26 | @@ -4724,6 +4724,6 @@ lin_thread_get_thread_signals (sigset_t *set) | 27 | @@ -4713,6 +4713,6 @@ lin_thread_get_thread_signals (sigset_t *set) |
27 | /* NPTL reserves the first two RT signals, but does not provide any | 28 | /* NPTL reserves the first two RT signals, but does not provide any |
28 | way for the debugger to query the signal numbers - fortunately | 29 | way for the debugger to query the signal numbers - fortunately |
29 | they don't change. */ | 30 | they don't change. */ |
@@ -33,7 +34,7 @@ index 64015e7520..acf950c38b 100644 | |||
33 | + sigaddset (set, SIGRTMIN + 1); | 34 | + sigaddset (set, SIGRTMIN + 1); |
34 | } | 35 | } |
35 | diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h | 36 | diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h |
36 | index a90a124d3a..4f3e681962 100644 | 37 | index 1e32dd9e..b886305d 100644 |
37 | --- a/gdb/nat/linux-nat.h | 38 | --- a/gdb/nat/linux-nat.h |
38 | +++ b/gdb/nat/linux-nat.h | 39 | +++ b/gdb/nat/linux-nat.h |
39 | @@ -90,4 +90,8 @@ extern void linux_stop_lwp (struct lwp_info *lwp); | 40 | @@ -90,4 +90,8 @@ extern void linux_stop_lwp (struct lwp_info *lwp); |
@@ -44,7 +45,4 @@ index a90a124d3a..4f3e681962 100644 | |||
44 | +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) | 45 | +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) |
45 | +#endif | 46 | +#endif |
46 | + | 47 | + |
47 | #endif /* LINUX_NAT_H */ | 48 | #endif /* NAT_LINUX_NAT_H */ |
48 | -- | ||
49 | 2.18.0 | ||
50 | |||
diff --git a/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch b/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch deleted file mode 100644 index f35033c122..0000000000 --- a/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From cbbf1a8ba7f037ba3b83f090829edcbab542c285 Mon Sep 17 00:00:00 2001 | ||
2 | From: Szabolcs Nagy <szabolcs.nagy@arm.com> | ||
3 | Date: Thu, 13 Dec 2018 17:47:17 +0000 | ||
4 | Subject: [PATCH] AArch64: Fix the gdb build with musl libc | ||
5 | |||
6 | Including asm/sigcontext.h together with libc headers is not valid. In | ||
7 | general linux headers may not work with libc headers, so mixing them | ||
8 | should be avoided, especially when the linux header defines types that | ||
9 | are also exposed in libc headers. | ||
10 | |||
11 | In case of asm/sigcontext.h glibc happens to work because glibc signal.h | ||
12 | directly includes it, but e.g. in musl libc signal.h replicates the | ||
13 | sigcontext.h definitions in an abi compatible way which are in conflict | ||
14 | with the linux definitions when both headers are included. | ||
15 | |||
16 | Since old linux headers or old libc headers may not have the necessary | ||
17 | definitions, gdb has to replicate the definitions it relies on anyway. | ||
18 | Which is fine since all definitions must be ABI stable. For linux apis | ||
19 | that are not available via libc headers, replicating the definitions in | ||
20 | gdb is the most reliable way to use them. | ||
21 | |||
22 | Note: asm/ptrace.h includes asm/sigcontext.h in some versions of linux | ||
23 | headers, which is just as problematic and should be fixed in linux. | ||
24 | |||
25 | gdb/ChangeLog: | ||
26 | |||
27 | * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of | ||
28 | asm/sigcontext.h. | ||
29 | |||
30 | [ChangeLog entry stripped so that patch applies cleanly] | ||
31 | Upstream-Status: Backport | ||
32 | Signed-off-by: Paul Barker <paul@betafive.co.uk> | ||
33 | --- | ||
34 | gdb/nat/aarch64-sve-linux-ptrace.h | 2 +- | ||
35 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
36 | |||
37 | diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h | ||
38 | index 029e753ffe..172ae39432 100644 | ||
39 | --- a/gdb/nat/aarch64-sve-linux-ptrace.h | ||
40 | +++ b/gdb/nat/aarch64-sve-linux-ptrace.h | ||
41 | @@ -20,7 +20,7 @@ | ||
42 | #ifndef AARCH64_SVE_LINUX_PTRACE_H | ||
43 | #define AARCH64_SVE_LINUX_PTRACE_H | ||
44 | |||
45 | -#include <asm/sigcontext.h> | ||
46 | +#include <signal.h> | ||
47 | #include <sys/utsname.h> | ||
48 | #include <sys/ptrace.h> | ||
49 | #include <asm/ptrace.h> | ||
50 | -- | ||
51 | 2.17.1 | ||
52 | |||
diff --git a/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch b/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch deleted file mode 100644 index 935f2661fe..0000000000 --- a/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | From a608b79f30ab3f670095e14ba3d3b5b24a19fe68 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sandra Loosemore <sandra@codesourcery.com> | ||
3 | Date: Thu, 25 Apr 2019 07:27:02 -0700 | ||
4 | Subject: [PATCH] Detect invalid length field in debug frame FDE header. | ||
5 | |||
6 | GDB was failing to catch cases where a corrupt ELF or core file | ||
7 | contained an invalid length value in a Dwarf debug frame FDE header. | ||
8 | It was checking for buffer overflow but not cases where the length was | ||
9 | negative or caused pointer wrap-around. | ||
10 | |||
11 | In addition to the additional validity check, this patch cleans up the | ||
12 | multiple signed/unsigned conversions on the length field so that an | ||
13 | unsigned representation is used consistently throughout. | ||
14 | |||
15 | This patch fixes CVE-2017-9778 and PR gdb/21600. | ||
16 | |||
17 | 2019-04-25 Sandra Loosemore <sandra@codesourcery.com> | ||
18 | Kang Li <kanglictf@gmail.com> | ||
19 | |||
20 | PR gdb/21600 | ||
21 | |||
22 | * dwarf2-frame.c (read_initial_length): Be consistent about using | ||
23 | unsigned representation of length. | ||
24 | (decode_frame_entry_1): Likewise. Check for wraparound of | ||
25 | end pointer as well as buffer overflow. | ||
26 | |||
27 | Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=723adb650a31859d7cc45832cb8adca0206455ed] | ||
28 | CVE: CVE-2017-9778 | ||
29 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
30 | --- | ||
31 | gdb/ChangeLog | 11 +++++++++++ | ||
32 | gdb/dwarf2-frame.c | 14 +++++++------- | ||
33 | 2 files changed, 18 insertions(+), 7 deletions(-) | ||
34 | |||
35 | diff --git a/gdb/ChangeLog b/gdb/ChangeLog | ||
36 | index 3711dc7..0a9720b 100644 | ||
37 | --- a/gdb/ChangeLog | ||
38 | +++ b/gdb/ChangeLog | ||
39 | @@ -1,3 +1,14 @@ | ||
40 | +2019-04-25 Sandra Loosemore <sandra@codesourcery.com> | ||
41 | + Kang Li <kanglictf@gmail.com> | ||
42 | + | ||
43 | + PR gdb/21600 | ||
44 | + | ||
45 | + * dwarf2-frame.c (read_initial_length): Be consistent about using | ||
46 | + unsigned representation of length. | ||
47 | + (decode_frame_entry_1): Likewise. Check for wraparound of | ||
48 | + end pointer as well as buffer overflow. | ||
49 | + | ||
50 | + | ||
51 | 2018-12-23 Joel Brobecker <brobecker@adacore.com> | ||
52 | |||
53 | * version.in: Set GDB version number to 8.2.1. | ||
54 | diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c | ||
55 | index 91e16cf..a7b99fd 100644 | ||
56 | --- a/gdb/dwarf2-frame.c | ||
57 | +++ b/gdb/dwarf2-frame.c | ||
58 | @@ -1477,7 +1477,7 @@ static ULONGEST | ||
59 | read_initial_length (bfd *abfd, const gdb_byte *buf, | ||
60 | unsigned int *bytes_read_ptr) | ||
61 | { | ||
62 | - LONGEST result; | ||
63 | + ULONGEST result; | ||
64 | |||
65 | result = bfd_get_32 (abfd, buf); | ||
66 | if (result == 0xffffffff) | ||
67 | @@ -1780,7 +1780,7 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, | ||
68 | { | ||
69 | struct gdbarch *gdbarch = get_objfile_arch (unit->objfile); | ||
70 | const gdb_byte *buf, *end; | ||
71 | - LONGEST length; | ||
72 | + ULONGEST length; | ||
73 | unsigned int bytes_read; | ||
74 | int dwarf64_p; | ||
75 | ULONGEST cie_id; | ||
76 | @@ -1791,15 +1791,15 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, | ||
77 | buf = start; | ||
78 | length = read_initial_length (unit->abfd, buf, &bytes_read); | ||
79 | buf += bytes_read; | ||
80 | - end = buf + length; | ||
81 | - | ||
82 | - /* Are we still within the section? */ | ||
83 | - if (end > unit->dwarf_frame_buffer + unit->dwarf_frame_size) | ||
84 | - return NULL; | ||
85 | + end = buf + (size_t) length; | ||
86 | |||
87 | if (length == 0) | ||
88 | return end; | ||
89 | |||
90 | + /* Are we still within the section? */ | ||
91 | + if (end <= buf || end > unit->dwarf_frame_buffer + unit->dwarf_frame_size) | ||
92 | + return NULL; | ||
93 | + | ||
94 | /* Distinguish between 32 and 64-bit encoded frame info. */ | ||
95 | dwarf64_p = (bytes_read == 12); | ||
96 | |||
97 | -- | ||
98 | 2.7.4 | ||
99 | |||
diff --git a/meta/recipes-devtools/gdb/gdb_8.2.1.bb b/meta/recipes-devtools/gdb/gdb_8.3.bb index c6eac84dd8..c6eac84dd8 100644 --- a/meta/recipes-devtools/gdb/gdb_8.2.1.bb +++ b/meta/recipes-devtools/gdb/gdb_8.3.bb | |||