Skip to content

Commit ac157b4

Browse files
bcc: Use direct parameter assignment for syscall probe s390.
1. Commit fa697140f9a2 ("syscalls/x86: Use 'struct pt_regs' based syscall calling convention for 64-bit syscalls") changed the raw parameter passed to the syscall entry function from a list of parameters supplied in user space to a single `pt_regs *` parameter (ARCH_HAS_SYSCALL_WRAPPER) 2. But ARCH_HAS_SYSCALL_WRAPPER in s390 is not used for that purpose. See commit a18f03cd89e9 ("s390: autogenerate compat syscall wrappers") 3. Use direct parameter assignment assumption for s390 syscall probe instead. Signed-off-by: Sumanth Korikkar <[email protected]>
1 parent 264b2cc commit ac157b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cc/frontends/clang/b_frontend_action.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ void BTypeVisitor::rewriteFuncParam(FunctionDecl *D) {
726726
// it in case of "syscall__" for other architectures.
727727
if (strncmp(D->getName().str().c_str(), "syscall__", 9) == 0 ||
728728
strncmp(D->getName().str().c_str(), "kprobe____x64_sys_", 18) == 0) {
729-
preamble += "#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER\n";
729+
preamble += "#if defined(CONFIG_ARCH_HAS_SYSCALL_WRAPPER) && !defined(__s390x__)\n";
730730
genParamIndirectAssign(D, preamble, calling_conv_regs);
731731
preamble += "\n#else\n";
732732
genParamDirectAssign(D, preamble, calling_conv_regs);

0 commit comments

Comments
 (0)