Merge branch 'f25' into f24

* f25:
  kernel 4.11 support
  rhbz1439914
  rebuild for dyninst 9.3.1
  Rebuild for dyninst 9.3
  release 3.1
  Automated weekly systemtap rawhide release: 0.20170206git7dadf6d
  Automated weekly systemtap rawhide release: 0.20170130git575fe91
  Automated weekly systemtap rawhide release: 0.20170130git675838c
This commit is contained in:
Frank Ch. Eigler 2017-07-10 09:34:28 -04:00
commit b3f4bb85f1
12 changed files with 611 additions and 225 deletions

225
.gitignore vendored
View File

@ -1,224 +1 @@
systemtap-1.3.tar.gz
/systemtap-1.4.tar.gz
/systemtap-1.5.tar.gz
/systemtap-1.6.tar.gz
/systemtap-1.7.tar.gz
/systemtap-1.8.tar.gz
/systemtap-2.0pre-git10c737f.tar.gz
/systemtap-2.0pre-gitec12f84.tar.gz
/systemtap-2.0.tar.gz
/systemtap-2.1pre-git3df148c.tar.gz
/systemtap-2.1-0.48.g345f009.tar.gz
/systemtap-2.1-0.56.gf77181e.tar.gz
/systemtap-2.1-0.75.g02bff02.tar.gz
/systemtap-2.1-0.87.gf4b122a.tar.gz
/systemtap-2.1-0.97.g6a1a8f4.tar.gz
/systemtap-2.1-0.100.g0f3edcb.tar.gz
/systemtap-2.1-0.108.g6b378b7.tar.gz
/systemtap-2.1-0.119.g700d493.tar.gz
/systemtap-2.1-0.140.g05e94cf.tar.gz
/systemtap-2.1-0.141.g541343c.tar.gz
/systemtap-2.1-0.160.g63438a7.tar.gz
/systemtap-2.1-0.184.g6c9f0b7.tar.gz
/systemtap-2.1-0.185.g283159e.tar.gz
/systemtap-2.1-0.198.g4c5d990.tar.gz
/systemtap-2.1-0.204.gc43c0f8.tar.gz
/systemtap-2.1-0.244.g2c7281e.tar.gz
/systemtap-2.1-0.280.gbddba05.tar.gz
/systemtap-2.1-0.353.g43e1259.tar.gz
/systemtap-2.1-0.354.g75c7136.tar.gz
/systemtap-2.1-0.385.gab733d5.tar.gz
/systemtap-2.1.tar.gz
/systemtap-2.2-0.38.g65fef87.tar.gz
/systemtap-2.2-0.53.g019e44d.tar.gz
/systemtap-2.2-0.54.g2cc83f4.tar.gz
/systemtap-2.2-0.68.g8d23893.tar.gz
/systemtap-2.2-0.70.g23c2c25.tar.gz
/systemtap-2.2-0.74.gb1e0e10.tar.gz
/systemtap-2.2-0.84.g74fc0fe.tar.gz
/systemtap-2.2-0.94.g48bf64d.tar.gz
/systemtap-2.2-0.103.g5c607f5.tar.gz
/systemtap-2.2-0.104.gd142b86.tar.gz
/systemtap-2.2-0.104.gd142b86.1.tar.gz
/systemtap-2.2-0.112.g3d0dc3b.tar.gz
/systemtap-2.2-0.119.g1e447aa.tar.gz
/systemtap-2.2-0.125.ga88f5ee.tar.gz
/systemtap-2.2-0.127.g8ca891c.tar.gz
/systemtap-2.2-0.125.ga88f5ee.tar.gz
/systemtap-2.2.tar.gz
/systemtap-2.2.1.tar.gz
/systemtap-2.3-0.44.g2c10863.tar.gz
/systemtap-2.3-0.45.ge2a412f.tar.gz
/systemtap-2.3-0.48.g0d8d5d7.tar.gz
/systemtap-2.3-0.51.ge15a40c.tar.gz
/systemtap-2.3-0.89.g8571631.tar.gz
/systemtap-2.3-0.118.ge1c85da.tar.gz
/systemtap-2.3-0.152.g60c493c.tar.gz
/systemtap-2.3-0.170.g091f73b.tar.gz
/systemtap-2.3-0.204.g2759d5b.tar.gz
/systemtap-2.3-0.212.gaeb08b1.tar.gz
/systemtap-2.3-0.234.g54cbada.tar.gz
/systemtap-2.3-0.244.gca49ae2.tar.gz
/systemtap-2.3.tar.gz
/systemtap-2.4-0.9.geada930.tar.gz
/systemtap-2.4-0.19.g03207fd.tar.gz
/systemtap-2.4-0.25.g3f873e5.tar.gz
/systemtap-2.4-0.47.g2e9858c.tar.gz
/systemtap-2.4-0.81.g2b5bbe5.tar.gz
/systemtap-2.4-0.93.g892a56b.tar.gz
/systemtap-2.4-0.109.g217de68.tar.gz
/systemtap-2.4-0.127.g98df4da.tar.gz
/systemtap-2.4-0.131.g1acfc03.tar.gz
/systemtap-2.4-0.137.gbbb71aa.tar.gz
/systemtap-2.4-0.173.g2576d05.tar.gz
/systemtap-2.4-0.186.gc1cb76c.tar.gz
/systemtap-2.4-0.233.g5c0aabb.tar.gz
/systemtap-2.4.tar.gz
/systemtap-2.5-0.36.g1bbf3f9.tar.gz
/systemtap-2.5-0.47.gb72512c.tar.gz
/systemtap-2.5-0.70.g2200b70.tar.gz
/systemtap-2.5-0.78.ga7dd945a54f2.tar.gz
/systemtap-2.5-0.87.g540c750cf41f.tar.gz
/systemtap-2.5-0.123.gc60517ca2f99.tar.gz
/systemtap-2.5-0.151.g6ded984aa63f.tar.gz
/systemtap-2.5-0.185.g4a3f6fd34498.tar.gz
/systemtap-2.5-0.186.gf1753911ada8.tar.gz
/systemtap-2.5-0.191.g651a87924c22.tar.gz
/systemtap-2.5-0.239.g873c6f49b639.tar.gz
/systemtap-2.5-0.274.gde6aa5194bf4.tar.gz
/systemtap-2.5-0.294.g09c16468eb17.tar.gz
/systemtap-2.5-0.296.g4f53b72c1d47.tar.gz
/systemtap-2.5-0.318.g9ee1bfe9ac1c.tar.gz
/systemtap-2.5-0.349.g2dd920e34796.tar.gz
/systemtap-2.5-0.376.g450056a8faa6.tar.gz
/systemtap-2.5-0.415.g7caa63eb91fd.tar.gz
/systemtap-2.5-0.446.ga404e997732d.tar.gz
/systemtap-2.5-0.458.g15afd83e99da.tar.gz
/systemtap-2.5-0.491.gd0e1cd9d2fcb.tar.gz
/systemtap-2.5-0.535.g9d4241d37eb1.tar.gz
/systemtap-2.5.tar.gz
/systemtap-2.6-0.11.gbe329745a929.tar.gz
/systemtap-2.6-0.50.g684fe5014906.tar.gz
/systemtap-2.6-0.52.ge0da6e752b05.tar.gz
/systemtap-2.6-0.54.gb87b0305be62.tar.gz
/systemtap-2.6-0.62.gb50e1cd22c61.tar.gz
/systemtap-2.6-0.69.g27ce133c59da.tar.gz
/systemtap-2.6-0.112.g480ec383d00e.tar.gz
/systemtap-2.6-0.146.gc6c7b81a195e.tar.gz
/systemtap-2.6-0.175.gaa2eaf77df63.tar.gz
/systemtap-2.6-0.195.gc69af88fff8d.tar.gz
/systemtap-2.6-0.208.g035685897c43.tar.gz
/systemtap-2.6-0.240.g876abb05c522.tar.gz
/systemtap-2.6-0.299.gefa3ced615cc.tar.gz
/systemtap-2.6-0.411.gdf6c01e780a2.tar.gz
/systemtap-2.6-0.413.g6c14086f35f6.tar.gz
/systemtap-2.6-0.417.ga799c319d22f.tar.gz
/systemtap-2.6.tar.gz
/systemtap-2.7-0.1.ge4542435d372.tar.gz
/systemtap-2.7-0.18.gb8056bd23784.tar.gz
/systemtap-2.7-0.22.gf48e4f1c41b8.tar.gz
/systemtap-2.7-0.38.g3525152408f1.tar.gz
/systemtap-2.7-0.41.g4c651caa69cf.tar.gz
/systemtap-2.7-0.63.g9c7a7069e302.tar.gz
/systemtap-2.7-0.67.ga1a230af2ea5.tar.gz
/systemtap-2.7-0.68.gdc7bb409c5b8.tar.gz
/systemtap-2.7-0.70.g05b1f1672349.tar.gz
/systemtap-2.7-0.74.g6fb025aaaa35.tar.gz
/systemtap-2.7-0.83.g69f0706dd69b.tar.gz
/systemtap-2.7-0.93.g0cf3720fbd15.tar.gz
/systemtap-2.7-0.98.g08e54ea0a22d.tar.gz
/systemtap-2.7-0.103.gc1b1844eb23f.tar.gz
/systemtap-2.7-0.117.g8ccd746013fa.tar.gz
/systemtap-2.7-0.120.ge6f437adfe6d.tar.gz
/systemtap-2.7-0.131.g96ef4c2ab1ec.tar.gz
/systemtap-2.7-0.156.g7cd3311e3288.tar.gz
/systemtap-2.7-0.160.gef8a28eb7412.tar.gz
/systemtap-2.7-0.168.g2df78f1c4927.tar.gz
/systemtap-2.7-0.190.gfdffe7a8fc5f.tar.gz
/systemtap-2.7-0.244.gc1a369fb16d9.tar.gz
/systemtap-2.7-0.284.gc1e8354302ba.tar.gz
/systemtap-2.7.tar.gz
/systemtap-2.8-0.20.g784e796f37c8.tar.gz
/systemtap-2.8-0.38.g3965aacd37c7.tar.gz
/systemtap-2.8-0.55.g07a1c230b47d.tar.gz
/systemtap-2.8-0.20150330gitd31dab9.tar.gz
/systemtap-2.8-0.20150413git81e4501.tar.gz
/systemtap-2.8-0.20150420gitc054ce2.tar.gz
/systemtap-2.8-0.20150427gitf80d9cd.tar.gz
/systemtap-2.8-0.20150504git6ca3ea7.tar.gz
/systemtap-2.8-0.20150525git1f13f63.tar.gz
/systemtap-2.8-0.20150525gita80691d.tar.gz
/systemtap-2.8-0.20150601git1eed3df.tar.gz
/systemtap-2.8.tar.gz
/systemtap-2.9-0.20150707git320e1ec.tar.gz
/systemtap-2.9-0.20150707git86f726b.tar.gz
/systemtap-2.9-0.20150713git9d0b65f.tar.gz
/systemtap-2.9.tar.gz
/systemtap-2.9-0.20150720gitebf15ab.tar.gz
/systemtap-2.9-0.20150727git91fe6e2.tar.gz
/systemtap-2.9-0.20150804git18d9c48.tar.gz
/systemtap-2.9-0.20150810git639e610.tar.gz
/systemtap-2.9-0.20150818git8f0e5e8.tar.gz
/systemtap-2.9-0.20150823git62d2a73.tar.gz
/systemtap-2.9-0.20150831gitca9905a.tar.gz
/systemtap-2.9-0.20150914git5d9828b.tar.gz
/systemtap-2.9-0.20150921gitd01bc76.tar.gz
/systemtap-2.9-0.20150928git92a8fee.tar.gz
/systemtap-3.0-0.20151019git9eef422.tar.gz
/systemtap-3.0-0.20151026git8136768.tar.gz
/systemtap-3.0-0.20151102git6469522.tar.gz
/systemtap-3.0-0.20151102git127e4e3.tar.gz
/systemtap-3.0-0.20151102git6c9c5fc.tar.gz
/systemtap-3.0-0.20151102git7b19719.tar.gz
/systemtap-3.0-0.20151116gitcb69017.tar.gz
/systemtap-3.0-0.20151123gita344cab.tar.gz
/systemtap-3.0-0.20151130git5042c9a.tar.gz
/systemtap-3.0-0.20151207gitc788eb1.tar.gz
/systemtap-3.0-0.20151214git54d87c8.tar.gz
/systemtap-3.0-0.20160104git3af4429.tar.gz
/systemtap-3.0-0.20160111gitf070ea0.tar.gz
/systemtap-3.0-0.20160118gite13e9b0.tar.gz
/systemtap-3.0-0.20160125gitc5f6801.tar.gz
/systemtap-3.0-0.20160201git6706593.tar.gz
/systemtap-3.0-0.20160201git617829c.tar.gz
/systemtap-3.0-0.20160202git8d66e1e.tar.gz
/systemtap-3.0-0.20160208git40ae3a7.tar.gz
/systemtap-3.0-0.20160314gitc857da7.tar.gz
/systemtap-3.0-0.20160314git356a3b0.tar.gz
/systemtap-3.0-0.20160321git1a442bf.tar.gz
/systemtap-3.0.tar.gz
/systemtap-3.1-0.20160329gitd84e7e5.tar.gz
/systemtap-3.1-0.20160411git8385da2.tar.gz
/systemtap-3.1-0.20160502gitc30ff77.tar.gz
/systemtap-3.1-0.20160516git3532c11.tar.gz
/systemtap-3.1-0.20160606git0de802f.tar.gz
/systemtap-3.1-0.20160613gitc043a8b.tar.gz
/systemtap-3.1-0.20160630gite5c209c.tar.gz
/systemtap-3.1-0.20160704git615ac77.tar.gz
/systemtap-3.1-0.20160711gitbf6ec87.tar.gz
/systemtap-3.1-0.20160718git21e1c1d.tar.gz
/systemtap-3.1-0.20160725git91bfb36.tar.gz
/systemtap-3.1-0.20160802git9cc6246.tar.gz
/systemtap-3.1-0.20160808git2c3f3f5.tar.gz
/systemtap-3.1-0.20160816gitba16350.tar.gz
/systemtap-3.1-0.20160829git7fb6e0e.tar.gz
/systemtap-3.1-0.20160912git2c58b79.tar.gz
/systemtap-3.1-0.20161017git2acd51e.tar.gz
/systemtap-3.1-0.20161024giteeed3ed.tar.gz
/systemtap-3.1-0.20161031git4e0d002.tar.gz
/systemtap-3.1-0.20161107git3145b02.tar.gz
/systemtap-3.1-0.20161114git5fb76b5.tar.gz
/systemtap-3.1-0.20161121git09dd8f0.tar.gz
/systemtap-3.1-0.20161128git9ed4785.tar.gz
/systemtap-3.1-0.20161205gitda79853.tar.gz
/systemtap-3.1-0.20161212git2cd5c938b39b.tar.gz
/systemtap-3.1-0.20161219gitcccf2f5.tar.gz
/systemtap-3.1-0.20161226git397109b0a7b2.tar.gz
/systemtap-3.1-0.20170103git7e8210a.tar.gz
/systemtap-3.1-0.20170109gitf8bc2a5.tar.gz
/systemtap-3.1-0.20170116git3d13f4e.tar.gz
/systemtap-3.1-0.20170116gitd5eac54.tar.gz
/systemtap-3.1-0.20170116git8065f5d.tar.gz
/systemtap-3.1-0.20170123git100bca3.tar.gz
/systemtap-3.1-0.20170123git756c7cf.tar.gz
/systemtap-3.1-0.20170125gite81970274b46.tar.gz
/systemtap-3.1.tar.gz

36
bz1439914.patch Normal file
View File

@ -0,0 +1,36 @@
commit 272146660f54786bb61d388f6d3a4eb20e7d9369 (origin/master2, master2)
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Mar 21 17:04:08 2017 -0400
gcc PR80115: sys/sdt.h: tweak i386 argument passing
Use %w[arg] to request that widened forms of register names be passed
to the sys/sdt.h macro operand strings, so as to avoid nominating
sub-registers such as %sil within -m32 code, which gcc <= 6 sometimes
buggily did.
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
index 3b7eda7976d1..eff315bcd885 100644
--- a/includes/sys/sdt.h
+++ b/includes/sys/sdt.h
@@ -82,9 +82,11 @@
# define _SDT_ASM_STRING_1(x) _SDT_ASM_1(.asciz #x)
# define _SDT_ARGFMT(no) %n[_SDT_S##no]@_SDT_ARGTMPL(_SDT_A##no)
+
# ifndef STAP_SDT_ARG_CONSTRAINT
# define STAP_SDT_ARG_CONSTRAINT nor
# endif
+
# define _SDT_STRINGIFY(x) #x
# define _SDT_ARG_CONSTRAINT_STRING(x) _SDT_STRINGIFY(x)
# define _SDT_ARG(n, x) \
@@ -173,6 +175,8 @@ __extension__ extern unsigned long long __sdt_unsp;
#if defined __powerpc__ || defined __powerpc64__
# define _SDT_ARGTMPL(id) %I[id]%[id]
+#elif defined __i386__
+# define _SDT_ARGTMPL(id) %w[id] /* gcc.gnu.org/PR80115 */
#else
# define _SDT_ARGTMPL(id) %[id]
#endif

55
bz1448099.1.patch Normal file
View File

@ -0,0 +1,55 @@
commit 62640f2ed0deef9355970d216136ad4c49afa3d0
Author: David Smith <dsmith@redhat.com>
Date: Fri Mar 17 09:36:42 2017 -0500
PR21255: Fix missing get_task_mm() declaration.
* buildrun.cxx (compile_pass): Add <linux/sched/mm.h> autoconf test. This
was caused by the following kernel commit:
commit 6e84f31522f931027bf695752087ece278c10d3f
Author: Ingo Molnar <mingo@kernel.org>
Date: Wed Feb 8 18:51:29 2017 +0100
sched/headers: Prepare for new header dependencies before moving
code to <linux/sched/mm.h>
* runtime/linux/access_process_vm.h: Include <linux/sched.h> and, if it
exists, <linux/sched/mm.h>.
* runtime/linux/autoconf-sched-mm.c: New file.
diff --git a/buildrun.cxx b/buildrun.cxx
index aaea64c..644eea9 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -402,6 +402,7 @@ compile_pass (systemtap_session& s)
output_autoconf(s, o, "autoconf-netfilter-4_4.c", "STAPCONF_NETFILTER_V44", NULL);
output_autoconf(s, o, "autoconf-smpcall-5args.c", "STAPCONF_SMPCALL_5ARGS", NULL);
output_autoconf(s, o, "autoconf-smpcall-4args.c", "STAPCONF_SMPCALL_4ARGS", NULL);
+ output_autoconf(s, o, "autoconf-sched-mm.c", "STAPCONF_SCHED_MM_H", NULL);
// used by tapset/timestamp_monotonic.stp
output_exportconf(s, o, "cpu_clock", "STAPCONF_CPU_CLOCK");
diff --git a/runtime/linux/access_process_vm.h b/runtime/linux/access_process_vm.h
index 22a1220..a46b86f 100644
--- a/runtime/linux/access_process_vm.h
+++ b/runtime/linux/access_process_vm.h
@@ -3,6 +3,10 @@
* some distros export it on some architectures. To workaround this inconsistency,
* we copied and pasted it here. Fortunately, everything it calls is exported.
*/
+#include <linux/sched.h>
+#ifdef STAPCONF_SCHED_MM_H
+#include <linux/sched/mm.h>
+#endif
#include <linux/pagemap.h>
#include <asm/cacheflush.h>
diff --git a/runtime/linux/autoconf-sched-mm.c b/runtime/linux/autoconf-sched-mm.c
new file mode 100644
index 0000000..6d3f1c2
--- /dev/null
+++ b/runtime/linux/autoconf-sched-mm.c
@@ -0,0 +1,3 @@
+#include <linux/sched.h>
+#include <linux/sched/mm.h>
+

37
bz1448099.2.patch Normal file
View File

@ -0,0 +1,37 @@
commit a477a43122609691ce6ef24f71114cfaa9790392
Author: David Smith <dsmith@redhat.com>
Date: Fri Mar 17 10:44:12 2017 -0500
PR21255: Fix missing __set_task_state() definition.
* runtime/stp_utrace.c: Fix missing __set_task_state() definition. If we
can't find a __set_task_state() definition, define our own.
diff --git a/runtime/stp_utrace.c b/runtime/stp_utrace.c
index bb2d663..5924016 100644
--- a/runtime/stp_utrace.c
+++ b/runtime/stp_utrace.c
@@ -29,6 +29,14 @@
#include "stp_helper_lock.h"
+#if defined(__set_task_state)
+#define __stp_set_task_state(tsk, state_value) \
+ __set_task_state((tsk), (state_value))
+#else
+#define __stp_set_task_state(tsk, state_value) \
+ do { (tsk)->state = (state_value); } while (0)
+#endif
+
/*
* Per-thread structure private to utrace implementation.
* If task_struct.utrace_flags is nonzero, task_struct.utrace
@@ -1105,7 +1113,7 @@ static bool utrace_do_stop(struct task_struct *target, struct utrace *utrace)
*/
spin_lock_irq(&target->sighand->siglock);
if (likely(task_is_stopped(target)))
- __set_task_state(target, TASK_TRACED);
+ __stp_set_task_state(target, TASK_TRACED);
spin_unlock_irq(&target->sighand->siglock);
} else if (utrace->resume > UTRACE_REPORT) {
utrace->resume = UTRACE_REPORT;

42
bz1448099.3.patch Normal file
View File

@ -0,0 +1,42 @@
commit 030e9465eadf7d3b3a278951264dac83b2f4b4f7
Author: David Smith <dsmith@redhat.com>
Date: Wed Feb 22 10:04:00 2017 -0600
Update the vfs.stp tapset for newer kernels.
* tapset/linux/vfs.stp: Since the __block_write_begin() function can be
inlined on newer kernels, we'll also probe
__block_write_begin_int(). Also, check to see if '$file' is defined
before using it in _vfs.block_write_begin.return.
diff --git a/tapset/linux/vfs.stp b/tapset/linux/vfs.stp
index 4572bd7..32db300 100644
--- a/tapset/linux/vfs.stp
+++ b/tapset/linux/vfs.stp
@@ -1104,7 +1104,8 @@ probe _vfs.generic_commit_write = kernel.function("generic_commit_write") ?
argstr = sprintf("%p, %p, %d, %d", $file, $page, $from, $to)
}
-probe _vfs.block_prepare_write = kernel.function("__block_write_begin") !,
+probe _vfs.block_prepare_write = kernel.function("__block_write_begin_int") !,
+ kernel.function("__block_write_begin") !,
kernel.function("__block_prepare_write")
{
page = $page
@@ -1134,6 +1135,7 @@ probe _vfs.block_prepare_write = kernel.function("__block_write_begin") !,
}
probe _vfs.block_prepare_write.return =
+ kernel.function("__block_write_begin_int").return !,
kernel.function("__block_write_begin").return !,
kernel.function("__block_prepare_write").return
{
@@ -1188,7 +1190,7 @@ probe _vfs.block_write_begin.return =
name = "_vfs.block_write_begin"
retstr = sprintf("%d", $return)
- file = @entry($file)
+ file = @choose_defined(@entry($file), "")
pathname = @defined(@entry($file)) ? fullpath_struct_file(task_current(), @entry($file)) : ""
pos = @entry($pos)
len = @entry($len)

43
bz1448099.4.patch Normal file
View File

@ -0,0 +1,43 @@
commit 5ab0c875df5011725f9cd2f0804c00bf9e63d492
Author: David Smith <dsmith@redhat.com>
Date: Thu Mar 2 15:23:28 2017 -0600
Fix s390x compile error in runtime/stack-s390.c.
* runtime/stack-s390.c (__stp_stack_print): Update code to let it compile
on the 4.10 kernel. Kernel commit d5c352c moved 'thread_info' into
task_struct.
diff --git a/runtime/stack-s390.c b/runtime/stack-s390.c
index 38eb73f..56043fc 100644
--- a/runtime/stack-s390.c
+++ b/runtime/stack-s390.c
@@ -11,7 +11,6 @@ static unsigned long
__stp_show_stack (unsigned long sp, unsigned long low,
unsigned long high, int verbose)
{
-
struct stack_frame *sf;
struct pt_regs *regs;
unsigned long ip;
@@ -62,9 +61,18 @@ static void __stp_stack_print (struct pt_regs *regs,
sp = __stp_show_stack(sp,
S390_lowcore.async_stack - ASYNC_SIZE,
- S390_lowcore.async_stack,verbose);
+ S390_lowcore.async_stack, verbose);
+#ifdef CONFIG_THREAD_INFO_IN_TASK
+ /* FIXME: Note that this CONFIG_THREAD_INFO_IN_TASK
+ * code is untested, since the s390 uses the dwarf
+ * unwinder so this code doesn't get called. */
+ __stp_show_stack(sp, ((unsigned long)current->stack),
+ (((unsigned long)current->stack)
+ + THREAD_SIZE), verbose);
+#else
__stp_show_stack(sp,
S390_lowcore.thread_info,
- S390_lowcore.thread_info + THREAD_SIZE,verbose);
+ S390_lowcore.thread_info + THREAD_SIZE, verbose);
+#endif
}

72
bz1448099.5.patch Normal file
View File

@ -0,0 +1,72 @@
commit 386b8596d721e93ad618e682ecddb323d2bee446
Author: David Smith <dsmith@redhat.com>
Date: Thu Mar 2 15:25:17 2017 -0600
Fix s390x-specific syscall tests.
* testsuite/buildok/syscalls-arch-detailed.stp: Made s390x probe tests
optional, since the underlying probes don't exist on the 4.10 kernel.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: Ditto.
diff --git a/testsuite/buildok/nd_syscalls-arch-detailed.stp b/testsuite/buildok/nd_syscalls-arch-detailed.stp
index 364b13e..b927d15 100755
--- a/testsuite/buildok/nd_syscalls-arch-detailed.stp
+++ b/testsuite/buildok/nd_syscalls-arch-detailed.stp
@@ -429,22 +429,22 @@ probe nd_syscall.ppc64_newuname.return ?
#
%( arch == "s390" %?
-probe nd_syscall.getresgid16
+probe nd_syscall.getresgid16 ?
{
printf("%s, %s\n", name, argstr)
printf("%p, %p, %p\n", rgid_uaddr, egid_uaddr, sgid_uaddr)
}
-probe nd_syscall.getresgid16.return
+probe nd_syscall.getresgid16.return ?
{
printf("%s, %s\n", name, retstr)
}
-probe nd_syscall.getresuid16
+probe nd_syscall.getresuid16 ?
{
printf("%s, %s\n", name, argstr)
printf("%p, %p, %p\n", ruid_uaddr, euid_uaddr, suid_uaddr)
}
-probe nd_syscall.getresuid16.return
+probe nd_syscall.getresuid16.return ?
{
printf("%s, %s\n", name, retstr)
}
diff --git a/testsuite/buildok/syscalls-arch-detailed.stp b/testsuite/buildok/syscalls-arch-detailed.stp
index 8d7d21e..914da9e 100755
--- a/testsuite/buildok/syscalls-arch-detailed.stp
+++ b/testsuite/buildok/syscalls-arch-detailed.stp
@@ -429,22 +429,22 @@ probe syscall.ppc64_newuname.return ?
#
%( arch == "s390" %?
-probe syscall.getresgid16
+probe syscall.getresgid16 ?
{
printf("%s, %s\n", name, argstr)
printf("%p, %p, %p\n", rgid_uaddr, egid_uaddr, sgid_uaddr)
}
-probe syscall.getresgid16.return
+probe syscall.getresgid16.return ?
{
printf("%s, %s\n", name, retstr)
}
-probe syscall.getresuid16
+probe syscall.getresuid16 ?
{
printf("%s, %s\n", name, argstr)
printf("%p, %p, %p\n", ruid_uaddr, euid_uaddr, suid_uaddr)
}
-probe syscall.getresuid16.return
+probe syscall.getresuid16.return ?
{
printf("%s, %s\n", name, retstr)
}

48
bz1448099.6.patch Normal file
View File

@ -0,0 +1,48 @@
commit 9f1c7a872e7a13d1ee29b692d0f1f4dd18a07baa
Author: David Smith <dsmith@redhat.com>
Date: Tue May 9 16:20:41 2017 -0500
Avoid missing "task_stack()" definition on 4.11 kernels.
* runtime/compatdefs.h: If <linux/sched/task_stack.h> exists, include
it. This avoids a missing task_stack() definition.
* buildrun.cxx (compile_pass): Add autoconf test for
<linux/sched/task_stack.h>.
* runtime/linux/autoconf-sched-task_stack.c: New file.
diff --git a/buildrun.cxx b/buildrun.cxx
index 21ed3c5..6da308a 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -403,6 +403,7 @@ compile_pass (systemtap_session& s)
output_autoconf(s, o, "autoconf-smpcall-5args.c", "STAPCONF_SMPCALL_5ARGS", NULL);
output_autoconf(s, o, "autoconf-smpcall-4args.c", "STAPCONF_SMPCALL_4ARGS", NULL);
output_autoconf(s, o, "autoconf-sched-mm.c", "STAPCONF_SCHED_MM_H", NULL);
+ output_autoconf(s, o, "autoconf-sched-task_stack.c", "STAPCONF_SCHED_TASK_STACK_H", NULL);
// used by tapset/timestamp_monotonic.stp
output_exportconf(s, o, "cpu_clock", "STAPCONF_CPU_CLOCK");
diff --git a/runtime/compatdefs.h b/runtime/compatdefs.h
index ba429b5..f261bfd 100644
--- a/runtime/compatdefs.h
+++ b/runtime/compatdefs.h
@@ -57,6 +57,10 @@ static inline int _stp_is_compat_task(void)
*/
#include <asm/processor.h>
#include <asm/ptrace.h>
+#include <linux/sched.h>
+#ifdef STAPCONF_SCHED_TASK_STACK_H
+#include <linux/sched/task_stack.h>
+#endif
#if !defined(task_pt_regs)
#if defined(__powerpc__)
diff --git a/runtime/linux/autoconf-sched-task_stack.c b/runtime/linux/autoconf-sched-task_stack.c
new file mode 100644
index 0000000..cdfcc60
--- /dev/null
+++ b/runtime/linux/autoconf-sched-task_stack.c
@@ -0,0 +1,3 @@
+#include <linux/sched.h>
+#include <linux/sched/task_stack.h>
+

36
bz1448099.7.1.patch Normal file
View File

@ -0,0 +1,36 @@
diff --git a/tapset/linux/proc_mem.stp b/tapset/linux/proc_mem.stp
index 4b20686..890be69 100644
--- a/tapset/linux/proc_mem.stp
+++ b/tapset/linux/proc_mem.stp
@@ -155,7 +155,7 @@ function proc_mem_size_pid:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0)
- return mm->total_vm
+ return @mm(mm)->total_vm
}
return 0
}
@@ -322,8 +322,8 @@ function proc_mem_txt_pid:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- s = mm->start_code
- e = mm->end_code
+ s = @mm(mm)->start_code
+ e = @mm(mm)->end_code
return _stp_mem_txt_adjust (s, e)
}
}
@@ -381,8 +381,9 @@ function proc_mem_data_pid:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- return (@defined(&@mm(0)->data_vm) ? (mm->data_vm + mm->stack_vm)
- : (mm->total_vm - mm->shared_vm))
+ return (@defined(&@mm(0)->data_vm)
+ ? (@mm(mm)->data_vm + @mm(mm)->stack_vm)
+ : (@mm(mm)->total_vm - @mm(mm)->shared_vm))
}
}
return 0

142
bz1448099.7.patch Normal file
View File

@ -0,0 +1,142 @@
commit c7029a89f5f1ff6d6a7008e8bccb797046f8af50
Author: David Smith <dsmith@redhat.com>
Date: Tue May 9 16:32:25 2017 -0500
Add missing @cast() calls for 4.11 kernels.
* tapset/linux/task.stp: Add a "signal_struct" cast to
_task_rlimit_cur().
* tapset/linux/task.stpm: Fix @mm() macro for kernels >= 2.6.34, where the
mm_struct definition has moved to <linux/mm_types.h>
* tapset/linux/proc_mem.stp (proc_mem_size): Use the @mm() macro to cast
values to a mm_struct.
(proc_mem_txt): Ditto.
(proc_mem_data): Ditto.
* tapset/linux/context.stp (cmdline_args): Ditto.
* tapset/linux/context-envvar.stp (env_var): Ditto.
diff --git a/tapset/linux/context-envvar.stp b/tapset/linux/context-envvar.stp
index 4d4c648..2ceb6c8 100644
--- a/tapset/linux/context-envvar.stp
+++ b/tapset/linux/context-envvar.stp
@@ -28,8 +28,8 @@ function env_var:string(name:string)
mm = task_current()->mm;
if (mm)
{
- env_start = mm->env_start;
- env_end = mm->env_end;
+ env_start = @mm(mm)->env_start;
+ env_end = @mm(mm)->env_end;
if (env_start != 0 && env_end != 0)
{
len = env_end - env_start;
diff --git a/tapset/linux/context.stp b/tapset/linux/context.stp
index e563983..8ab81b4 100644
--- a/tapset/linux/context.stp
+++ b/tapset/linux/context.stp
@@ -559,8 +559,8 @@ function cmdline_args:string(n:long, m:long, delim:string)
if (__mm == 0)
return "";
- __arg_start = __mm->arg_start;
- __arg_end = __mm->arg_end;
+ __arg_start = @mm(__mm)->arg_start;
+ __arg_end = @mm(__mm)->arg_end;
if (__arg_start == 0 || __arg_end == 0)
return "";
diff --git a/tapset/linux/proc_mem.stp b/tapset/linux/proc_mem.stp
index de6f423..161033d 100644
--- a/tapset/linux/proc_mem.stp
+++ b/tapset/linux/proc_mem.stp
@@ -124,7 +124,7 @@ function proc_mem_size:long ()
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0)
- return mm->total_vm
+ return @mm(mm)->total_vm
}
return 0
}
@@ -144,7 +144,7 @@ function proc_mem_size:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0)
- return mm->total_vm
+ return @mm(mm)->total_vm
}
return 0
}
@@ -260,8 +260,8 @@ function proc_mem_txt:long ()
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- s = mm->start_code
- e = mm->end_code
+ s = @mm(mm)->start_code
+ e = @mm(mm)->end_code
return _stp_mem_txt_adjust(s, e)
}
}
@@ -283,8 +283,8 @@ function proc_mem_txt:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- s = mm->start_code
- e = mm->end_code
+ s = @mm(mm)->start_code
+ e = @mm(mm)->end_code
return _stp_mem_txt_adjust (s, e)
}
}
@@ -308,8 +308,9 @@ function proc_mem_data:long ()
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- return (@defined(&@mm(0)->data_vm) ? (mm->data_vm + mm->stack_vm)
- : (mm->total_vm - mm->shared_vm))
+ return (@defined(&@mm(0)->data_vm)
+ ? (@mm(mm)->data_vm + @mm(mm)->stack_vm)
+ : (@mm(mm)->total_vm - @mm(mm)->shared_vm))
}
}
return 0
@@ -330,8 +331,9 @@ function proc_mem_data:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- return (@defined(&@mm(0)->data_vm) ? (mm->data_vm + mm->stack_vm)
- : (mm->total_vm - mm->shared_vm))
+ return (@defined(&@mm(0)->data_vm)
+ ? (@mm(mm)->data_vm + @mm(mm)->stack_vm)
+ : (@mm(mm)->total_vm - @mm(mm)->shared_vm))
}
}
return 0
diff --git a/tapset/linux/task.stp b/tapset/linux/task.stp
index 5467e05..f7c852e 100644
--- a/tapset/linux/task.stp
+++ b/tapset/linux/task.stp
@@ -40,7 +40,7 @@ function task_current:long () {
return -1;
}
sig = @task(task)->signal;
- return sig->rlim[nd_limit]->rlim_cur;
+ return @cast(sig, "signal_struct")->rlim[nd_limit]->rlim_cur;
}
/* sfunction task_rlimit - The current resource limit of the task
diff --git a/tapset/linux/task.stpm b/tapset/linux/task.stpm
index 7df04e3..f1bfb8e 100644
--- a/tapset/linux/task.stpm
+++ b/tapset/linux/task.stpm
@@ -3,5 +3,9 @@
%)
@define mm(ptr) %(
+ %( kernel_v >= "2.6.34" %?
+ @cast(@ptr, "mm_struct", "kernel<linux/mm_types.h>")
+ %:
@cast(@ptr, "mm_struct", "kernel<linux/sched.h>")
+ %)
%)

65
bz1448099.8.patch Normal file
View File

@ -0,0 +1,65 @@
commit 35ea394c93d3c296c0c809d21bc397b531b7e965
Author: David Smith <dsmith@redhat.com>
Date: Tue May 9 16:39:11 2017 -0500
Add small testsuite fixes for 4.11 kernels.
* testsuite/buildok/twentyseven.stp: Avoid missing inlined function
arguments by probing 'kernel.function("do_execve").call'.
* testsuite/buildok/thirtyone.stp: On 4.11 kernels, handle the vfs_stat()
function being renamed to vfs_statx().
* testsuite/systemtap.pass1-4/buildok.exp: Add kfails for
buildok/fortyfour.stp and buildok/map_probe_cond.stp if we don't have
uprobes.
* testsuite/systemtap.pass1-4/buildok-interactive.exp: Ditto.
diff --git a/testsuite/buildok/thirtyone.stp b/testsuite/buildok/thirtyone.stp
index ccba660..e7e102d 100755
--- a/testsuite/buildok/thirtyone.stp
+++ b/testsuite/buildok/thirtyone.stp
@@ -1,5 +1,5 @@
#! stap -wp4
-probe kprobe.function("vfs_stat") {}
+probe kprobe.function("vfs_stat")!, kprobe.function("vfs_statx") ? {}
probe kprobe.function("do_sys_open") {}
probe kernel.function("filp_close") {}
diff --git a/testsuite/buildok/twentyseven.stp b/testsuite/buildok/twentyseven.stp
index 62900f3..a3cbfde 100755
--- a/testsuite/buildok/twentyseven.stp
+++ b/testsuite/buildok/twentyseven.stp
@@ -1,6 +1,6 @@
#! stap -p4
-probe kernel.function("do_execve")
+probe kernel.function("do_execve").call
{
print(@defined($__argv) ? $__argv[0] : $argv[0])
}
diff --git a/testsuite/systemtap.pass1-4/buildok-interactive.exp b/testsuite/systemtap.pass1-4/buildok-interactive.exp
index fc4a019..d15640f 100644
--- a/testsuite/systemtap.pass1-4/buildok-interactive.exp
+++ b/testsuite/systemtap.pass1-4/buildok-interactive.exp
@@ -188,6 +188,9 @@ foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] {
# without utrace.
if {$rc == 1 && ![utrace_p]} { setup_kfail UTRACE *-*-*} }
+ buildok/fortyfour.stp -
+ buildok/map_probe_cond.stp -
+ buildok/pretty-uprobes.stp -
buildok/pretty-uprobes.stp -
buildok/ucontext-symbols-embedded.stp -
buildok/ucontext-unwind-embedded.stp {
diff --git a/testsuite/systemtap.pass1-4/buildok.exp b/testsuite/systemtap.pass1-4/buildok.exp
index 3926b7f..79f2217 100644
--- a/testsuite/systemtap.pass1-4/buildok.exp
+++ b/testsuite/systemtap.pass1-4/buildok.exp
@@ -40,6 +40,8 @@ foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] {
# without utrace.
if {$rc != 0 && ![utrace_p]} { setup_kfail UTRACE *-*-*} }
+ buildok/fortyfour.stp -
+ buildok/map_probe_cond.stp -
buildok/pretty-uprobes.stp -
buildok/ucontext-symbols-embedded.stp -
buildok/ucontext-unwind-embedded.stp {

View File

@ -72,7 +72,7 @@
Name: systemtap
Version: 3.1
Release: 1%{?dist}
Release: 5%{?dist}
# for version, see also configure.ac
@ -186,6 +186,18 @@ BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
Patch10: bz1439914.patch
Patch21: bz1448099.1.patch
Patch22: bz1448099.2.patch
Patch23: bz1448099.3.patch
Patch24: bz1448099.4.patch
Patch25: bz1448099.5.patch
Patch26: bz1448099.6.patch
Patch27: bz1448099.7.patch
Patch28: bz1448099.7.1.patch
Patch29: bz1448099.8.patch
# Install requirements
Requires: systemtap-client = %{version}-%{release}
Requires: systemtap-devel = %{version}-%{release}
@ -461,6 +473,7 @@ systemtap-runtime-virthost machine to execute systemtap scripts.
%prep
%setup -q %{?setup_elfutils}
%patch10 -p1
%if %{with_bundled_elfutils}
cd elfutils-%{elfutils_version}
@ -472,6 +485,17 @@ find . \( -name configure -o -name config.h.in \) -print | xargs touch
cd ..
%endif
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%build
%if %{with_bundled_elfutils}
@ -1139,6 +1163,15 @@ done
# PRERELEASE
%changelog
* Mon May 15 2017 Frank Ch. Eigler <fche@redhat.com> - 3.1-5
- Build with dsmith's bz1448099 patches for support of kernel 4.11
* Thu Apr 06 2017 Frank Ch. Eigler <fche@redhat.com> - 3.1-3
- Backport bz1439914 (sys/sdt.h argument encoding)
* Thu Mar 16 2017 Stan Cox <scox@redhat.com> - 3.1-2
- Rebuild for dyninst 9.3
* Fri Feb 17 2017 Frank Ch. Eigler <fche@redhat.com> - 3.1-1
- Upstream release.