Re: Strange EFAULT on mips64el returned by syscall when another thread is forking
From: Jiaxun Yang
Date: Thu Jan 25 2024 - 04:31:43 EST
在2024年1月24日一月 下午10:10,Linus Torvalds写道:
[...]
>
> Anyway, I'm pretty sure this is the bug, now some MIPS person just
> needs to fix the MIPS version of "instruction_pointer()" to do what
> "exception_epc()" already does.
Hi folks,
Kinda MIPS person here, I looked into the problem, and it's not that
easy to fix.
I inspected some existing usage of "instruction_pointer()", and some
of them do want exception return address (which is always CP0_EPC).
Others like this case they want the precise exception instruction
pointer ("exception_epc()" for MIPS).
I'm planning to make "instruction_pointer()" always point to exception
instructions, and implemented a new function called "return_pc()"or
whatever for "exception_epc()". Do you have a better name in mind?
Besides isa16 stuff do require kernel to read user space fault
instruction to determine delay slot size... I don't think it's always
possible when "instruction_pointer()" is called. MIPS16/microMIPS
is rarely used today though.
Thanks
>
> Linus
--
- Jiaxun