This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/18711] Pass 4 failure on RHEL7 for examples netfilter_summary and netfilter_drop
- From: "mcermak at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Wed, 29 Jul 2015 11:40:22 +0000
- Subject: [Bug tapsets/18711] Pass 4 failure on RHEL7 for examples netfilter_summary and netfilter_drop
- Auto-submitted: auto-generated
- References: <bug-18711-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18711
--- Comment #2 from Martin Cermak <mcermak at redhat dot com> ---
I tested that with 3.10.0-229.el7, STAPCONF_NETFILTER_V313 is defined within
tapset-netfilter.cxx and respective #ifdef branch is effective. Looking at
buildrun.cxx, this is probably because autoconf-netfilter.c compiles fine. I am
not sure how exactly is autoconf compiling it yet. But at the end of the day
netfilter_drop.stp works fine.
With 3.10.0-300.el7, none of STAPCONF_NETFILTER_V41, STAPCONF_NETFILTER_V313 is
defined and thus "LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)" condition wins.
What fixes the issue for me is following update. Yes, it's not a "fix" but a
dirty hack that makes it work (and probably breaks it all elsewhere):
=======
diff --git a/tapset-netfilter.cxx b/tapset-netfilter.cxx
index 12df8d7..b149be1 100644
--- a/tapset-netfilter.cxx
+++ b/tapset-netfilter.cxx
@@ -279,8 +279,10 @@ netfilter_derived_probe_group::emit_module_decls
(systemtap_session& s)
s.op->newline() << "#elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)";
- s.op->newline() << "(unsigned int nf_hooknum, struct sk_buff *nf_skb,
const struct net_device *nf_in, const struct net_device *nf_out, int
(*nf_okfn)(struct sk_buff *))";
+// s.op->newline() << "(unsigned int nf_hooknum, struct sk_buff *nf_skb,
const struct net_device *nf_in, const struct net_device *nf_out, int
(*nf_okfn)(struct sk_buff *))";
+ s.op->newline() << "(const struct nf_hook_ops *nf_ops, struct sk_buff
*nf_skb, const struct net_device *nf_in, const struct net_device *nf_out, const
struct nf_hook_state *nf_state)";
s.op->newline() << "{";
+ s.op->newline() << "unsigned int nf_hooknum = nf_ops->hooknum;";
s.op->newline() << "#else";
=======
I found this by repetitive commenting out various pieces of the code, building
it and running. I wonder how I could put some _stp_warn()-ish debugging outputs
there.
However, my nose says that this will probably require new autoconf .c test
program, adding it to buildrun.cxx where some new STAPCONF_NETFILTER_foo macro
will get defined and add a respective new branch to tapset-netfilter.cxx?
__GENKSYMS__ is still a bit mysterious to me, but I can imagine this being
covered by an autoconf test.
--
You are receiving this mail because:
You are the assignee for the bug.