Skip to content

Conversation

@hujun260
Copy link
Contributor

Summary

This pull request adds support for the SYSCALL_HOOKS architecture capability to the TriCore platform. SYSCALL_HOOKS allows the system to intercept and hook system calls at runtime, enabling advanced debugging, tracing, and profiling capabilities for applications running on TriCore processors.

Changes Made

  • Enabled ARCH_HAVE_SYSCALL_HOOKS capability flag in TriCore architecture configuration
  • Single line change in arch/Kconfig to enable the syscall hooks feature

Impact

  • Functionality: Enables syscall hooking infrastructure for TriCore platform
  • Debugging: Allows runtime monitoring and instrumentation of system calls
  • Performance: No performance impact - feature is optional and only used when explicitly configured
  • Compatibility: Fully backward compatible, existing configurations unaffected

Technical Details

What are SYSCALL_HOOKS?

  • A mechanism for intercepting and modifying system call execution
  • Useful for implementing system call tracing, profiling, and security monitoring
  • Already supported by other NuttX architectures (ARM, RISC-V, etc.)

Why add to TriCore?

  • Enables feature parity with other supported architectures
  • Allows TriCore applications to use advanced debugging and profiling tools
  • Supports system call instrumentation for performance analysis

Testing Procedures

  1. Build Tests:

    • Verify TriCore architecture builds successfully with ARCH_HAVE_SYSCALL_HOOKS enabled
    • Test both with and without syscall hooks feature configured
  2. Functional Tests (if applicable):

    • Configure CONFIG_SYSCALL_HOOKS and test system call interception
    • Verify system calls execute correctly through hooked path
    • Test profiling/tracing tools that depend on syscall hooks
  3. Compatibility Tests:

    • Verify existing TriCore applications run unchanged
    • Confirm no regression in system call performance

Verification Checklist

  • Code builds without warnings or errors
  • Configuration flag correctly enabled in arch/Kconfig
  • No functional changes to existing TriCore code
  • Feature aligns with other NuttX architecture implementations
  • Documentation comment explains purpose of change
  • Backward compatible with existing configurations

Related Changes

This change aligns TriCore support with feature capabilities already present in:

  • ARM architectures (arm64, cortex-a, cortex-m, cortex-r)
  • RISC-V
  • x86_64
  • Other mature NuttX platforms

Enable SYSCALL_HOOKS architecture capability for TriCore platform.
This allows runtime interception and hooking of system calls on
TriCore architecture, enabling profiling, tracing, and debugging features.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
@github-actions github-actions bot added the Size: XS The size of the change in this PR is very small label Jan 26, 2026
@Donny9 Donny9 merged commit 226443f into apache:master Jan 26, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants