|
|
132810 |
commit f6d68366654176541487a8916c3b61c5b1207736
|
|
|
132810 |
Author: William Cohen <wcohen@redhat.com>
|
|
|
132810 |
Date: Mon Nov 19 14:23:15 2018 -0500
|
|
|
132810 |
|
|
|
132810 |
Adjust the vfs_open to provide cred variable with 4.18 kernels
|
|
|
132810 |
|
|
|
132810 |
The kernel's git commit ae2bb293a3e8adbc54d08cede5afc22929030c03
|
|
|
132810 |
removed the cred argument from the vfs_open. Thus, there is no $cred
|
|
|
132810 |
target variable available. This missing target variable lives on as a
|
|
|
132810 |
field in the $file target variable. The patch makes the tapset use
|
|
|
132810 |
that field if the $cred target variable is not available. Fixing this
|
|
|
132810 |
allows the slowvfs.stp example to work with newer linux 4.18 kernels.
|
|
|
132810 |
|
|
|
132810 |
diff --git a/tapset/linux/vfs.stp b/tapset/linux/vfs.stp
|
|
|
132810 |
index 1fe71ae..7505dfa 100644
|
|
|
132810 |
--- a/tapset/linux/vfs.stp
|
|
|
132810 |
+++ b/tapset/linux/vfs.stp
|
|
|
132810 |
@@ -1296,7 +1296,7 @@ probe vfs.open = kernel.function("vfs_open") ?
|
|
|
132810 |
{
|
|
|
132810 |
name = "vfs.open"
|
|
|
132810 |
path = $path
|
|
|
132810 |
- cred = $cred
|
|
|
132810 |
+ cred = @defined($cred) ? $cred : $file->f_cred
|
|
|
132810 |
pathname = fullpath_struct_path($path)
|
|
|
132810 |
argstr = sprintf("%s, %p", pathname, $cred)
|
|
|
132810 |
}
|
|
|
132810 |
@@ -1311,6 +1311,6 @@ probe vfs.open.return = kernel.function("vfs_open").return ?
|
|
|
132810 |
error_str = error ? errno_str(error) : ""
|
|
|
132810 |
|
|
|
132810 |
path = @entry($path)
|
|
|
132810 |
- cred = @entry($cred)
|
|
|
132810 |
+ cred = @entry(@defined($cred) ? $cred : $file->f_cred)
|
|
|
132810 |
pathname = fullpath_struct_path(@entry($path))
|
|
|
132810 |
}
|