Thread (25 messages) 25 messages, 4 authors, 2013-04-02

Re: [PATCH V4] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx

From: Scott Wood <hidden>
Date: 2013-03-07 16:38:02

On 03/07/2013 02:06:05 AM, Jia Hongtao-B38951 wrote:
Here is the ideas from Scott:
"
quoted
+	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=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help