On 27/01/2026 04:01, Jinjie Ruan wrote: >> I understand that you're gradually making the arch code more similar to >> the core code so that we can switch over to it, but I'm struggling to >> understand why syscall_trace_enter() takes the 'syscall' argument. >> >> Even the core code just seems to use it as a local variable, which it >> overrides before it ever uses it. What am I missing? > Hi, > > You're absolutely right. The 'syscall' parameter is indeed treated as a > local variable and gets overridden before any real use. Should we > refactor to remove the parameter entirely in generic entry?
I noticed this as well, removing it from the generic function would make sense. AFAICT that removal could be propagated quite far in fact: syscall_enter_from_user_mode_work(), syscall_enter_from_user_mode(), even arch implementation (do_syscall_64() on x86). - Kevin

