output_exportconf(s, o2, "proc_create_data", "STAPCONF_PROC_CREATE_DATA");
output_autoconf(s, o, cs, "autoconf-proc_ops.c", "STAPCONF_PROC_OPS", NULL);
output_exportconf(s, o2, "PDE_DATA", "STAPCONF_PDE_DATA");
+ output_autoconf(s, o, cs, "autoconf-pde_data.c", "STAPCONF_PDE_DATA2", NULL);
output_autoconf(s, o, cs, "autoconf-module-sect-attrs.c", "STAPCONF_MODULE_SECT_ATTRS", NULL);
output_autoconf(s, o, cs, "autoconf-kernel_read-new-args.c", "STAPCONF_KERNEL_READ_NEW_ARGS", NULL);
output_autoconf(s, o, cs, "autoconf-utrace-via-tracepoints.c", "STAPCONF_UTRACE_VIA_TRACEPOINTS", NULL);
--- /dev/null
+/* detect
+ linux commit 6dfbbae14a7b961f41d80a106e1ab60e86d061c5
+ fs: proc: store PDE()->data into inode->i_private */
+
+#include <linux/proc_fs.h>
+
+void* __something(const struct inode* i)
+{
+ return pde_data (i);
+}
/* If STAPCONF_PDE_DATA isn't defined, we're using the original /proc
* interface (where 'struct proc_dir_entry' isn't opaque). Provide
* some of the new interface's functions. */
-#ifndef STAPCONF_PDE_DATA
+#if !defined(STAPCONF_PDE_DATA) && !defined(STAPCONF_PDE_DATA2)
#ifndef STAPCONF_LINUX_UIDGID_H
static void proc_set_user(struct proc_dir_entry *de, uid_t uid, gid_t gid)
struct stap_procfs_probe *spp;
int res;
+#ifdef STAPCONF_PDE_DATA2
+ spp = (struct stap_procfs_probe *)pde_data(inode);
+#else
spp = (struct stap_procfs_probe *)PDE_DATA(inode);
+#endif
if (spp == NULL) {
return -EINVAL;
}
#include "uidgid_compatibility.h"
-/* If STAPCONF_PDE_DATA isn't defined, we're using the original /proc
+/* If STAPCONF_PDE_DATA* aren't defined, we're using the original /proc
* interface (where 'struct proc_dir_entry' isn't opaque). In this
* case allow the (undocumented) feature of slashes
* (i.e. subdirectories) in paths. */
-#ifndef STAPCONF_PDE_DATA
+#if !defined(STAPCONF_PDE_DATA) && !defined(STAPCONF_PDE_DATA2)
#define _STP_ALLOW_PROCFS_PATH_SUBDIRS
#endif
"Copyright (C) 2005-2021 Red Hat, Inc. and others\n" // PRERELEASE
"This is free software; see the source for copying conditions.\n",
version_string().c_str());
- cout << _F("tested kernel versions: %s ... %s\n", "2.6.32", "5.15.0-rc7"); // PRERELEASE
+ cout << _F("tested kernel versions: %s ... %s\n", "2.6.32", "5.17.0-rc4"); // PRERELEASE
cout << _("enabled features:")
#ifdef HAVE_AVAHI