From: kernel test robot <lkp@intel.com>
To: Will Deacon <will@kernel.org>, linux-arm-kernel@lists.infradead.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>,
Kees Cook <kees@kernel.org>, Jinjie Ruan <ruanjinjie@huawei.com>,
Mark Rutland <mark.rutland@arm.com>,
Yiqi Sun <sunyiqixm@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH] arm64: syscall: Ensure saved x0 is kept in-sync with tracer updates
Date: Thu, 20 Aug 2026 14:54:50 +0800 [thread overview]
Message-ID: <202608201418.4wnOzo3P-lkp@intel.com> (raw)
In-Reply-To: <20260714143600.23853-1-will@kernel.org>
Hi Will,
kernel test robot noticed the following build errors:
[auto build test ERROR on linux-review/Yiqi-Sun/arm64-ptrace-use-live-x0-for-seccomp-and-audit-after-ptrace/20260815-210721]
url: https://github.com/intel-lab-lkp/linux/commits/Will-Deacon/arm64-syscall-Ensure-saved-x0-is-kept-in-sync-with-tracer-updates/20260815-220235
base: https://github.com/intel-lab-lkp/linux Yiqi-Sun/arm64-ptrace-use-live-x0-for-seccomp-and-audit-after-ptrace/20260815-210721
patch link: https://lore.kernel.org/r/20260714143600.23853-1-will%40kernel.org
patch subject: [PATCH] arm64: syscall: Ensure saved x0 is kept in-sync with tracer updates
config: arm64-randconfig-001-20260820 (https://download.01.org/0day-ci/archive/20260820/202608201418.4wnOzo3P-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 935bfc708590c60147a79c7df145bb6e68b1d388)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260820/202608201418.4wnOzo3P-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608201418.4wnOzo3P-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/arm64/kernel/ptrace.c:2461:13: error: conflicting types for 'update_syscall_orig_x0_after_ptrace'
2461 | static void update_syscall_orig_x0_after_ptrace(struct pt_regs *regs)
| ^
arch/arm64/kernel/ptrace.c:563:13: note: previous definition is here
563 | static void update_syscall_orig_x0_after_ptrace(struct task_struct *target)
| ^
>> arch/arm64/kernel/ptrace.c:2490:39: error: incompatible pointer types passing 'struct pt_regs *' to parameter of type 'struct task_struct *' [-Wincompatible-pointer-types]
2490 | update_syscall_orig_x0_after_ptrace(regs);
| ^~~~
arch/arm64/kernel/ptrace.c:563:69: note: passing argument to parameter 'target' here
563 | static void update_syscall_orig_x0_after_ptrace(struct task_struct *target)
| ^
arch/arm64/kernel/ptrace.c:2498:38: error: incompatible pointer types passing 'struct pt_regs *' to parameter of type 'struct task_struct *' [-Wincompatible-pointer-types]
2498 | update_syscall_orig_x0_after_ptrace(regs);
| ^~~~
arch/arm64/kernel/ptrace.c:563:69: note: passing argument to parameter 'target' here
563 | static void update_syscall_orig_x0_after_ptrace(struct task_struct *target)
| ^
3 errors generated.
vim +/update_syscall_orig_x0_after_ptrace +2461 arch/arm64/kernel/ptrace.c
2460
> 2461 static void update_syscall_orig_x0_after_ptrace(struct pt_regs *regs)
2462 {
2463 /*
2464 * Keep orig_x0 authoritative so that seccomp (via
2465 * syscall_get_arguments()), audit and the restart path all see the same
2466 * first argument the syscall is dispatched with, even if it has been
2467 * updated by a tracer. Skip this for NO_SYSCALL (set either by the user
2468 * or the tracer), as regs[0] holds the return value (see the comment in
2469 * el0_svc_common()) and can be unwound using syscall_rollback().
2470 * For compat tasks, orig_r0 is provided directly through GPR index 17.
2471 */
2472 if (!is_compat_task() && regs->syscallno != NO_SYSCALL)
2473 regs->orig_x0 = regs->regs[0];
2474 }
2475
2476 int syscall_trace_enter(struct pt_regs *regs)
2477 {
2478 unsigned long flags = read_thread_flags();
2479 int ret;
2480
2481 if (flags & (_TIF_SYSCALL_EMU | _TIF_SYSCALL_TRACE)) {
2482 ret = report_syscall_entry(regs);
2483 if (ret || (flags & _TIF_SYSCALL_EMU))
2484 return NO_SYSCALL;
2485
2486 /*
2487 * Ensure ptrace changes to x0 are visible to seccomp
2488 * ptrace exits (SECCOMP_RET_TRACE).
2489 */
> 2490 update_syscall_orig_x0_after_ptrace(regs);
2491 }
2492
2493 /* Do the secure computing after ptrace; failures should be fast. */
2494 if (secure_computing() == -1)
2495 return NO_SYSCALL;
2496
2497 /* Ensure seccomp updates to x0 are visible to audit. */
2498 update_syscall_orig_x0_after_ptrace(regs);
2499
2500 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
2501 trace_sys_enter(regs, regs->syscallno);
2502
2503 audit_syscall_entry(regs->syscallno, regs->regs[0], regs->regs[1],
2504 regs->regs[2], regs->regs[3]);
2505
2506 return regs->syscallno;
2507 }
2508
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-08-20 6:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 14:35 [PATCH] arm64: syscall: Ensure saved x0 is kept in-sync with tracer updates Will Deacon
2026-07-15 11:39 ` Jinjie Ruan
2026-07-15 13:16 ` Will Deacon
2026-07-16 2:09 ` Jinjie Ruan
2026-07-16 11:50 ` Will Deacon
2026-07-16 2:57 ` Jinjie Ruan
2026-07-16 3:05 ` Kees Cook
2026-07-16 3:25 ` Jinjie Ruan
2026-07-16 11:53 ` Will Deacon
2026-07-16 12:04 ` Jinjie Ruan
2026-08-20 6:54 ` kernel test robot [this message]
2026-08-20 11:25 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-08-17 6:21 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202608201418.4wnOzo3P-lkp@intel.com \
--to=lkp@intel.com \
--cc=catalin.marinas@arm.com \
--cc=kees@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mark.rutland@arm.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ruanjinjie@huawei.com \
--cc=sunyiqixm@gmail.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.