diff -Nru systemtap-2.9/debian/changelog systemtap-2.9/debian/changelog --- systemtap-2.9/debian/changelog 2016-01-07 13:48:50.000000000 +0000 +++ systemtap-2.9/debian/changelog 2016-03-16 18:48:07.000000000 +0000 @@ -1,3 +1,10 @@ +systemtap (2.9-2ubuntu1.1) xenial; urgency=medium + + * debian/patches/0001-Fix-PR9497-by-updating-the-runtime-to-handle-linux-4.patch, + Fix stap compilation after kernel 4.4 commit 7523e4dc50. LP: #1557673. + + -- Dan Streetman Wed, 16 Mar 2016 18:46:37 +0000 + systemtap (2.9-2ubuntu1) xenial; urgency=medium * Merge with Debian; remaining changes: diff -Nru systemtap-2.9/debian/patches/0001-Fix-PR9497-by-updating-the-runtime-to-handle-linux-4.patch systemtap-2.9/debian/patches/0001-Fix-PR9497-by-updating-the-runtime-to-handle-linux-4.patch --- systemtap-2.9/debian/patches/0001-Fix-PR9497-by-updating-the-runtime-to-handle-linux-4.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-2.9/debian/patches/0001-Fix-PR9497-by-updating-the-runtime-to-handle-linux-4.patch 2016-03-16 18:46:33.000000000 +0000 @@ -0,0 +1,102 @@ +From 3f040971e7efb4d323fcb63d83b4337f355c60db Mon Sep 17 00:00:00 2001 +From: David Smith +Date: Wed, 20 Jan 2016 15:13:44 -0600 +Subject: [PATCH] Fix PR9497 by updating the runtime to handle linux 4.4 commit + 7523e4dc50. + +* runtime/linux/autoconf-module_layout.c: New autoconf test. +* buildrun.cxx (compile_pass): Add 'module_layout' autoconf test for new + module_layout structure. +* runtime/linux/alloc.c: Handle module struct changes in rawhide. +* runtime/linux/print.c (_stp_print_kernel_info): Ditto. +* runtime/transport/symbols.c (_stp_module_update_self): Ditto. +* tapset/linux/context.stp (module_size): Ditto. +(ddstreet backport: removed tapset/linux/context.stp changes) +--- + buildrun.cxx | 3 +++ + runtime/linux/alloc.c | 4 +++- + runtime/linux/autoconf-module_layout.c | 3 +++ + runtime/linux/print.c | 6 ++++++ + runtime/transport/symbols.c | 4 +++- + tapset/linux/context.stp | 5 +++++ + 6 files changed, 23 insertions(+), 2 deletions(-) + create mode 100644 runtime/linux/autoconf-module_layout.c + +diff --git a/buildrun.cxx b/buildrun.cxx +index a25dea5..2cee54b 100644 +--- a/buildrun.cxx ++++ b/buildrun.cxx +@@ -427,6 +427,9 @@ compile_pass (systemtap_session& s) + output_autoconf(s, o, "autoconf-tracepoint-strings.c", "STAPCONF_TRACEPOINT_STRINGS", NULL); + output_autoconf(s, o, "autoconf-timerfd.c", "STAPCONF_TIMERFD_H", NULL); + ++ output_autoconf(s, o, "autoconf-module_layout.c", ++ "STAPCONF_MODULE_LAYOUT", NULL); ++ + o << module_cflags << " += -include $(STAPCONF_HEADER)" << endl; + + for (unsigned i=0; icore_layout.size) ++#elif defined(STAPCONF_GRSECURITY) + #define _STP_MODULE_CORE_SIZE (THIS_MODULE->core_size) + #else + #define _STP_MODULE_CORE_SIZE (THIS_MODULE->core_size_rw) +diff --git a/runtime/linux/autoconf-module_layout.c b/runtime/linux/autoconf-module_layout.c +new file mode 100644 +index 0000000..e94ac24 +--- /dev/null ++++ b/runtime/linux/autoconf-module_layout.c +@@ -0,0 +1,3 @@ ++#include ++ ++struct module_layout ml; +diff --git a/runtime/linux/print.c b/runtime/linux/print.c +index 91381a0..9d5c537 100644 +--- a/runtime/linux/print.c ++++ b/runtime/linux/print.c +@@ -238,6 +238,11 @@ static void _stp_print_kernel_info(char *vstr, int ctx, int num_probes) + "\n", + THIS_MODULE->name, + vstr, ++#ifdef STAPCONF_MODULE_LAYOUT ++ THIS_MODULE->core_layout.base, ++ (unsigned long) (THIS_MODULE->core_layout.size - THIS_MODULE->core_layout.text_size)/1024, ++ (unsigned long) (THIS_MODULE->core_layout.text_size)/1024, ++#else + #ifndef STAPCONF_GRSECURITY + THIS_MODULE->module_core, + (unsigned long) (THIS_MODULE->core_size - THIS_MODULE->core_text_size)/1024, +@@ -247,6 +252,7 @@ static void _stp_print_kernel_info(char *vstr, int ctx, int num_probes) + (unsigned long) (THIS_MODULE->core_size_rw - THIS_MODULE->core_size_rx)/1024, + (unsigned long) (THIS_MODULE->core_size_rx)/1024, + #endif ++#endif + ctx/1024, + _stp_allocated_net_memory/1024, + (_stp_allocated_memory - _stp_allocated_net_memory - ctx)/1024, +diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c +index fb5da2d..41782f2 100644 +--- a/runtime/transport/symbols.c ++++ b/runtime/transport/symbols.c +@@ -246,7 +246,9 @@ static int _stp_module_update_self (void) + } + else if (!strcmp(".text", attr->name)) { + _stp_module_self.sections[1].static_addr = attr->address; +-#ifdef STAPCONF_GRSECURITY ++#ifdef STAPCONF_MODULE_LAYOUT ++ _stp_module_self.sections[1].size = mod->core_layout.text_size; ++#elif defined(STAPCONF_GRSECURITY) + _stp_module_self.sections[1].size = mod->core_size_rx; + #else + _stp_module_self.sections[1].size = mod->core_text_size; + diff -Nru systemtap-2.9/debian/patches/series systemtap-2.9/debian/patches/series --- systemtap-2.9/debian/patches/series 2015-12-11 20:15:29.000000000 +0000 +++ systemtap-2.9/debian/patches/series 2016-03-16 18:46:33.000000000 +0000 @@ -3,3 +3,4 @@ dtrace-no-std-include-path.diff fix-emacs24.diff 0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch +0001-Fix-PR9497-by-updating-the-runtime-to-handle-linux-4.patch