diff --git a/.gitignore b/.gitignore index c2ff5b6..135a8d2 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ /systemtap-4.9.tar.gz /systemtap-5.0.tar.gz /systemtap-5.1.tar.gz +/systemtap-5.2.tar.gz diff --git a/PR31495.patch b/PR31495.patch deleted file mode 100644 index d8d8192..0000000 --- a/PR31495.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit b87891f5aff91b8ebbda8d9218009495848f7747 -Author: Martin Cermak -Date: Thu May 16 16:51:08 2024 +0200 - - PR31495: teach stap-prep to work with other RT kernels - -diff --git a/stap-prep b/stap-prep -index 8b429f880..2bbb6bc2f 100755 ---- a/stap-prep -+++ b/stap-prep -@@ -103,13 +103,16 @@ done - # 5.14.0-200.rt14.201.el9 -> - # "kernel-rt-debug-5.14.0-200.rt14.201.el9" - # OR?! "kernel-rt-5.14.0-200.rt14.201.el9" --if expr "$UNAME" : ".*\.rt.*" >/dev/null; -+# OR??!"kernel-rt-5.14.0-447.el9.x86_64+rt" -+if expr "$UNAME" : ".*\.rt.*" || expr "$UNAME" : ".*\+rt.*" >/dev/null; - then - KERNEL=`echo $KERNEL | sed -e s,kernel,kernel-rt,` - fi - - KERN_ARCH=`uname -m` --KERN_REV=`echo $UNAME | sed s/.$KERN_ARCH//` # strip arch from uname -+# strip arch from uname, for kernels like 5.14.0-447.el9.x86_64+rt or -+# 6.9.0-0.rc2.1.el10.x86_64+rt strip the +rt suffix too -+KERN_REV=`echo $UNAME | sed s/.$KERN_ARCH// | sed s/\+rt$//` - if [ -x /usr/bin/dnf4 ]; then - DI="dnf4 debuginfo-install" - DI_DEPS="" diff --git a/PR32302.patch b/PR32302.patch new file mode 100644 index 0000000..372014c --- /dev/null +++ b/PR32302.patch @@ -0,0 +1,223 @@ +commit 8b87bd584dcadb3713eaf6d0c9b540b4f54124bf +gpg: Signature made Mon 11 Nov 2024 11:48:03 AM EST +gpg: using RSA key D8F2E95271BA794E222FBEE0DB83606EC7DAAB26 +gpg: Can't check signature: No public key +Author: Martin Cermak +Date: Mon Nov 11 17:41:53 2024 +0100 + + PR32302: Emit forward decls within tracepoint_derived_probe_group() too + + Forward decls added in commit 069def0ae9184 need to actually be + emitted in 2 locations, roughtly corresponding to where + tracepoint_extra_decls() is used. + + It would be ideal to put them directly to tracepoint_extra_decls() + but that gives significantly less recognized tracepoints. + + The plan is toreview this again though and try to merge the + tracepoint_forward_decls() body into tracepoint_extra_decls() + if possible. + +diff --git a/tapsets.cxx b/tapsets.cxx +index b4ad7e14e..06540cafc 100644 +--- a/tapsets.cxx ++++ b/tapsets.cxx +@@ -11729,6 +11729,89 @@ static bool header_exists(systemtap_session& s, const string& header) + return false; + } + ++static vector tracepoint_forward_decls () ++{ ++ vector retval; ++ // Kernel 6.12 ++ retval.push_back("enum cachefiles_content;"); ++ retval.push_back("enum extent_type;"); ++ retval.push_back("struct bch_fs;"); ++ retval.push_back("struct bch_move_stats;"); ++ retval.push_back("struct bpos;"); ++ retval.push_back("struct btree_bkey_cached_common;"); ++ retval.push_back("struct btree_insert_entry;"); ++ retval.push_back("struct btree_path;"); ++ retval.push_back("struct btree_trans;"); ++ retval.push_back("struct cachefiles_msg;"); ++ retval.push_back("struct cachefiles_open;"); ++ retval.push_back("struct cachefiles_read;"); ++ retval.push_back("struct cachefiles_volume;"); ++ retval.push_back("struct clk_rate_request;"); ++ retval.push_back("struct compact_control;"); ++ retval.push_back("struct fsi_device;"); ++ retval.push_back("struct fsi_msg;"); ++ retval.push_back("struct fsi_slave;"); ++ retval.push_back("struct fuse_req;"); ++ retval.push_back("struct get_locks_fail;"); ++ retval.push_back("struct gss_cred;"); ++ retval.push_back("struct handshake_req;"); ++ retval.push_back("struct i2c_client;"); ++ retval.push_back("struct ib_mad_agent_private;"); ++ retval.push_back("struct ib_mad_qp_info;"); ++ retval.push_back("struct ib_mad_send_wr_private;"); ++ retval.push_back("struct ib_smp;"); ++ retval.push_back("struct iomap;"); ++ retval.push_back("struct iomap_iter;"); ++ retval.push_back("struct mctp_sk_key;"); ++ retval.push_back("struct mptcp_ext;"); ++ retval.push_back("struct mptcp_subflow_context;"); ++ retval.push_back("struct nbd_request;"); ++ retval.push_back("struct netfs_io_request;"); ++ retval.push_back("struct netfs_io_stream;"); ++ retval.push_back("struct netfs_io_subrequest;"); ++ retval.push_back("struct nfs42_clone_args;"); ++ retval.push_back("struct nfs42_copy_args;"); ++ retval.push_back("struct nfs42_copy_notify_args;"); ++ retval.push_back("struct nfs42_copy_notify_res;"); ++ retval.push_back("struct nfs42_copy_res;"); ++ retval.push_back("struct nfs42_falloc_args;"); ++ retval.push_back("struct nfs42_offload_status_args;"); ++ retval.push_back("struct nfs42_seek_args;"); ++ retval.push_back("struct nfs42_seek_res;"); ++ retval.push_back("struct nfs_direct_req;"); ++ retval.push_back("struct nfs_page;"); ++ retval.push_back("struct opa_smp;"); ++ retval.push_back("struct p9_fid;"); ++ retval.push_back("struct pwc_device;"); ++ retval.push_back("struct request;"); ++ retval.push_back("struct rpc_auth;"); ++ retval.push_back("struct rpc_gss_wire_cred;"); ++ retval.push_back("struct rpcrdma_ep;"); ++ retval.push_back("struct rpcrdma_mr;"); ++ retval.push_back("struct rpcrdma_notification;"); ++ retval.push_back("struct rpcrdma_rep;"); ++ retval.push_back("struct rpcrdma_req;"); ++ retval.push_back("struct rpcrdma_xprt;"); ++ retval.push_back("struct rpc_rqst;"); ++ retval.push_back("struct rpc_task;"); ++ retval.push_back("struct selinux_audit_data;"); ++ retval.push_back("struct spi_device;"); ++ retval.push_back("struct svc_rdma_chunk;"); ++ retval.push_back("struct svc_rdma_recv_ctxt;"); ++ retval.push_back("struct svc_rdma_segment;"); ++ retval.push_back("struct svc_rdma_send_ctxt;"); ++ retval.push_back("struct svc_rqst;"); ++ retval.push_back("struct svcxprt_rdma;"); ++ retval.push_back("struct tmigr_cpu;"); ++ retval.push_back("struct tmigr_group;"); ++ retval.push_back("struct virtio_gpu_ctrl_hdr;"); ++ retval.push_back("struct virtqueue;"); ++ retval.push_back("struct somenonexistentstruct_123;"); ++ retval.push_back("union ifs_sbaf;"); ++ retval.push_back("union ifs_sbaf_status;"); ++ retval.push_back("union tmigr_state;"); ++ return retval; ++} + + static vector tracepoint_extra_decls (systemtap_session& s, + const string& header, +@@ -12187,6 +12270,8 @@ tracepoint_derived_probe_group::emit_module_decls (systemtap_session& s) + s.op->newline(); + + ++ ++ + // We create a MODULE_aux_N.c file for each tracepoint header, to allow them + // to be separately compiled. That's because kernel tracepoint headers sometimes + // conflict. PR13155. +@@ -12207,6 +12292,11 @@ tracepoint_derived_probe_group::emit_module_decls (systemtap_session& s) + tpop = s.op_create_auxiliary(); + per_header_aux[header] = tpop; + ++ // add needed forward decls/#includes ++ static vector forward_decls = tracepoint_forward_decls(); ++ for (unsigned z=0; znewline()<< forward_decls[z] << "\n"; ++ + // PR9993: Add extra headers to work around undeclared types in individual + // include/trace/foo.h files + const vector& extra_decls = tracepoint_extra_decls (s, header, +@@ -12773,83 +12863,10 @@ tracepoint_builder::get_tracequery_modules(systemtap_session& s, + osrc << "#ifdef CONFIG_TRACEPOINTS" << endl; + osrc << "#include " << endl; + +- osrc << "enum cachefiles_content;" << endl; +- osrc << "enum extent_type;" << endl; +- osrc << "struct bch_fs;" << endl; +- osrc << "struct bch_move_stats;" << endl; +- osrc << "struct bpos;" << endl; +- osrc << "struct btree_bkey_cached_common;" << endl; +- osrc << "struct btree_insert_entry;" << endl; +- osrc << "struct btree_path;" << endl; +- osrc << "struct btree_trans;" << endl; +- osrc << "struct cachefiles_msg;" << endl; +- osrc << "struct cachefiles_open;" << endl; +- osrc << "struct cachefiles_read;" << endl; +- osrc << "struct cachefiles_volume;" << endl; +- osrc << "struct clk_rate_request;" << endl; +- osrc << "struct compact_control;" << endl; +- osrc << "struct fsi_device;" << endl; +- osrc << "struct fsi_msg;" << endl; +- osrc << "struct fsi_slave;" << endl; +- osrc << "struct fuse_req;" << endl; +- osrc << "struct get_locks_fail;" << endl; +- osrc << "struct gss_cred;" << endl; +- osrc << "struct handshake_req;" << endl; +- osrc << "struct i2c_client;" << endl; +- osrc << "struct ib_mad_agent_private;" << endl; +- osrc << "struct ib_mad_qp_info;" << endl; +- osrc << "struct ib_mad_send_wr_private;" << endl; +- osrc << "struct ib_smp;" << endl; +- osrc << "struct iomap;" << endl; +- osrc << "struct iomap_iter;" << endl; +- osrc << "struct mctp_sk_key;" << endl; +- osrc << "struct mptcp_ext;" << endl; +- osrc << "struct mptcp_subflow_context;" << endl; +- osrc << "struct nbd_request;" << endl; +- osrc << "struct netfs_io_request;" << endl; +- osrc << "struct netfs_io_stream;" << endl; +- osrc << "struct netfs_io_subrequest;" << endl; +- osrc << "struct nfs42_clone_args;" << endl; +- osrc << "struct nfs42_copy_args;" << endl; +- osrc << "struct nfs42_copy_notify_args;" << endl; +- osrc << "struct nfs42_copy_notify_res;" << endl; +- osrc << "struct nfs42_copy_res;" << endl; +- osrc << "struct nfs42_falloc_args;" << endl; +- osrc << "struct nfs42_offload_status_args;" << endl; +- osrc << "struct nfs42_seek_args;" << endl; +- osrc << "struct nfs42_seek_res;" << endl; +- osrc << "struct nfs_direct_req;" << endl; +- osrc << "struct nfs_page;" << endl; +- osrc << "struct opa_smp;" << endl; +- osrc << "struct p9_fid;" << endl; +- osrc << "struct pwc_device;" << endl; +- osrc << "struct request;" << endl; +- osrc << "struct rpc_auth;" << endl; +- osrc << "struct rpc_gss_wire_cred;" << endl; +- osrc << "struct rpcrdma_ep;" << endl; +- osrc << "struct rpcrdma_mr;" << endl; +- osrc << "struct rpcrdma_notification;" << endl; +- osrc << "struct rpcrdma_rep;" << endl; +- osrc << "struct rpcrdma_req;" << endl; +- osrc << "struct rpcrdma_xprt;" << endl; +- osrc << "struct rpc_rqst;" << endl; +- osrc << "struct rpc_task;" << endl; +- osrc << "struct selinux_audit_data;" << endl; +- osrc << "struct spi_device;" << endl; +- osrc << "struct svc_rdma_chunk;" << endl; +- osrc << "struct svc_rdma_recv_ctxt;" << endl; +- osrc << "struct svc_rdma_segment;" << endl; +- osrc << "struct svc_rdma_send_ctxt;" << endl; +- osrc << "struct svc_rqst;" << endl; +- osrc << "struct svcxprt_rdma;" << endl; +- osrc << "struct tmigr_cpu;" << endl; +- osrc << "struct tmigr_group;" << endl; +- osrc << "struct virtio_gpu_ctrl_hdr;" << endl; +- osrc << "struct virtqueue;" << endl; +- osrc << "struct somenonexistentstruct_123;" << endl; +- osrc << "union ifs_sbaf;" << endl; +- osrc << "union ifs_sbaf_status;" << endl; +- osrc << "union tmigr_state;" << endl; ++ // add needed forward decls/#includes ++ static vector forward_decls = tracepoint_forward_decls(); ++ for (unsigned z=0; z -Date: Mon May 6 11:36:42 2024 -0400 - - Support kernels that backported kallsym functions from newer linux kernels - - Some Linux distributions may have backported - module_kallsyms_on_each_symbol and kallsyms_on_each_symbol functions - from newer linux kernels. In these situations checking the kernel - version would not detect the proper arguments for these functions. - Systemtap now has a couple of autoconf tests to determine what - arguments should be used for these functions. - -diff --git a/buildrun.cxx b/buildrun.cxx -index bb7bdcc9d..8ee8c391f 100644 ---- a/buildrun.cxx -+++ b/buildrun.cxx -@@ -506,6 +506,8 @@ compile_pass (systemtap_session& s) - - output_autoconf(s, o, cs, "autoconf-pagefault_disable.c", "STAPCONF_PAGEFAULT_DISABLE", NULL); - output_exportconf(s, o2, "kallsyms_lookup_name", "STAPCONF_KALLSYMS_LOOKUP_NAME_EXPORTED"); -+ output_autoconf(s, o, cs, "autoconf-kallsyms_6_3.c", "STAPCONF_KALLSYMS_6_3", NULL); -+ output_autoconf(s, o, cs, "autoconf-kallsyms_6_4.c", "STAPCONF_KALLSYMS_6_4", NULL); - output_autoconf(s, o, cs, "autoconf-uidgid.c", "STAPCONF_LINUX_UIDGID_H", NULL); - output_exportconf(s, o2, "sigset_from_compat", "STAPCONF_SIGSET_FROM_COMPAT_EXPORTED"); - output_exportconf(s, o2, "vzalloc", "STAPCONF_VZALLOC"); -diff --git a/runtime/linux/autoconf-kallsyms_6_3.c b/runtime/linux/autoconf-kallsyms_6_3.c -new file mode 100644 -index 000000000..0af1a5c35 ---- /dev/null -+++ b/runtime/linux/autoconf-kallsyms_6_3.c -@@ -0,0 +1,6 @@ -+#include -+ -+int module_kallsyms_on_each_symbol(const char *modname, -+ int (*fn)(void *, const char *, struct module*, -+ unsigned long), -+ void *data); -diff --git a/runtime/linux/autoconf-kallsyms_6_4.c b/runtime/linux/autoconf-kallsyms_6_4.c -new file mode 100644 -index 000000000..3b3680c53 ---- /dev/null -+++ b/runtime/linux/autoconf-kallsyms_6_4.c -@@ -0,0 +1,3 @@ -+#include -+int kallsyms_on_each_symbol(int (*fn)(void *, const char *, unsigned long), -+ void *data); -diff --git a/runtime/linux/kprobes.c b/runtime/linux/kprobes.c -index 6b30f2c52..2fba61cbb 100644 ---- a/runtime/linux/kprobes.c -+++ b/runtime/linux/kprobes.c -@@ -737,7 +737,7 @@ __stapkp_symbol_callback(void *data, const char *name, - } - - static int --#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0) -+#if defined(STAPCONF_KALLSYMS_6_4) - stapkp_symbol_callback(void *data, const char *name, - unsigned long addr) - { -@@ -780,7 +780,7 @@ stapkp_init(struct stap_kprobe_probe *probes, - mutex_lock(&module_mutex); - #endif - kallsyms_on_each_symbol(stapkp_symbol_callback, &sd); --#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0) -+#if defined(STAPCONF_KALLSYMS_6_3) || defined(STAPCONF_KALLSYMS_6_4) - module_kallsyms_on_each_symbol(sd.modname, stapkp_symbol_callback, &sd); - #elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0) - module_kallsyms_on_each_symbol(stapkp_symbol_callback, &sd); -@@ -855,7 +855,7 @@ stapkp_refresh(const char *modname, - mutex_lock(&module_mutex); - #endif - kallsyms_on_each_symbol(stapkp_symbol_callback, &sd); --#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0) -+#if defined(STAPCONF_KALLSYMS_6_3) - module_kallsyms_on_each_symbol(sd.modname, stapkp_symbol_callback, &sd); - #elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0) - module_kallsyms_on_each_symbol(stapkp_symbol_callback, &sd); -diff --git a/runtime/sym.c b/runtime/sym.c -index 3947d42f7..23dd3be30 100644 ---- a/runtime/sym.c -+++ b/runtime/sym.c -@@ -1187,7 +1187,7 @@ unsigned long kallsyms_lookup_name (const char *name) - typedef typeof(&kallsyms_on_each_symbol) kallsyms_on_each_symbol_fn; - - // XXX Will be linked in place of the kernel's kallsyms_on_each_symbol: --#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0) -+#if defined(STAPCONF_KALLSYMS_6_4) - int kallsyms_on_each_symbol(int (*fn)(void *, const char *, - unsigned long), - void *data) -@@ -1214,13 +1214,13 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *, - typedef typeof(&module_kallsyms_on_each_symbol) module_kallsyms_on_each_symbol_fn; - - // XXX Will be linked in place of the kernel's module_kallsyms_on_each_symbol: --#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0) -+#if defined(STAPCONF_KALLSYMS_6_4) - int module_kallsyms_on_each_symbol(const char *modname, - int (*fn)(void *, const char *, - unsigned long), - void *data) - #else --#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0) -+#if defined(STAPCONF_KALLSYMS_6_3) - int module_kallsyms_on_each_symbol(const char *modname, - int (*fn)(void *, const char *, struct module *, - unsigned long), -@@ -1235,7 +1235,7 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module - /* First, try to use a kallsyms_lookup_name address passed to us - through the relocation mechanism. */ - if (_stp_module_kallsyms_on_each_symbol != NULL) --#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0) -+#if defined(STAPCONF_KALLSYMS_6_3) || defined(STAPCONF_KALLSYMS_6_4) - return ibt_wrapper(int, - (* (module_kallsyms_on_each_symbol_fn)_stp_module_kallsyms_on_each_symbol)(modname, fn, data)); - #else diff --git a/RHEL-36199b.patch b/RHEL-36199b.patch deleted file mode 100644 index 2e840f4..0000000 --- a/RHEL-36199b.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit ed5649f64a3f8c2e8269f9c4435e9174c4e8c775 -Author: William Cohen -Date: Thu May 9 12:23:54 2024 -0400 - - Support kernels that backported kallsym functions (part 2) - - Git commit b8d4274d1e769780 omitted a test for the Linux 6.4 version - of kallsyms function in runtime/linux/kprobes.c. - -diff --git a/runtime/linux/kprobes.c b/runtime/linux/kprobes.c -index 2fba61cbb..9ae5565e3 100644 ---- a/runtime/linux/kprobes.c -+++ b/runtime/linux/kprobes.c -@@ -855,7 +855,7 @@ stapkp_refresh(const char *modname, - mutex_lock(&module_mutex); - #endif - kallsyms_on_each_symbol(stapkp_symbol_callback, &sd); --#if defined(STAPCONF_KALLSYMS_6_3) -+#if defined(STAPCONF_KALLSYMS_6_3) || defined(STAPCONF_KALLSYMS_6_4) - module_kallsyms_on_each_symbol(sd.modname, stapkp_symbol_callback, &sd); - #elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0) - module_kallsyms_on_each_symbol(stapkp_symbol_callback, &sd); diff --git a/RHEL-50107.patch b/RHEL-50107.patch deleted file mode 100644 index df2fd07..0000000 --- a/RHEL-50107.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git a/buildrun.cxx b/buildrun.cxx -index a7fcd6297..e3f2f83d1 100644 ---- a/buildrun.cxx -+++ b/buildrun.cxx -@@ -400,6 +400,7 @@ compile_pass (systemtap_session& s) - output_exportconf(s, o2, "__module_text_address", "STAPCONF_MODULE_TEXT_ADDRESS"); - output_exportconf(s, o2, "add_timer_on", "STAPCONF_ADD_TIMER_ON"); - output_autoconf(s, o, cs, "autoconf-514-panic.c", "STAPCONF_514_PANIC", NULL); -+ output_autoconf(s, o, cs, "autoconf-task_work_cancel_func.c", "STAPCONF_TASK_WORK_CANCEL_FUNC", NULL); - - output_dual_exportconf(s, o2, "probe_kernel_read", "probe_kernel_write", "STAPCONF_PROBE_KERNEL"); - output_autoconf(s, o, cs, "autoconf-hw_breakpoint_context.c", -diff --git a/runtime/linux/autoconf-task_work_cancel_func.c b/runtime/linux/autoconf-task_work_cancel_func.c -new file mode 100644 -index 000000000..0d460de6c ---- /dev/null -+++ b/runtime/linux/autoconf-task_work_cancel_func.c -@@ -0,0 +1,3 @@ -+#include -+ -+void* c = & task_work_cancel_func; -diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h -index 0e9fe3fea..bd9307385 100644 ---- a/runtime/linux/runtime.h -+++ b/runtime/linux/runtime.h -@@ -265,7 +265,7 @@ static void *kallsyms_uprobe_get_swbp_addr; - static void *kallsyms_task_work_add; - #endif - #if !defined(STAPCONF_TASK_WORK_CANCEL_EXPORTED) --static void *kallsyms_task_work_cancel; -+static void *kallsyms_task_work_cancel_fn; - #endif - - #if !defined(STAPCONF_TRY_TO_WAKE_UP_EXPORTED) && !defined(STAPCONF_WAKE_UP_STATE_EXPORTED) -diff --git a/runtime/stp_task_work.c b/runtime/stp_task_work.c -index 0dd3095b6..4818fecbf 100644 ---- a/runtime/stp_task_work.c -+++ b/runtime/stp_task_work.c -@@ -3,14 +3,25 @@ - - #include "linux/task_work_compatibility.h" - -+// Handle kernel commit 68cbd415dd4b9c5b9df69f0f091879e56bf5907a -+// task_work: s/task_work_cancel()/task_work_cancel_func()/ -+#if defined(STAPCONF_TASK_WORK_CANCEL_FUNC) -+#define TASK_WORK_CANCEL_FN task_work_cancel_func -+#else -+#define TASK_WORK_CANCEL_FN task_work_cancel -+#endif -+ -+#define STRINGIFY(x) #x -+#define TOSTRING(x) STRINGIFY(x) -+ - #if !defined(STAPCONF_TASK_WORK_ADD_EXPORTED) - // First typedef from the original decls, then #define as typecasted calls. - typedef typeof(&task_work_add) task_work_add_fn; - #define task_work_add(a,b,c) ibt_wrapper(int, (* (task_work_add_fn)kallsyms_task_work_add)((a), (b), (c))) - #endif - #if !defined(STAPCONF_TASK_WORK_CANCEL_EXPORTED) --typedef typeof(&task_work_cancel) task_work_cancel_fn; --#define task_work_cancel(a,b) ibt_wrapper(struct callback_head *, (* (task_work_cancel_fn)kallsyms_task_work_cancel)((a), (b))) -+typedef typeof(&TASK_WORK_CANCEL_FN) task_work_cancel_fn; -+#define task_work_cancel(a,b) ibt_wrapper(struct callback_head *, (* (task_work_cancel_fn)kallsyms_task_work_cancel_fn)((a), (b))) - #endif - - /* To avoid a crash when a task_work callback gets called after the -@@ -35,9 +46,9 @@ stp_task_work_init(void) - } - #endif - #if !defined(STAPCONF_TASK_WORK_CANCEL_EXPORTED) -- kallsyms_task_work_cancel = (void *)kallsyms_lookup_name("task_work_cancel"); -- if (kallsyms_task_work_cancel == NULL) { -- _stp_error("Can't resolve task_work_cancel!"); -+ kallsyms_task_work_cancel_fn = (void *)kallsyms_lookup_name(TOSTRING(TASK_WORK_CANCEL_FN)); -+ if (kallsyms_task_work_cancel_fn == NULL) { -+ _stp_error("Can't resolve %s!", TOSTRING(TASK_WORK_CANCEL_FN)); - return -ENOENT; - } - #endif diff --git a/sources b/sources index b6cca60..9c9cb81 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (systemtap-5.1.tar.gz) = da0fe237d2124031a5786d1221dbb420d90da5497376715fd43a7a9f61a354a229c1128e67ce6becbc012aa3796dc5d337149e239e3c1def0651b179e5bf199f +SHA512 (systemtap-5.2.tar.gz) = 30137e232e44abe98747ae61a71a162eff5abc89e9a922f86ade834eac2cac1923ae06d4ed17710718adba082ad06d2fb544822003a54e13b97eea9e183bdf9d + diff --git a/systemtap.spec b/systemtap.spec index eec3686..91f63e8 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -120,8 +120,8 @@ m stapdev stapdev Name: systemtap # PRERELEASE -Version: 5.1 -Release: 4%{?release_override}%{?dist} +Version: 5.2 +Release: 1%{?release_override}%{?dist} # for version, see also configure.ac @@ -133,7 +133,8 @@ Release: 4%{?release_override}%{?dist} # systemtap-runtime /usr/bin/staprun, /usr/bin/stapsh, /usr/bin/stapdyn # systemtap-client /usr/bin/stap, samples, docs, tapset(bonus), req:-runtime # systemtap-initscript /etc/init.d/systemtap, dracut module, req:systemtap -# systemtap-sdt-devel /usr/include/sys/sdt.h /usr/bin/dtrace +# systemtap-sdt-devel /usr/include/sys/sdt.h +# systemtap-sdt-dtrace /usr/bin/dtrace # systemtap-testsuite /usr/share/systemtap/testsuite*, req:systemtap, req:sdt-devel # systemtap-runtime-java libHelperSDT.so, HelperSDT.jar, stapbm, req:-runtime # systemtap-runtime-virthost /usr/bin/stapvirt, req:libvirt req:libxml2 @@ -155,12 +156,9 @@ Release: 4%{?release_override}%{?dist} Summary: Programmable system-wide instrumentation system License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz -Patch1: RHEL-36199a.patch -Patch2: RHEL-36199b.patch -Patch3: PR31495.patch -Patch4: RHEL-50107.patch +Patch0: PR32302.patch # Build* BuildRequires: make @@ -263,7 +261,7 @@ the components needed to locally develop and execute systemtap scripts. %package server Summary: Instrumentation System Server License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires: systemtap-devel = %{version}-%{release} Conflicts: systemtap-devel < %{version}-%{release} Conflicts: systemtap-runtime < %{version}-%{release} @@ -293,7 +291,7 @@ compiles systemtap scripts to kernel objects on their demand. %package devel Summary: Programmable system-wide instrumentation system - development headers, tools License: GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND BSD-2-Clause -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ %if 0%{?rhel} >= 8 || 0%{?fedora} >= 20 Recommends: (kernel-debug-devel if kernel-debug) @@ -323,7 +321,7 @@ a copy of the standard tapset library and the runtime library C files. %package runtime Summary: Programmable system-wide instrumentation system - runtime License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires(pre): shadow-utils Conflicts: systemtap-devel < %{version}-%{release} Conflicts: systemtap-server < %{version}-%{release} @@ -338,7 +336,7 @@ using a local or remote systemtap-devel installation. %package client Summary: Programmable system-wide instrumentation system - client License: GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires: zip unzip Requires: systemtap-runtime = %{version}-%{release} Requires: coreutils grep sed unzip zip @@ -351,17 +349,19 @@ Requires: mokutil %endif %description client -This package contains/requires the components needed to develop -systemtap scripts, and compile them using a local systemtap-devel -or a remote systemtap-server installation, then run them using a -local or remote systemtap-runtime. It includes script samples and +This package contains/requires only the components needed to +use systemtap scripts by compiling them using a local or a remote +systemtap-server service, then run them using a local or +remote systemtap-runtime. It includes script samples and documentation, and a copy of the tapset library for reference. - +It does NOT include all the components for running a systemtap +script in a self-contained fashion; for that, use the -devel +subpackage instead. %package initscript Summary: Systemtap Initscripts License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires: systemtap = %{version}-%{release} %if %{with_systemd} Requires: systemd @@ -379,9 +379,20 @@ boot-time probing if supported. %package sdt-devel -Summary: Static probe support tools +Summary: Static probe support header files License: GPL-2.0-or-later AND CC0-1.0 -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ + +%description sdt-devel +This package includes the header file used for static +instrumentation compiled into userspace programs. + + +%package sdt-dtrace +Summary: Static probe support dtrace tool +License: GPL-2.0-or-later AND CC0-1.0 +URL: https://sourceware.org/systemtap/ +Provides: dtrace = %{version}-%{release} %if %{with_pyparsing} %if %{with_python3} Requires: python3-pyparsing @@ -394,17 +405,15 @@ Requires: python2-pyparsing %endif %endif -%description sdt-devel -This package includes the header file used for static -instrumentation compiled into userspace programs and libraries, along -with the optional dtrace-compatibility preprocessor to process related -.d files into tracing-macro-laden .h headers. +%description sdt-dtrace +This package includes the dtrace-compatibility preprocessor +to process related .d files into tracing-macro-laden .h headers. %package testsuite Summary: Instrumentation System Testsuite -License: GPL-2.0-or-later AND GPL AND GPL-2.0-only AND GPL-3.0-or-later AND MIT -URL: http://sourceware.org/systemtap/ +License: GPL-2.0-or-later AND GPL-2.0-only AND GPL-3.0-or-later AND MIT +URL: https://sourceware.org/systemtap/ Requires: systemtap = %{version}-%{release} Requires: systemtap-sdt-devel = %{version}-%{release} Requires: systemtap-server = %{version}-%{release} @@ -476,7 +485,7 @@ systemtap on the current system. %package runtime-java Summary: Systemtap Java Runtime Support License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} # work around fedora ci gating kvetching about i686<->x86-64 conflicts %ifarch x86_64 @@ -498,7 +507,7 @@ that probe Java processes running on the OpenJDK runtimes using Byteman. %package runtime-python2 Summary: Systemtap Python 2 Runtime Support License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} %description runtime-python2 @@ -510,7 +519,7 @@ that probe python 2 processes. %package runtime-python3 Summary: Systemtap Python 3 Runtime Support License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} %if ! (%{with_python2_probes}) @@ -527,7 +536,7 @@ that probe python 3 processes. %package exporter Summary: Systemtap-prometheus interoperation mechanism License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} %description exporter @@ -540,7 +549,7 @@ to remote requesters on demand. %package runtime-virthost Summary: Systemtap Cross-VM Instrumentation - host License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ # only require libvirt-libs really #Requires: libvirt >= 1.0.2 Requires: libxml2 @@ -555,7 +564,7 @@ connection. %package runtime-virtguest Summary: Systemtap Cross-VM Instrumentation - guest License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} %if %{with_systemd} Requires(post): findutils coreutils @@ -575,7 +584,7 @@ systemtap-runtime-virthost machine to execute systemtap scripts. %package jupyter Summary: ISystemtap jupyter kernel and examples License: GPL-2.0-or-later -URL: http://sourceware.org/systemtap/ +URL: https://sourceware.org/systemtap/ Requires: systemtap = %{version}-%{release} %description jupyter @@ -587,10 +596,7 @@ or within a container. %prep %setup -q -%patch -P1 -p1 -%patch -P2 -p1 -%patch -P3 -p1 -%patch -P4 -p1 +%patch -P0 -p1 %build @@ -735,9 +741,6 @@ find testsuite -type f -name '.gitignore' -print0 | xargs -0 rm -f # permissions back to 04110 in the %files section below. chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun -#install the useful stap-prep script -install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep - # Copy over the testsuite cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap @@ -1135,13 +1138,14 @@ exit 0 %if %{with_emacsvim} %{_emacs_sitelispdir}/*.el* %{_emacs_sitestartdir}/systemtap-init.el -%{_datadir}/vim/vimfiles/*/*.vim +%{_datadir}/vim/vimfiles %endif # Notice that the stap-resolve-module-function.py file is used by # *both* the python2 and python3 subrpms. Both subrpms use that same # python script to help list python probes. %if %{with_python3_probes} || %{with_python2_probes} %{_libexecdir}/systemtap/python/stap-resolve-module-function.py +%dir %{_libexecdir}/systemtap/python %exclude %{_libexecdir}/systemtap/python/stap-resolve-module-function.py? %endif @@ -1236,16 +1240,22 @@ exit 0 %files sdt-devel -%{_bindir}/dtrace %{_includedir}/sys/sdt.h %{_includedir}/sys/sdt-config.h -%{_mandir}/man1/dtrace.1* %{_rpmmacrodir}/macros.systemtap %doc README AUTHORS NEWS %{!?_licensedir:%global license %%doc} %license COPYING +%files sdt-dtrace +%{_bindir}/dtrace +%doc README AUTHORS NEWS +%{!?_licensedir:%global license %%doc} +%license COPYING +%{_mandir}/man1/dtrace.1* + + %files testsuite %dir %{_datadir}/systemtap %{_datadir}/systemtap/testsuite @@ -1314,10 +1324,14 @@ exit 0 # Future new-release entries should be of the form # * DDD MMM DD YYYY YOURNAME - V-R # - Upstream release, see wiki page below for detailed notes. -# http://sourceware.org/systemtap/wiki/SystemTapReleases +# https://sourceware.org/systemtap/wiki/SystemTapReleases # PRERELEASE %changelog +* Mon Nov 11 2024 Frank Ch. Eigler - 5.2-1 +- Upstream release, see wiki page below for detailed notes. +- https://sourceware.org/systemtap/wiki/SystemTapReleases + * Mon Sep 9 2024 Martin Cermak - 5.1-4 - RHEL-50107.patch: Make systemtap compatible with kernel commit 68cbd415dd4b . Related: RHEL-56962 .