From: Jacques de Laval <jacques.delaval@protonmail.com>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: Scott Wood <oss@buserror.net>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: instruction storage exception handling
Date: Thu, 28 Oct 2021 09:08:37 +0000 [thread overview]
Message-ID: <VFoVC_F_r-pD62fs3PMz16KfdtzX-4Sa6QajxxabOAnilDnV_olPSFbVVmYsWUeH4BUxcI7YaJ4RnKKhdqhqOLEopCeFZrqEcjJLyJlyX_I=@protonmail.com> (raw)
In-Reply-To: <1635389034.knz9p2g41k.astroid@bobo.none>
On Thursday, October 28th, 2021 at 5:01 AM, Nicholas Piggin <npiggin@gmail.com> wrote:
> Excerpts from Jacques de Laval's message of October 27, 2021 10:03 pm:
>
> > On Wednesday, October 27th, 2021 at 9:52 AM, Christophe Leroy christophe.leroy@csgroup.eu wrote:
> >
> > > Le 27/10/2021 à 09:47, Nicholas Piggin a écrit :
> > >
> > > > You're right. In that case it shouldn't change anything unless there
> > > >
> > > > was a BO fault. I'm not sure what the problem is then. Guessing based
> > > >
> > > > on the NIP and instructions, it looks like it's probably got the correct
> > > >
> > > > user address that it's storing into vmf on the stack, so it has got past
> > > >
> > > > the access checks so my theory would be wrong anyway.
> > > >
> > > > Must be something simple but I can't see it yet.
> > >
> > > Anyway, I think it is still worth doing the check with setting 0 in
> > >
> > > _ESR(r11), maybe the Reference Manual is wrong.
> > >
> > > So Jacques, please do the test anyway if you can.
> > >
> > > Thanks
> > >
> > > Christophe
> >
> > I tested with the last patch from Nicholas, and with that I can not
> >
> > reproduce the issue, so it seems like that solves it for my case and setup
> >
> > at least.
> >
> > Big thanks Christophe and Nicholas for looking in to this!
>
> Thanks for reporting and testing. We can certainly send this patch
>
> upstream to fix the regression, but I'm still not exactly sure what is
>
> going on. If it is an errata or part of specification we missed that
>
> could explain it but it would be good to understand and comment it.
>
> If you have time to test again with only the following patch applied,
>
> it might give a better clue. This patch should keep running but it
>
> would print some dmesg output.
>
> Thanks,
>
> Nick
>
> diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
>
> index a8d0ce85d39a..cf56f23ff90a 100644
>
> --- a/arch/powerpc/mm/fault.c
>
> +++ b/arch/powerpc/mm/fault.c
>
> @@ -548,6 +548,12 @@ static __always_inline void __do_page_fault(struct pt_regs *regs)
>
> DEFINE_INTERRUPT_HANDLER(do_page_fault)
>
> {
>
> - if (TRAP(regs) == INTERRUPT_INST_STORAGE) {
>
> - if (regs->dsisr != 0) {
>
>
> - printk("ISI pc:%lx msr:%lx dsisr:%lx ESR:%lx\\n", regs->nip, regs->msr, regs->dsisr, mfspr(SPRN_ESR));
>
>
> - regs->dsisr = 0; // fix?
>
>
> - }
>
>
> - }
>
> __do_page_fault(regs);
>
> }
>
As expected it keeps running. The output, and number of prints is naturally
a bit different from time to time, but dsisr/ESR is always 0x800000.
Here's a representative output from one run:
ISI pc:b789e6c0 msr:2d002 dsisr:800000 ESR:800000
ISI pc:b7884220 msr:2d002 dsisr:800000 ESR:800000
ISI pc:b78c18a4 msr:2d002 dsisr:800000 ESR:800000
ISI pc:55a238 msr:2f902 dsisr:800000 ESR:800000
ISI pc:412380 msr:2f902 dsisr:800000 ESR:800000
ISI pc:3aabe0 msr:2f902 dsisr:800000 ESR:800000
ISI pc:47a0e0 msr:2f902 dsisr:800000 ESR:800000
ISI pc:443290 msr:2f902 dsisr:800000 ESR:800000
ISI pc:43b350 msr:2d002 dsisr:800000 ESR:800000
Thanks,
Jacques
next prev parent reply other threads:[~2021-10-28 9:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <uqZVxyE3l9oalZp_hyXFJvdH-ADNTvpOuQeoNGyqrUcoNgh9afea1-FzfZKMgiaF5WxY4kdMQlJYzmjvdQ2E2joF86-mEcaxdifht9z8NA0=@protonmail.com>
2021-10-27 4:10 ` instruction storage exception handling Nicholas Piggin
2021-10-27 5:00 ` Christophe Leroy
2021-10-27 5:25 ` Nicholas Piggin
2021-10-27 5:51 ` Christophe Leroy
2021-10-27 7:47 ` Nicholas Piggin
2021-10-27 7:52 ` Christophe Leroy
2021-10-27 12:03 ` Jacques de Laval
2021-10-28 3:01 ` Nicholas Piggin
2021-10-28 9:08 ` Jacques de Laval [this message]
2021-10-28 9:35 ` Nicholas Piggin
2021-10-28 12:42 ` Nicholas Piggin
2021-10-26 22:44 Jacques de Laval
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='VFoVC_F_r-pD62fs3PMz16KfdtzX-4Sa6QajxxabOAnilDnV_olPSFbVVmYsWUeH4BUxcI7YaJ4RnKKhdqhqOLEopCeFZrqEcjJLyJlyX_I=@protonmail.com' \
--to=jacques.delaval@protonmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=oss@buserror.net \
/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;
as well as URLs for NNTP newsgroup(s).