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:   Sat, 25 Jan 2020 14:00:52 +0100
From:   Christophe Leroy <christophe.leroy@....fr>
To:     Michael Ellerman <mpe@...erman.id.au>
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        Paul Mackerras <paulus@...ba.org>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: [PATCH] powerpc/32: Add missing context synchronisation with
 CONFIG_VMAP_STACK

Michael Ellerman <mpe@...erman.id.au> a écrit :

> Christophe Leroy <christophe.leroy@....fr> writes:
>> After reactivation of data translation by modifying MSR[DR], a isync
>> is required to ensure the translation is effective.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>
>> ---
>> Rebased on powerpc/merge-test
>>
>> @mpe: If not too late:
>> - change to head_32.h should be squashed into "powerpc/32: prepare  
>> for CONFIG_VMAP_STACK"
>> - change to head_32.S should be squashed into "powerpc/32s: Enable  
>> CONFIG_VMAP_STACK"
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>
>> ---
>>  arch/powerpc/kernel/head_32.S | 1 +
>>  arch/powerpc/kernel/head_32.h | 2 ++
>>  2 files changed, 3 insertions(+)
>>
>> diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h
>> index 73a035b40dbf..a6a5fbbf8504 100644
>> --- a/arch/powerpc/kernel/head_32.h
>> +++ b/arch/powerpc/kernel/head_32.h
>> @@ -43,6 +43,7 @@
>>  	.ifeq	\for_rtas
>>  	li	r11, MSR_KERNEL & ~(MSR_IR | MSR_RI) /* can take DTLB miss */
>>  	mtmsr	r11
>> +	isync
>
> Actually this one leads to:
>
>   /home/michael/linux/arch/powerpc/kernel/head_8xx.S: Assembler messages:
>   /home/michael/linux/arch/powerpc/kernel/head_8xx.S:151: Error:  
> attempt to move .org backwards
>   make[3]: *** [/home/michael/linux/scripts/Makefile.build:348:  
> arch/powerpc/kernel/head_8xx.o] Error 1
>
> For mpc885_ads_defconfig.
>
> That's the alignment exception overflowing into the program check
> handler:
>
> /* Alignment exception */
> 	. = 0x600
> Alignment:
> 	EXCEPTION_PROLOG handle_dar_dsisr=1
> 	save_dar_dsisr_on_stack r4, r5, r11
> 	li	r6, RPN_PATTERN
> 	mtspr	SPRN_DAR, r6	/* Tag DAR, to be used in DTLB Error */
> 	addi	r3,r1,STACK_FRAME_OVERHEAD
> 	EXC_XFER_STD(0x600, alignment_exception)
>
> /* Program check exception */
> 	EXCEPTION(0x700, ProgramCheck, program_check_exception, EXC_XFER_STD)
>
>
> Can't see an obvious/easy way to fix it.

Argh !

I think the easiest is to move the EXC_XFER_STD(0x600,  
alignment_exception) somewhere else and branch to it. There is some  
space at .0xa00

Christophe

PS: I'm afk until monday

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ