mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: 神田 尚 <hikanda@zlab.co.jp>
To: David Miller <davem@davemloft.net>
Cc: "sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] sparc64: Swap registers for fault code and address in mna trap
Date: Tue, 21 Jun 2016 10:36:42 +0000	[thread overview]
Message-ID: <TYXPR01MB05893FD71E27BA04B44B5625992B0@TYXPR01MB0589.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20160617.231234.1295900275353757289.davem@davemloft.net>

Hi, David

Thank you for your reply.

> If you can really trigger this code path, please post the kernel log
> backtrace that happens when the BUG() triggers.  That way we can
> figure out what the real problem is.
I'm sorry I cannot show the information. I don't have now.
In fact, BUG() in do_sparc64_fault occurred in modified version
of linux-2.6.25.8 on SPARC64VIIIfx. I'm misunderstanding that
the same problem remains in the latest. 

> Your patch is also wrong for other reasons, it would break the
> unaligned trap code paths that don't go via user_rtt_fill_64bit
> fixups.
And from the first, I was wrong. I got it.

I have some questions.
I think that if %tl > 1, winfix_mna will be called. Is it correct?
And, the call trace is never occurred?

________________________________________
From: David Miller <davem@davemloft.net>
Date: 2016年6月18日 15:12
To: 神田 尚
CC: sparclinux@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sparc64: Swap registers for fault code and address in mna trap

From: 神田 尚 <hikanda@zlab.co.jp>
Date: Fri, 17 Jun 2016 01:49:11 +0000

> This bug may occur in the following.
>
> user_rtt_fill_64bit          <= If mna trap occurred, call do_mna
> +-> do_mna                   <= Mistake storing registers for fault code and address
>     +-> winfix_mna
>         +-> user_rtt_fill_fixup  <= Put fault address into thread_info->flag's TI_FAULT_CODE
>             +-> do_sparc64_fault() <= If fault address has FAULT_CODE_ITLB and FAULT_CODE_DTLB bits, call BUG()
>                 +-> BUG()

We should not be invoking do_sparc64_fault() in this case.

Instead, we call either sun4v_do_mna() or mem_address_unaligned().

Neither of which care about the values stored in the thread's fault
address and code.

If you can really trigger this code path, please post the kernel log
backtrace that happens when the BUG() triggers.  That way we can
figure out what the real problem is.

Your patch is also wrong for other reasons, it would break the
unaligned trap code paths that don't go via user_rtt_fill_64bit
fixups.

  reply	other threads:[~2016-06-21 10:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17  1:49 神田 尚
2016-06-18  6:12 ` David Miller
2016-06-21 10:36   ` 神田 尚 [this message]
2016-06-22 18:48     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2016-06-21 17:03 Xose Vazquez Perez
2016-06-17  0:05 神田 尚
2016-06-17  0:47 ` Julian Calaby
     [not found] <CAEZrgNam=ZO5JEijHBkpDQvhULrymutHVyzY4P4wfhJvCb_hgA@mail.gmail.com>
2016-06-16 18:00 ` David Miller

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=TYXPR01MB05893FD71E27BA04B44B5625992B0@TYXPR01MB0589.jpnprd01.prod.outlook.com \
    --to=hikanda@zlab.co.jp \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    /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®