Skip to content
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

fix incorrect arch register use for kprobe func with more parameters #3275

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

yonghong-song
Copy link
Collaborator

Commit 12107c6 ("use correct arch register for the
4th param of x86_64 syscalls") tries to use proper syscall
specific registers on x86_64 as its 4th param for syscall
is different from non-syscall. Unfortunately, the
implementation also uses syscall arch. register
for non-syscall kernel functions, which is incorrect.

This patch fixed the issue by using syscall arch
registers only for syscalls.

Reported-by: zhenwei pi pizhenwei@bytedance.com
Fixes: 12107c6 ("use correct arch register for the 4th param of x86_64 syscalls")
Signed-off-by: Yonghong Song yhs@fb.com

Commit 12107c6 ("use correct arch register for the
4th param of x86_64 syscalls") tries to use proper syscall
specific registers on x86_64 as its 4th param for syscall
is different from non-syscall. Unfortunately, the
implementation also uses syscall arch. register
for non-syscall kernel functions, which is incorrect.

This patch fixed the issue by using syscall arch
registers only for syscalls.

Reported-by: zhenwei pi <pizhenwei@bytedance.com>
Fixes: 12107c6 ("use correct arch register for the 4th param of x86_64 syscalls")
Signed-off-by: Yonghong Song <yhs@fb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant