[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eeb92d70-44d6-47f4-a059-66546be5f62a@flygoat.com>
Date: Sat, 3 Feb 2024 13:56:43 +0000
From: Jiaxun Yang <jiaxun.yang@...goat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...hat.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Ben Hutchings <ben@...adent.org.uk>, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
linux-mm@...ck.org, Xi Ruoyao <xry111@...111.site>
Subject: Re: [PATCH v2 0/3] Handle delay slot for extable lookup
在 2024/2/2 18:39, Linus Torvalds 写道:
> On Fri, 2 Feb 2024 at 04:30, Jiaxun Yang <jiaxun.yang@...goat.com> wrote:
>> ptrace: Introduce exception_ip arch hook
>> MIPS: Clear Cause.BD in instruction_pointer_set
>> mm/memory: Use exception ip to search exception tables
> Just to clarify: does that second patch fix the problem that
> __isa_exception_epc() does a __get_user()?
>
> Because that mm/memory.c use of "exception_ip()" most definitely
> cannot take a page fault.
I reconsidered this issue today and I believe that exception_ip() usage
here won't trigger
page_fault anyway.
Given that exception_ip is guarded by !user_mode(regs), EPC must points
to a kernel
text address. There is no way accessing kernel text will generate such
exception..
Thanks
>
> So if MIPS cannot do that whole exception IP thing without potentially
> touching user space, I do worry that we might just have to add a
>
> #ifndef __MIPS__
>
> around this all.
>
> Possibly somehow limited to just the microMIPS/MIPS16e case in Kconfig instead?
>
> Linus
--
---
Jiaxun Yang
Powered by blists - more mailing lists