systemtap/rhbz1566745.patch
Mark Wielaard 0d3a3a4eee 3.2-11
- Add rhbz1549063.patch (/bin/env -> /usr/bin/env)
- Add rhbz1566745.patch (4.15 kernel tapset updates)
- Enable accidentially disabled Suggests: kernel-devel again.
2018-04-20 17:08:55 +02:00

126 lines
4.3 KiB
Diff

commit 0f8139eb4bd06a19714608b5f246fc24fcafde6e
Author: David Smith <dsmith@redhat.com>
Date: Thu Dec 7 16:07:39 2017 -0600
Updated several tapsets for the 4.15 kernel.
* tapset/linux/linuxmib.stp: Update the 'DelayedACKs' probes to handle
a missing '$data' parameter.
* tapset/linux/memory.stp: Handle missing '__GFP_COLD' flag.
* tapset/linux/nfsd.stp: Update the 'nfsd.proc4.rename' probe to handle
upstream changes.
* tapset/linux/signal.stp: Update the 'signal.pending' probe to handle a
missing '$sigsestsize' parameter.
diff --git a/tapset/linux/linuxmib.stp b/tapset/linux/linuxmib.stp
index ef09929..63ec248 100644
--- a/tapset/linux/linuxmib.stp
+++ b/tapset/linux/linuxmib.stp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2009 IBM Corp.
- * Copyright (C) 2010 Red Hat Inc.
+ * Copyright (C) 2010-2017 Red Hat Inc.
*
* This file is part of systemtap, and is free software. You can
* redistribute it and/or modify it under the terms of the GNU General
@@ -39,14 +39,18 @@ probe _linuxmib.DelayedACKs.A = kernel.function("tcp_send_ack")
probe _linuxmib.DelayedACKs.B = kernel.function("tcp_delack_timer")
{
- sk=$data
+ sk=@choose_defined($data,
+ &@container_of($t, "inet_connection_sock",
+ icsk_delack_timer)->icsk_inet->sk)
indelack_timer[sk]=1
op=0
}
probe _linuxmib.DelayedACKs.C = kernel.function("tcp_delack_timer").return
{
- sk=@entry($data)
+ sk=@entry(@choose_defined($data,
+ &@container_of($t, "inet_connection_sock",
+ icsk_delack_timer)->icsk_inet->sk))
indelack_timer[sk]=0;
op=0
}
diff --git a/tapset/linux/memory.stp b/tapset/linux/memory.stp
index b968fe3..169d0f1 100644
--- a/tapset/linux/memory.stp
+++ b/tapset/linux/memory.stp
@@ -1,7 +1,7 @@
// memory/vm related tapset
// Copyright (C) 2005, 2006 IBM Corp.
// Copyright (C) 2006 Intel Corporation.
-// Copyright (C) 2014 Red Hat Inc.
+// Copyright (C) 2014-2017 Red Hat Inc.
//
// This file is part of systemtap, and is free software. You can
// redistribute it and/or modify it under the terms of the GNU General
@@ -368,7 +368,9 @@ probe vm.oom_kill = kernel.function("oom_kill_process") !,
__GFP_BITMASKS(__GFP_HIGH)
__GFP_BITMASKS(__GFP_IO)
__GFP_BITMASKS(__GFP_FS)
+#ifdef __GFP_COLD
__GFP_BITMASKS(__GFP_COLD)
+#endif
__GFP_BITMASKS(__GFP_NOWARN)
#ifdef __GFP_RETRY_MAYFAIL
__GFP_BITMASKS(__GFP_RETRY_MAYFAIL)
diff --git a/tapset/linux/nfsd.stp b/tapset/linux/nfsd.stp
index 3df1600..5a70e84 100644
--- a/tapset/linux/nfsd.stp
+++ b/tapset/linux/nfsd.stp
@@ -1262,18 +1262,26 @@ probe nfsd.proc4.rename = kernel.function("nfsd4_rename").call !,
fh = & @nfsd4_compound_state($cstate)->save_fh
tfh = & @nfsd4_compound_state($cstate)->current_fh
- filelen = $rename->rn_snamelen
- filename = kernel_string_n($rename->rn_sname, $rename->rn_snamelen)
- tlen = $rename->rn_tnamelen
- tname = kernel_string_n($rename->rn_tname, $rename->rn_tnamelen)
+ if (@defined($rename)) {
+ filelen = $rename->rn_snamelen
+ filename = kernel_string_n($rename->rn_sname,
+ $rename->rn_snamelen)
+ tlen = $rename->rn_tnamelen
+ tname = kernel_string_n($rename->rn_tname, $rename->rn_tnamelen)
+ } else {
+ filelen = $u->rename->rn_snamelen
+ filename = kernel_string_n($u->rename->rn_sname,
+ $u->rename->rn_snamelen)
+ tlen = $u->rename->rn_tnamelen
+ tname = kernel_string_n($u->rename->rn_tname,
+ $u->rename->rn_tnamelen)
+ }
uid = __rqstp_uid($rqstp)
gid = __rqstp_gid($rqstp)
name = "nfsd.proc4.rename"
- argstr = sprintf("%s to %s",
- kernel_string_n($rename->rn_sname, $rename->rn_snamelen),
- kernel_string_n($rename->rn_tname, $rename->rn_tnamelen))
+ argstr = sprintf("%s to %s", filename, tname)
}
probe nfsd.proc4.rename.return =
diff --git a/tapset/linux/signal.stp b/tapset/linux/signal.stp
index 9a94bad..4f9f9f9 100644
--- a/tapset/linux/signal.stp
+++ b/tapset/linux/signal.stp
@@ -613,7 +613,11 @@ probe signal.pending = kernel.function("do_sigpending").call !,
{
name = "pending"
sigset_add=@choose_defined($set, $uset)
- sigset_size=$sigsetsize
+
+ # Note that this isn't 100% correct if $sigsetsize doesn't
+ # exist (in the case of newer do_sigpending() calls). Instead,
+ # we're returning the default size of a sigset_t.
+ sigset_size=@choose_defined($sigsetsize, @cast_sizeof("sigset_t"))
}
/**