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]
Date:   Wed, 22 Dec 2021 07:36:29 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Segher Boessenkool <segher@...nel.crashing.org>
CC:     Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        "masahiroy@...nel.org" <masahiroy@...nel.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] powerpc/vdso: augment VDSO32 functions to support 64
 bits build



Le 21/12/2021 à 20:36, Segher Boessenkool a écrit :
> On Tue, Dec 21, 2021 at 05:49:33PM +0000, Christophe Leroy wrote:
>> diff --git a/arch/powerpc/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S
>> index 65244416ab94..db8e167f0166 100644
>> --- a/arch/powerpc/kernel/vdso32/datapage.S
>> +++ b/arch/powerpc/kernel/vdso32/datapage.S
>> @@ -30,11 +30,15 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
>>   	mr.	r4,r3
>>   	get_datapage	r3
>>   	mtlr	r12
>> +#ifdef __powerpc64__
>> +	addi	r3,r3,CFG_SYSCALL_MAP64
>> +#else
>>   	addi	r3,r3,CFG_SYSCALL_MAP32
>> +#endif
>> +	crclr	cr0*4+so
>>   	beqlr
>>   	li	r0,NR_syscalls
>>   	stw	r0,0(r4)
>> -	crclr	cr0*4+so
>>   	blr
> 
> This now clears cr0.3 if r3 is zero on entry.  Is that on purpose?

All crclr where added by commit 5d66da3d71e6 ("[PATCH] powerpc: Make the 
vDSO functions set error code (#2)")

It looks like it was properly added to ppc64's version of 
__kernel_get_syscall_map() but for ppc32 CR.SO was left undefined in 
case of early exit of __kernel_get_syscall_map()

So yes, I think the change is on purpose.

> 
> Rest looks good.
> 
> Reviewed-by: Segher Boessenkool <segher@...nel.crashing.org>
> 

Thanks
Christophe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ