mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jiaxun Yang" <jiaxun.yang@flygoat.com>
To: "Linus Torvalds" <torvalds@linux-foundation.org>,
	"Xi Ruoyao" <xry111@xry111.site>,
	tsbogend@alpha.franken.de
Cc: "Andreas Schwab" <schwab@suse.de>,
	"Ben Hutchings" <ben@decadent.org.uk>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	linux-kernel@vger.kernel.org, libc-alpha@sourceware.org
Subject: Re: Strange EFAULT on mips64el returned by syscall when another thread is forking
Date: Thu, 25 Jan 2024 09:28:41 +0000	[thread overview]
Message-ID: <00d1b813-c55f-4365-8d81-d70258e10b16@app.fastmail.com> (raw)
In-Reply-To: <CAHk-=whkEXGOCEZFO2vAZ9rDd8uW8MJwFNYg9KXaC_vZVso6iA@mail.gmail.com>



在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

  parent reply	other threads:[~2024-01-25  9:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 10:42 Xi Ruoyao
2024-01-24 11:59 ` Andreas Schwab
2024-01-24 12:49   ` Xi Ruoyao
2024-01-24 16:13     ` Xi Ruoyao
2024-01-24 21:32       ` Xi Ruoyao
2024-01-24 21:38         ` Xi Ruoyao
2024-01-24 21:54         ` Linus Torvalds
2024-01-24 22:10           ` Linus Torvalds
2024-01-24 22:42             ` Xi Ruoyao
2024-01-25  9:28             ` Jiaxun Yang [this message]
2024-01-26 12:33 ` Jiaxun Yang
2024-01-26 12:58   ` Xi Ruoyao
2024-01-26 18:00     ` Xi Ruoyao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00d1b813-c55f-4365-8d81-d70258e10b16@app.fastmail.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=ben@decadent.org.uk \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=schwab@suse.de \
    --cc=torvalds@linux-foundation.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®