-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add support for watchpoint on kernel space address #1552
Conversation
03c8994
to
2bc1eb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch!
Can you update the changelog as well? Other than that and a small nit, LGTM.
2bc1eb0
to
49b7930
Compare
If using strtoll(), for integer which is larger than LONG_MAX (e.g. address in kernel space), strtoll() will return LONG_MAX unexpectedly. For negative integer, if it is not less than LONG_MIN, the negative integer support in parser will make strtoul() work. So use strtoul() instead. Signed-off-by: htbegin <hotforest@gmail.com>
If there is no related pid, we consider it as a watchpoint for address in kernel space and attach the bpf program to perf event on each online CPUs. Signed-off-by: htbegin <hotforest@gmail.com>
One case is used to demonstrate strtoul() still works for LONG_MIN, and another case is used to show ULONG_MAX can be parsed correctly. Signed-off-by: htbegin <hotforest@gmail.com>
The update of jiffies is necessary for kernel, so add a watchpoint on it for test purpose. Signed-off-by: htbegin <hotforest@gmail.com>
Signed-off-by: htbegin <hotforest@gmail.com>
Signed-off-by: htbegin <hotforest@gmail.com>
49b7930
to
f57d358
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fbs Do you think this should be a squash + rebase + merge or just rebase + merge?
Looking at the individual commit messages an rebase+merge seems ok to me. But for cases where its a simple |
Description
Add support for watchpoint on absolute kernel space address, so the following command can run correctly:
Checklist
docs/reference_guide.md
CHANGELOG.md