If a cxl adapter faults on an invalid address for a kernel context, we
may enter copro_calculate_slb() with a NULL mm pointer (kernel
context) and an effective address which looks like a user
address. Which will cause a crash when dereferencing mm. It is clearly
an AFU bug, but there's no reason to crash either. So return an error,
so that cxl can ack the interrupt with an address error.
Signed-off-by: Frederic Barrat <redacted>
Cc: <redacted>
---
arch/powerpc/mm/copro_fault.c | 2 ++
1 file changed, 2 insertions(+)
ping? The patch still applies cleanly on recent trees.
Fred
Le 17/06/2016 à 18:53, Frederic Barrat a écrit :
quoted hunk
If a cxl adapter faults on an invalid address for a kernel context, we
may enter copro_calculate_slb() with a NULL mm pointer (kernel
context) and an effective address which looks like a user
address. Which will cause a crash when dereferencing mm. It is clearly
an AFU bug, but there's no reason to crash either. So return an error,
so that cxl can ack the interrupt with an address error.
Signed-off-by: Frederic Barrat <redacted>
Cc: <redacted>
---
arch/powerpc/mm/copro_fault.c | 2 ++
1 file changed, 2 insertions(+)
ping? The patch still applies cleanly on recent trees.
Fell through the cracks :/
Fixes: ?
Nothing obvious. Current code was introduced by
73d16a6e0e51990cbe13f8d8f43bd5329bbab30a
but it was apparently moved from cell, where the issue may not have
applied, I don't know. I guess we should use that id if really needed:
Fixes: 73d16a6e0e51 ("powerpc/cell: Move data segment faulting code out
of cell platform")
Fred
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2016-10-14 00:41:44
Frederic Barrat [off-list ref] writes:
Le 13/10/2016 =C3=A0 12:51, Michael Ellerman a =C3=A9crit :
quoted
Frederic Barrat [off-list ref] writes:
quoted
ping? The patch still applies cleanly on recent trees.
Fell through the cracks :/
Fixes: ?
Nothing obvious. Current code was introduced by=20
73d16a6e0e51990cbe13f8d8f43bd5329bbab30a
but it was apparently moved from cell, where the issue may not have=20
applied, I don't know. I guess we should use that id if really needed:
Fixes: 73d16a6e0e51 ("powerpc/cell: Move data segment faulting code out o=
f cell platform")
Yeah that works, it allows us to mechanically determine that "if you
have backported 73d16a6e0e51 then you need this fix", which can be
useful.
cheers
From: Michael Ellerman <hidden> Date: 2016-10-21 22:02:35
On Fri, 2016-17-06 at 16:53:28 UTC, Frederic Barrat wrote:
If a cxl adapter faults on an invalid address for a kernel context, we
may enter copro_calculate_slb() with a NULL mm pointer (kernel
context) and an effective address which looks like a user
address. Which will cause a crash when dereferencing mm. It is clearly
an AFU bug, but there's no reason to crash either. So return an error,
so that cxl can ack the interrupt with an address error.
Signed-off-by: Frederic Barrat <redacted>
Cc: <redacted>
Acked-by: Ian Munsie <redacted>