[PATCH] RFC: riscv: save the SR_SUM status over switches

Ben Dooks ben.dooks at codethink.co.uk
Mon Mar 22 12:05:12 GMT 2021


On 18/03/2021 17:42, Ben Dooks wrote:
> On 18/03/2021 16:57, Alex Ghiti wrote:
>> Hi Ben,
>>
>> Le 3/18/21 à 11:10 AM, Ben Dooks a écrit :
>>> When threads/tasks are switched we need to ensure the old execution's
>>> SR_SUM state is saved and the new thread has the old SR_SUM state
>>> restored.
>>>
>>> The issue is seen under heavy load especially with the syz-stress tool
>>> running, with crashes as follows in schedule_tail:
>>>
>>> Unable to handle kernel access to user memory without uaccess 
>>> routines at virtual address 000000002749f0d0
>>> Oops [#1]
>>> Modules linked in:

[snip]

I've had syz-stress running over the weekend now with no further
occurrence of the fault. I'll put the put_user() patch out now and
will further investigate flags over __switch_to()

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html



More information about the linux-riscv mailing list