public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale•com>
To: Jia Hongtao-B38951 <B38951@freescale•com>
Cc: Wood Scott-B07421 <B07421@freescale•com>,
	David Laight <David.Laight@ACULAB•COM>,
	"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>,
	Stuart Yoder <b08248@gmail•com>
Subject: Re: [PATCH V4] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx
Date: Thu, 7 Mar 2013 10:37:47 -0600	[thread overview]
Message-ID: <1362674267.23227.1@snotra> (raw)
In-Reply-To: <412C8208B4A0464FA894C5F0C278CD5D01BFA1D0@039-SN1MPN1-002.039d.mgd.msft.net> (from B38951@freescale.com on Thu Mar  7 02:06:05 2013)

On 03/07/2013 02:06:05 AM, Jia Hongtao-B38951 wrote:
> Here is the ideas from Scott:
> "
> > +	if (is_in_pci_mem_space(addr)) {
> > +		inst =3D *(unsigned int *)regs->nip;
>=20
> Be careful about taking a fault here.  A simple TLB miss should be =20
> safe
> given that we shouldn't be accessing PCIe in the middle of exception
> code, but what if the mapping has gone away (e.g. a userspace driver =20
> had
> its code munmap()ed or swapped out)?  What if permissions allow =20
> execute
> but not read (not sure if Linux will allow this, but the hardware =20
> does)?
>=20
> What if it happened in a KVM guest?  You can't access guest addresses
> directly.
> "

That means you need to be careful about how you read the instruction, =20
not that you shouldn't do it at all.

-Scott=

  parent reply	other threads:[~2013-03-07 16:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04  8:40 [PATCH V4] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx Jia Hongtao
2013-03-04 16:16 ` Stuart Yoder
2013-03-04 23:45   ` Scott Wood
2013-03-05 10:12     ` Jia Hongtao-B38951
2013-03-05 18:47       ` Scott Wood
2013-03-06  8:28         ` Jia Hongtao-B38951
2013-03-06 10:24           ` David Laight
2013-03-07  8:06             ` Jia Hongtao-B38951
2013-03-07 10:04               ` David Laight
2013-03-07 16:37               ` Scott Wood [this message]
2013-03-08  8:01                 ` Jia Hongtao-B38951
2013-03-09  0:49                   ` Scott Wood
2013-03-12  7:40                     ` Jia Hongtao-B38951
2013-03-12  9:47                       ` David Laight
2013-03-12 21:24                       ` Scott Wood
2013-03-13  9:40                         ` David Laight
2013-03-13 16:37                           ` Scott Wood
2013-03-15  2:47                             ` Jia Hongtao-B38951
2013-03-15 16:34                               ` Scott Wood
2013-03-29  8:03                                 ` Jia Hongtao-B38951
2013-03-29 16:33                                   ` Scott Wood
2013-04-02  9:28                                     ` Jia Hongtao-B38951
2013-04-02 19:46                                       ` Scott Wood
2013-03-04 17:15 ` David Laight
2013-03-05 10:12   ` Jia Hongtao-B38951

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=1362674267.23227.1@snotra \
    --to=scottwood@freescale$(echo .)com \
    --cc=B07421@freescale$(echo .)com \
    --cc=B38951@freescale$(echo .)com \
    --cc=David.Laight@ACULAB$(echo .)COM \
    --cc=b08248@gmail$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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