KUEP broken on FSP2?

Christophe Leroy christophe.leroy at csgroup.eu
Tue Oct 10 03:02:38 AEDT 2023



Le 09/10/2023 à 17:12, Eddie James a écrit :
> 
> On 10/9/23 08:14, Michael Ellerman wrote:
>> Eddie James <eajames at linux.ibm.com> writes:
>>> Hi,
>>>
>>> I'm attempting to run linux 6.1 on my FSP2, but my kernel crashes
>>> attempting to get into userspace. The init script works, but the first
>>> binary (mount) I run results in oops. Can anyone help me to debug this
>>> further or suggest anything?
>> Hi Eddie,
>>
>> It looks like breakage in syscall_exit_finish.
>> Can you test this? Patch is against v6.1.
> 
> 
> That worked! Perfect. Thank you very much! Will you send it upstream?

Well spotted Michael. Looks like I messed it up with commit 6f76a01173cc 
("powerpc/syscall: implement system call entry/exit logic in C for PPC32")

Thanks for fixing.

Christophe

> 
> 
> Thanks,
> 
> Eddie
> 
> 
>>
>> cheers
>>
>>
>> diff --git a/arch/powerpc/kernel/entry_32.S 
>> b/arch/powerpc/kernel/entry_32.S
>> index 3fc7c9886bb7..decd2594fb9c 100644
>> --- a/arch/powerpc/kernel/entry_32.S
>> +++ b/arch/powerpc/kernel/entry_32.S
>> @@ -135,7 +135,8 @@ ret_from_syscall:
>>       lis    r4,icache_44x_need_flush at ha
>>       lwz    r5,icache_44x_need_flush at l(r4)
>>       cmplwi    cr0,r5,0
>> -    bne-    2f
>> +    bne-    .L44x_icache_flush
>> +.L44x_icache_flush_return:
>>   #endif /* CONFIG_PPC_47x */
>>       kuep_unlock
>>       lwz    r4,_LINK(r1)
>> @@ -170,10 +171,11 @@ syscall_exit_finish:
>>       b    1b
>>   #ifdef CONFIG_44x
>> -2:    li    r7,0
>> +.L44x_icache_flush:
>> +    li    r7,0
>>       iccci    r0,r0
>>       stw    r7,icache_44x_need_flush at l(r4)
>> -    b    1b
>> +    b    .L44x_icache_flush_return
>>   #endif  /* CONFIG_44x */
>>       .globl    ret_from_fork


More information about the Linuxppc-dev mailing list