-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use correct arch register for the 4th param of x86_64 syscalls
Fix #3150 On x86_64, for syscalls, the calling convension is to use r10 instead of rcx for the 4th parameter. I have verified this with disassembling vmlinux codes. https://www.systutorials.com/x86-64-calling-convention-by-gcc/ bcc previously used rcx for the 4th parameter for all cases. This patch fixed the issue by using r10 for syscalls. A macro PT_REGS_PARM4_SYSCALL() is also introduced in helpers.h to access the 4th parameter for r10. Signed-off-by: Yonghong Song <yhs@fb.com>
- Loading branch information
1 parent
ad5b82a
commit 12107c6
Showing
4 changed files
with
25 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters