diff options
Diffstat (limited to 'meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external')
3 files changed, 69 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/20150704-CVE-2015-3239_dwarf_i.h.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/20150704-CVE-2015-3239_dwarf_i.h.patch new file mode 100644 index 0000000000..e8e216161e --- /dev/null +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/20150704-CVE-2015-3239_dwarf_i.h.patch @@ -0,0 +1,15 @@ +Upstream-Status: Pending + +Description: Off-by-one error in the dwarf_to_unw_regnum function in include/dwarf_i.h in +libunwind 1.1 allows local users to have unspecified impact via invalid dwarf opcodes. +--- a/external/libunwind/include/dwarf_i.h ++++ b/external/libunwind/include/dwarf_i.h +@@ -20,7 +20,7 @@ + extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH]; + /* REG is evaluated multiple times; it better be side-effects free! */ + # define dwarf_to_unw_regnum(reg) \ +- (((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0) ++ (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0) + #endif + + #ifdef UNW_LOCAL_ONLY diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/legacy_built-in_sync_functions.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/legacy_built-in_sync_functions.patch new file mode 100644 index 0000000000..a04a887c68 --- /dev/null +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/legacy_built-in_sync_functions.patch @@ -0,0 +1,28 @@ +Upstream-Status: Pending + +Description: Replace the legacy __sync built-in functions with __atomic ones + libunwind uses the built-in __sync_* functions which are deprecated by GCC and + should be replaced by __atomic_* ones. See the official manuals [1]. + . + The legacy __sync functions do not require to specify the memory order but + __atomic ones do, so we choose the strongest one: __ATOMIC_SEQ_CST. + . + We do this because __sync_fetch_and_add() is not supported on armel. + . + [1]: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html +Author: Kai-Chung Yan () +Last-Update: 2016-10-04 +Forwarded: not-needed +--- a/external/libunwind/include/libunwind_i.h ++++ b/external/libunwind/include/libunwind_i.h +@@ -155,8 +155,8 @@ cmpxchg_ptr (void *addr, void *old, void + u.vp = addr; + return __sync_bool_compare_and_swap(u.vlp, (long) old, (long) new); + } +-# define fetch_and_add1(_ptr) __sync_fetch_and_add(_ptr, 1) +-# define fetch_and_add(_ptr, value) __sync_fetch_and_add(_ptr, value) ++# define fetch_and_add1(_ptr) __atomic_fetch_add(_ptr, 1, __ATOMIC_SEQ_CST) ++# define fetch_and_add(_ptr, value) __atomic_fetch_add(_ptr, value, __ATOMIC_SEQ_CST) + # define HAVE_CMPXCHG + # define HAVE_FETCH_AND_ADD + #endif diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/user_pt_regs.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/user_pt_regs.patch new file mode 100644 index 0000000000..35df944d1c --- /dev/null +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/external/libunwind/user_pt_regs.patch @@ -0,0 +1,26 @@ +Upstream-Status: Pending + +Author: Kai-Chung Yan <seamlikok@gmail.com> +Last-Update: 2016-08-24 +Description: Manual definition of struct user_pt_regs + On ARM64, libunwind uses struct user_pt_regs which is not defined in + anywhere, which causes FTBFS. +Forwarded: not-needed +--- a/external/libunwind/src/ptrace/_UPT_access_reg.c ++++ b/external/libunwind/src/ptrace/_UPT_access_reg.c +@@ -26,6 +26,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE + + #include "_UPT_internal.h" + ++#if defined(__aarch64__) ++ struct user_pt_regs { ++ __u64 regs[31]; ++ __u64 sp; ++ __u64 pc; ++ __u64 pstate; ++ }; ++#endif ++ + #if UNW_TARGET_IA64 + # include <elf.h> + # ifdef HAVE_ASM_PTRACE_OFFSETS_H |