lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <666db2a4-6015-46ac-8eba-565beff8b0c1@arm.com>
Date: Tue, 27 Jan 2026 15:54:35 +0100
From: Kevin Brodsky <kevin.brodsky@....com>
To: Jinjie Ruan <ruanjinjie@...wei.com>, Will Deacon <will@...nel.org>
Cc: catalin.marinas@....com, oleg@...hat.com, tglx@...utronix.de,
 peterz@...radead.org, luto@...nel.org, shuah@...nel.org, kees@...nel.org,
 wad@...omium.org, macro@...am.me.uk, charlie@...osinc.com,
 akpm@...ux-foundation.org, anshuman.khandual@....com, mark.rutland@....com,
 thuth@...hat.com, song@...nel.org, ryan.roberts@....com,
 ada.coupriediaz@....com, broonie@...nel.org, liqiang01@...inos.cn,
 pengcan@...inos.cn, kmal@...k.li, dvyukov@...gle.com,
 richard.weiyang@...il.com, reddybalavignesh9979@...il.com,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v10 04/16] arm64/ptrace: Refactor
 syscall_trace_enter/exit()

On 27/01/2026 12:02, Jinjie Ruan wrote:
>
> On 2026/1/27 17:43, Kevin Brodsky wrote:
>> 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).
> Not really, it is the default return value of
> syscall_enter_from_user_mode_work() as below, so we only need to remove
> the parameter in syscall_trace_enter().
>
> static __always_inline long syscall_enter_from_user_mode_work(struct
> pt_regs *regs, long syscall)
> {
> 	unsigned long work = READ_ONCE(current_thread_info()->syscall_work);
>
>        if (work & SYSCALL_WORK_ENTER)
>             syscall = syscall_trace_enter(regs, work);
>
>       return syscall;
> }

You're right, hadn't realised the call to syscall_trace_enter() was
conditional.

- Kevin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ