New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: reads from inotify file descriptors should decode the struct #199
Comments
On Wed, Oct 06, 2021 at 05:20:37PM -0700, Érico Nogueira Rolim wrote:
I'm not sure if this is possible with the current infrastructure, and I only looked through the strace code base briefly... But the idea would be to somehow register a file descriptor as having been created by `inotify_init/inotify_init1`, and then reads from this file descriptor would show the decoded `struct inotify_event` instead of interpreting it as a string.
These descriptors could be identified using readlink of /proc/$pid/fd/$fd,
strace already employs this method for other purposes, so yes, this should
be technically possible.
|
Oh, that sounds great! I will try my hand at implementing it, then. Thanks for the quick answer. |
Interesting. I studied how to store information in /proc/$pid/fdinfo/$fd to the private fields of tcb for decoding ioctl about vfio. My code requires a change to the Linux kernel. So I didn't submit the result of the study to the strace mailing list. When decoding the buffer filled by read(2), you may want to know whether the fd
At a quick glance, you can use the information masatake@19bbc9d struct tcb has a field called Even if a user doesn't use -y option, you may want to decode the buffer. You can find all my changes in "Aug 27, 2021" in https://github.com/masatake/strace/commits/vfio-draft I hope my study helps you. |
When signalfds are used, normal signal handling method is not used causing strace unable to catch these signals and therefore unable to decode them. This patch adds a basic a support for signalfd fdinfo decoding. Decoding the buffer content needs more patch but there's also previous work byh esyr and masatake (see github strace#199). - decode-fds arguments and switches - improved signalfd4 tests
When signalfds are used, normal signal handling method is not used causing strace unable to catch these signals and therefore unable to decode them. This patch adds a basic a support for signalfd fdinfo decoding. Decoding the buffer content needs more patch but there's also previous work byh esyr and masatake (see github strace#199). - decode-fds arguments and switches - improved signalfd4 tests
When signalfds are used, normal signal handling method is not used causing strace unable to catch these signals and therefore unable to decode them. This patch adds a basic a support for signalfd fdinfo decoding. Decoding the buffer content needs more patch but there's also previous work byh esyr and masatake (see github strace#199). Signed-off-by: leedagee <leedageea@gmail.com>
When signalfds are used, normal signal handling method is not used causing strace unable to catch these signals and therefore unable to decode them. This patch adds a basic a support for signalfd fdinfo decoding. Decoding the buffer content needs more patch but there's also previous work byh esyr and masatake (see github strace#199). Signed-off-by: leedagee <leedageea@gmail.com>
I'm not sure if this is possible with the current infrastructure, and I only looked through the strace code base briefly... But the idea would be to somehow register a file descriptor as having been created by
inotify_init/inotify_init1
, and then reads from this file descriptor would show the decodedstruct inotify_event
instead of interpreting it as a string.The text was updated successfully, but these errors were encountered: