[DTrace-devel] [PATCH 08/16] Add support for ENOTSUPP error code

Kris Van Hees kris.van.hees at oracle.com
Thu Mar 18 21:54:36 PDT 2021


The ENOTSUPP error code is not meant to be exposed by the kernel, and
it is in fact specific to NFSv3.  However, the uprobes implementation
in the kernel uses it to indicate that a uprobe could not be placed at
the requested location.  This causes it to be exposed to us through
the perf_event_open() system call.

When it is encountered, the "Operation not supported" message will be
reported.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
 libdtrace/dt_error.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libdtrace/dt_error.c b/libdtrace/dt_error.c
index 6276d52c..20cf3842 100644
--- a/libdtrace/dt_error.c
+++ b/libdtrace/dt_error.c
@@ -118,6 +118,14 @@ dtrace_errmsg(dtrace_hdl_t *dtp, int error)
 				return _dt_errlist[i].msg;
 		}
 		str = NULL;
+	} else if (error == 524) {
+		/*
+		 * This is an error code that is supposedly specific to NFSv3.
+		 * It is not expected to be known to userspace - except that
+		 * uprobe uses it when it cannot place a a uprobe, and thus it
+		 * is exposed to us through perf_event_open().
+		 */
+		str = "Operation not supported";
 	} else
 		str = strerror(error);
 
-- 
2.28.0




More information about the DTrace-devel mailing list