summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-devtools/breakpad/breakpad/0001-Do-not-add-stack-pointer-to-clobber-list.patch (renamed from meta-oe/recipes-devtools/breakpad/breakpad/dont-clobber-rsp.patch)57
-rw-r--r--meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch10
-rw-r--r--meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch25
-rw-r--r--meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch59
-rw-r--r--meta-oe/recipes-devtools/breakpad/breakpad_git.bb12
5 files changed, 50 insertions, 113 deletions
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/dont-clobber-rsp.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Do-not-add-stack-pointer-to-clobber-list.patch
index edf903552d..6e58490980 100644
--- a/meta-oe/recipes-devtools/breakpad/breakpad/dont-clobber-rsp.patch
+++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Do-not-add-stack-pointer-to-clobber-list.patch
@@ -1,26 +1,26 @@
1From d1d7b616219fd47736c804ff4c2f393d7184a75b Mon Sep 17 00:00:00 2001 1From 5c63eb5d56abd4e5232add4727247965a863d851 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 23 Dec 2018 16:58:04 -0800 3Date: Sun, 15 Dec 2019 14:02:45 -0800
4Subject: [PATCH] chromium: stack pointer clobber 4Subject: [PATCH] Do not add stack pointer to clobber list
5 5
6Do not add stack pointer to clobber list 6It was being ignored until now when gcc 9.0 became capable
7of flagging these silent ignore via [1].
7 8
8it was being ignored until gcc 9.0 became capable 9We weren't actually clobbering the stack pointers here
9of flagging this silent ignoring via [1] 10so it should not cause change in behavior.
10 11
11[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813<Paste> 12[1] https://gcc.gnu.org/PR52813
12 13
13Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/linux-syscall-support/+/1390160]
14Signed-off-by: Khem Raj <raj.khem@gmail.com> 14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15--- 15---
16 src/third_party/lss/linux_syscall_support.h | 10 +++++----- 16 linux_syscall_support.h | 8 ++++----
17 1 file changed, 5 insertions(+), 5 deletions(-) 17 1 file changed, 4 insertions(+), 4 deletions(-)
18 18
19Index: b/src/third_party/lss/linux_syscall_support.h 19diff --git a/linux_syscall_support.h b/linux_syscall_support.h
20=================================================================== 20index 9276f56..6e73309 100644
21--- a/src/third_party/lss/linux_syscall_support.h 21--- a/linux_syscall_support.h
22+++ b/src/third_party/lss/linux_syscall_support.h 22+++ b/linux_syscall_support.h
23@@ -1957,7 +1957,7 @@ struct kernel_statfs { 23@@ -1955,7 +1955,7 @@ struct kernel_statfs {
24 LSS_ENTRYPOINT \ 24 LSS_ENTRYPOINT \
25 "pop %%ebx" \ 25 "pop %%ebx" \
26 args \ 26 args \
@@ -29,16 +29,7 @@ Index: b/src/third_party/lss/linux_syscall_support.h
29 LSS_RETURN(type,__res) 29 LSS_RETURN(type,__res)
30 #undef _syscall0 30 #undef _syscall0
31 #define _syscall0(type,name) \ 31 #define _syscall0(type,name) \
32@@ -1966,7 +1966,7 @@ struct kernel_statfs { 32@@ -2012,7 +2012,7 @@ struct kernel_statfs {
33 __asm__ volatile(LSS_ENTRYPOINT \
34 : "=a" (__res) \
35 : "0" (__NR_##name) \
36- : "esp", "memory"); \
37+ : "memory"); \
38 LSS_RETURN(type,__res); \
39 }
40 #undef _syscall1
41@@ -2014,7 +2014,7 @@ struct kernel_statfs {
42 : "i" (__NR_##name), "ri" ((long)(arg1)), \ 33 : "i" (__NR_##name), "ri" ((long)(arg1)), \
43 "c" ((long)(arg2)), "d" ((long)(arg3)), \ 34 "c" ((long)(arg2)), "d" ((long)(arg3)), \
44 "S" ((long)(arg4)), "D" ((long)(arg5)) \ 35 "S" ((long)(arg4)), "D" ((long)(arg5)) \
@@ -47,7 +38,7 @@ Index: b/src/third_party/lss/linux_syscall_support.h
47 LSS_RETURN(type,__res); \ 38 LSS_RETURN(type,__res); \
48 } 39 }
49 #undef _syscall6 40 #undef _syscall6
50@@ -2036,7 +2036,7 @@ struct kernel_statfs { 41@@ -2034,7 +2034,7 @@ struct kernel_statfs {
51 : "i" (__NR_##name), "0" ((long)(&__s)), \ 42 : "i" (__NR_##name), "0" ((long)(&__s)), \
52 "c" ((long)(arg2)), "d" ((long)(arg3)), \ 43 "c" ((long)(arg2)), "d" ((long)(arg3)), \
53 "S" ((long)(arg4)), "D" ((long)(arg5)) \ 44 "S" ((long)(arg4)), "D" ((long)(arg5)) \
@@ -56,7 +47,7 @@ Index: b/src/third_party/lss/linux_syscall_support.h
56 LSS_RETURN(type,__res); \ 47 LSS_RETURN(type,__res); \
57 } 48 }
58 LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, 49 LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack,
59@@ -2122,7 +2122,7 @@ struct kernel_statfs { 50@@ -2120,7 +2120,7 @@ struct kernel_statfs {
60 : "0"(-EINVAL), "i"(__NR_clone), 51 : "0"(-EINVAL), "i"(__NR_clone),
61 "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), 52 "m"(fn), "m"(child_stack), "m"(flags), "m"(arg),
62 "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) 53 "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr)
@@ -65,12 +56,6 @@ Index: b/src/third_party/lss/linux_syscall_support.h
65 LSS_RETURN(int, __res); 56 LSS_RETURN(int, __res);
66 } 57 }
67 58
68@@ -2407,7 +2407,7 @@ struct kernel_statfs { 59--
69 "d"(LSS_SYSCALL_ARG(parent_tidptr)), 602.24.1
70 "r"(LSS_SYSCALL_ARG(newtls)), 61
71 "r"(LSS_SYSCALL_ARG(child_tidptr))
72- : "rsp", "memory", "r8", "r10", "r11", "rcx");
73+ : "memory", "r8", "r10", "r11", "rcx");
74 }
75 LSS_RETURN(int, __res);
76 }
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch
index bc79727edd..466abe5f87 100644
--- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch
+++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch
@@ -8,11 +8,9 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
8 src/client/linux/handler/exception_handler.cc | 17 +++++++++++++++++ 8 src/client/linux/handler/exception_handler.cc | 17 +++++++++++++++++
9 1 file changed, 17 insertions(+) 9 1 file changed, 17 insertions(+)
10 10
11Index: git/src/client/linux/handler/exception_handler.cc 11--- a/src/client/linux/handler/exception_handler.cc
12=================================================================== 12+++ b/src/client/linux/handler/exception_handler.cc
13--- git.orig/src/client/linux/handler/exception_handler.cc 13@@ -490,7 +490,19 @@ bool ExceptionHandler::SimulateSignalDel
14+++ git/src/client/linux/handler/exception_handler.cc
15@@ -495,7 +495,19 @@ bool ExceptionHandler::SimulateSignalDel
16 siginfo.si_code = SI_USER; 14 siginfo.si_code = SI_USER;
17 siginfo.si_pid = getpid(); 15 siginfo.si_pid = getpid();
18 ucontext_t context; 16 ucontext_t context;
@@ -32,7 +30,7 @@ Index: git/src/client/linux/handler/exception_handler.cc
32 return HandleSignal(sig, &siginfo, &context); 30 return HandleSignal(sig, &siginfo, &context);
33 } 31 }
34 32
35@@ -680,9 +692,14 @@ bool ExceptionHandler::WriteMinidump() { 33@@ -675,9 +687,14 @@ bool ExceptionHandler::WriteMinidump() {
36 sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); 34 sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
37 35
38 CrashContext context; 36 CrashContext context;
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch
index 2b892ad64f..bdd787afd5 100644
--- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch
+++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch
@@ -8,11 +8,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
8 linux_syscall_support.h | 3 +++ 8 linux_syscall_support.h | 3 +++
9 1 file changed, 3 insertions(+) 9 1 file changed, 3 insertions(+)
10 10
11Index: lss/linux_syscall_support.h 11--- a/linux_syscall_support.h
12=================================================================== 12+++ b/linux_syscall_support.h
13--- lss.orig/linux_syscall_support.h 13@@ -816,6 +816,9 @@ struct kernel_statfs {
14+++ lss/linux_syscall_support.h
15@@ -793,6 +793,9 @@ struct kernel_statfs {
16 #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) 14 #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
17 #endif 15 #endif
18 16
@@ -22,7 +20,7 @@ Index: lss/linux_syscall_support.h
22 20
23 #if defined(__x86_64__) 21 #if defined(__x86_64__)
24 #ifndef ARCH_SET_GS 22 #ifndef ARCH_SET_GS
25@@ -924,6 +927,7 @@ struct kernel_statfs { 23@@ -947,6 +950,7 @@ struct kernel_statfs {
26 #ifndef __NR_fallocate 24 #ifndef __NR_fallocate
27 #define __NR_fallocate 324 25 #define __NR_fallocate 324
28 #endif 26 #endif
@@ -30,7 +28,7 @@ Index: lss/linux_syscall_support.h
30 /* End of i386 definitions */ 28 /* End of i386 definitions */
31 #elif defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) 29 #elif defined(__ARM_ARCH_3__) || defined(__ARM_EABI__)
32 #ifndef __NR_setresuid 30 #ifndef __NR_setresuid
33@@ -1211,6 +1215,12 @@ struct kernel_statfs { 31@@ -1239,6 +1243,12 @@ struct kernel_statfs {
34 #ifndef __NR_fallocate 32 #ifndef __NR_fallocate
35 #define __NR_fallocate 285 33 #define __NR_fallocate 285
36 #endif 34 #endif
@@ -43,3 +41,16 @@ Index: lss/linux_syscall_support.h
43 /* End of x86-64 definitions */ 41 /* End of x86-64 definitions */
44 #elif defined(__mips__) 42 #elif defined(__mips__)
45 #if _MIPS_SIM == _MIPS_SIM_ABI32 43 #if _MIPS_SIM == _MIPS_SIM_ABI32
44@@ -1418,6 +1428,12 @@ struct kernel_statfs {
45 #ifndef __NR_ioprio_get
46 #define __NR_ioprio_get (__NR_Linux + 274)
47 #endif
48+
49+#undef __NR_pread
50+#define __NR_pread __NR_pread64
51+#undef __NR_pwrite
52+#define __NR_pwrite __NR_pwrite64
53+
54 /* End of MIPS (64bit API) definitions */
55 #else
56 #ifndef __NR_setresuid
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch b/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch
index 42e073b94d..51393967bc 100644
--- a/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch
+++ b/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch
@@ -3,48 +3,6 @@ map the mcontext_t structure for musl
3Upstream-Status: Inappropriate[need to consider Android] 3Upstream-Status: Inappropriate[need to consider Android]
4 4
5Signed-off-by: Khem Raj <raj.khem@gmail.com> 5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6Index: git/src/client/linux/dump_writer_common/thread_info.cc
7===================================================================
8--- git.orig/src/client/linux/dump_writer_common/thread_info.cc
9+++ git/src/client/linux/dump_writer_common/thread_info.cc
10@@ -229,7 +229,6 @@ void ThreadInfo::FillCPUContext(RawConte
11 }
12
13 #elif defined(__mips__)
14-
15 uintptr_t ThreadInfo::GetInstructionPointer() const {
16 return mcontext.pc;
17 }
18@@ -263,8 +262,11 @@ void ThreadInfo::FillCPUContext(RawConte
19 out->cause = 0; // Not stored in mcontext
20
21 for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i)
22+#ifdef __GLIBC__
23 out->float_save.regs[i] = mcontext.fpregs.fp_r.fp_fregs[i]._fp_fregs;
24-
25+#else
26+ out->float_save.regs[i] = mcontext.fpregs[i];
27+#endif
28 out->float_save.fpcsr = mcontext.fpc_csr;
29 #if _MIPS_SIM == _ABIO32
30 out->float_save.fir = mcontext.fpc_eir;
31Index: git/src/client/linux/dump_writer_common/ucontext_reader.cc
32===================================================================
33--- git.orig/src/client/linux/dump_writer_common/ucontext_reader.cc
34+++ git/src/client/linux/dump_writer_common/ucontext_reader.cc
35@@ -247,8 +247,11 @@ void UContextReader::FillCPUContext(RawC
36 out->cause = 0; // Not reported in signal context.
37
38 for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i)
39+#ifdef __GLIBC__
40 out->float_save.regs[i] = uc->uc_mcontext.fpregs.fp_r.fp_dregs[i];
41-
42+#else
43+ out->float_save.regs[i] = uc->uc_mcontext.fpregs[i];
44+#endif
45 out->float_save.fpcsr = uc->uc_mcontext.fpc_csr;
46 #if _MIPS_SIM == _ABIO32
47 out->float_save.fir = uc->uc_mcontext.fpc_eir; // Unused.
48Index: git/src/client/linux/minidump_writer/linux_core_dumper.cc 6Index: git/src/client/linux/minidump_writer/linux_core_dumper.cc
49=================================================================== 7===================================================================
50--- git.orig/src/client/linux/minidump_writer/linux_core_dumper.cc 8--- git.orig/src/client/linux/minidump_writer/linux_core_dumper.cc
@@ -58,20 +16,3 @@ Index: git/src/client/linux/minidump_writer/linux_core_dumper.cc
58 for (int i = EF_R0; i <= EF_R31; i++) 16 for (int i = EF_R0; i <= EF_R31; i++)
59 info.mcontext.gregs[i - EF_R0] = status->pr_reg[i]; 17 info.mcontext.gregs[i - EF_R0] = status->pr_reg[i];
60 #else // __ANDROID__ 18 #else // __ANDROID__
61Index: git/src/tools/linux/md2core/minidump-2-core.cc
62===================================================================
63--- git.orig/src/tools/linux/md2core/minidump-2-core.cc
64+++ git/src/tools/linux/md2core/minidump-2-core.cc
65@@ -516,8 +516,12 @@ ParseThreadRegisters(CrashedProcess::Thr
66 thread->mcontext.lo3 = rawregs->lo[2];
67
68 for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i) {
69+#ifdef __GLIBC__
70 thread->mcontext.fpregs.fp_r.fp_fregs[i]._fp_fregs =
71 rawregs->float_save.regs[i];
72+#else
73+ thread->mcontext.fpregs[i] = rawregs->float_save.regs[i];
74+#endif
75 }
76
77 thread->mcontext.fpc_csr = rawregs->float_save.fpcsr;
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb b/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
index 06f3ee87da..ff5acbeac2 100644
--- a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
+++ b/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
@@ -19,11 +19,11 @@ PV = "1.0"
19 19
20SRCREV_FORMAT = "breakpad_gtest_protobuf_lss_gyp" 20SRCREV_FORMAT = "breakpad_gtest_protobuf_lss_gyp"
21 21
22SRCREV_breakpad = "5467393a3d1e7ab929fd01d79971701bf4e2c2c6" 22SRCREV_breakpad = "0c0e24f709288a129d665ec27d6f089189318385"
23#v1.8.0 23#v1.10.0
24SRCREV_gtest = "ec44c6c1675c25b9827aacd08c02433cccde7780" 24SRCREV_gtest = "5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081"
25SRCREV_protobuf = "cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac" 25SRCREV_protobuf = "cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac"
26SRCREV_lss = "a89bf7903f3169e6bc7b8efc10a73a7571de21cf" 26SRCREV_lss = "8048ece6c16c91acfe0d36d1d3cc0890ab6e945c"
27SRCREV_gyp = "324dd166b7c0b39d513026fa52d6280ac6d56770" 27SRCREV_gyp = "324dd166b7c0b39d513026fa52d6280ac6d56770"
28 28
29SRC_URI = "git://github.com/google/breakpad;name=breakpad \ 29SRC_URI = "git://github.com/google/breakpad;name=breakpad \
@@ -42,7 +42,7 @@ SRC_URI = "git://github.com/google/breakpad;name=breakpad \
42 file://0001-disable-calls-to-getcontext-with-musl.patch \ 42 file://0001-disable-calls-to-getcontext-with-musl.patch \
43 file://0001-lss-Match-syscalls-to-match-musl.patch;patchdir=src/third_party/lss \ 43 file://0001-lss-Match-syscalls-to-match-musl.patch;patchdir=src/third_party/lss \
44 file://mips_asm_sgidefs.patch;patchdir=src/third_party/lss \ 44 file://mips_asm_sgidefs.patch;patchdir=src/third_party/lss \
45 file://dont-clobber-rsp.patch;patchdir=src/third_party/lss;striplevel=4 \ 45 file://0001-Do-not-add-stack-pointer-to-clobber-list.patch;patchdir=src/third_party/lss \
46" 46"
47S = "${WORKDIR}/git" 47S = "${WORKDIR}/git"
48 48
@@ -121,3 +121,5 @@ breakpad_populate_sysroot() {
121#| make: *** [src/client/linux/handler/exception_handler.o] Error 1 121#| make: *** [src/client/linux/handler/exception_handler.o] Error 1
122ARM_INSTRUCTION_SET_armv5 = "arm" 122ARM_INSTRUCTION_SET_armv5 = "arm"
123ARM_INSTRUCTION_SET_armv4 = "arm" 123ARM_INSTRUCTION_SET_armv4 = "arm"
124
125TOOLCHAIN = "gcc"