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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a383b3c6-e036-294e-5c62-c7719349c75c@huawei.com>
Date: Fri, 21 Nov 2025 15:29:53 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: Kevin Brodsky <kevin.brodsky@....com>, <catalin.marinas@....com>,
	<will@...nel.org>, <oleg@...hat.com>, <tglx@...utronix.de>,
	<peterz@...radead.org>, <luto@...nel.org>, <shuah@...nel.org>,
	<kees@...nel.org>, <wad@...omium.org>, <akpm@...ux-foundation.org>,
	<ldv@...ace.io>, <macro@...am.me.uk>, <deller@....de>,
	<mark.rutland@....com>, <song@...nel.org>, <mbenes@...e.cz>,
	<ryan.roberts@....com>, <ada.coupriediaz@....com>,
	<anshuman.khandual@....com>, <broonie@...nel.org>, <pengcan@...inos.cn>,
	<dvyukov@...gle.com>, <kmal@...k.li>, <lihongbo22@...wei.com>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
	<linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH v7 06/11] arm64/ptrace: Expand secure_computing() in place



On 2025/11/19 1:12, Kevin Brodsky wrote:
> On 17/11/2025 14:30, Jinjie Ruan wrote:
>> The generic entry expand secure_computing() in place and call
>> __secure_computing() directly.
>>
>> In order to switch to the generic entry for arm64, refactor
>> secure_computing() for syscall_trace_enter().
>>
>> No functional changes.
>>
>> Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
>> ---
>>  arch/arm64/kernel/ptrace.c | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
>> index 707951ad5d24..9af3046a2ce9 100644
>> --- a/arch/arm64/kernel/ptrace.c
>> +++ b/arch/arm64/kernel/ptrace.c
>> @@ -2387,8 +2387,11 @@ int syscall_trace_enter(struct pt_regs *regs, long syscall, unsigned long flags)
>>  	}
>>  
>>  	/* Do the secure computing after ptrace; failures should be fast. */
>> -	if (secure_computing() == -1)
>> -		return NO_SYSCALL;
>> +	if (flags & _TIF_SECCOMP) {
>> +		ret = __secure_computing(NULL);
> 
> No argument was passed to __secure_computing() in v6, as expected since
> it was removed in v6.15. Not sure why this NULL reappeared.
> 
There is a typo here.

>> +		if (ret == -1L)
> 
> ret is an int, so should be -1, not -1L.

Right, not -1L.

> 
> - Kevin
> 
>> +			return NO_SYSCALL;
>> +	}
>>  
>>  	/* Either of the above might have changed the syscall number */
>>  	syscall = syscall_get_nr(current, regs);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ