[PATCH] powerpc/mm/coproc: Handle bad address on coproc slb fault

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3542d

4 messages, 4 authors, 2016-11-25 · open the first message on its own page

[PATCH] powerpc/mm/coproc: Handle bad address on coproc slb fault

From: Aneesh Kumar K.V <hidden>
Date: 2016-11-15 15:06:26

VSID 0 is bad address. Don't create slb entries on coproc fault for
bad address

Signed-off-by: Aneesh Kumar K.V <redacted>
---
NOTE: note tested

 arch/powerpc/mm/copro_fault.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/mm/copro_fault.c b/arch/powerpc/mm/copro_fault.c
index 362954f98029..aaa7ec6788b9 100644
--- a/arch/powerpc/mm/copro_fault.c
+++ b/arch/powerpc/mm/copro_fault.c
@@ -134,6 +134,9 @@ int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb)
 		pr_debug("%s: invalid region access at %016llx\n", __func__, ea);
 		return 1;
 	}
+	/* Bad address */
+	if (!vsid)
+		return 1;
 
 	vsid = (vsid << slb_vsid_shift(ssize)) | vsidkey;
 
-- 
2.10.2

Re: [PATCH] powerpc/mm/coproc: Handle bad address on coproc slb fault

From: Balbir Singh <bsingharora@gmail.com>
Date: 2016-11-16 00:08:12


On 16/11/16 02:06, Aneesh Kumar K.V wrote:
VSID 0 is bad address. Don't create slb entries on coproc fault for
bad address

Signed-off-by: Aneesh Kumar K.V <redacted>
---
NOTE: note tested
        ^^^ ?
quoted hunk
 arch/powerpc/mm/copro_fault.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/mm/copro_fault.c b/arch/powerpc/mm/copro_fault.c
index 362954f98029..aaa7ec6788b9 100644
--- a/arch/powerpc/mm/copro_fault.c
+++ b/arch/powerpc/mm/copro_fault.c
@@ -134,6 +134,9 @@ int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb)
 		pr_debug("%s: invalid region access at %016llx\n", __func__, ea);
 		return 1;
 	}
+	/* Bad address */
+	if (!vsid)
+		return 1;

Reviewed-by: Balbir Singh <bsingharora@gmail.com>

Balbir Singh.

Re: [PATCH] powerpc/mm/coproc: Handle bad address on coproc slb fault

From: Ian Munsie <hidden>
Date: 2016-11-16 01:12:01

Reviewed-by: Ian Munsie <redacted>

Re: powerpc/mm/coproc: Handle bad address on coproc slb fault

From: Michael Ellerman <hidden>
Date: 2016-11-25 00:04:10

On Tue, 2016-11-15 at 15:06:06 UTC, "Aneesh Kumar K.V" wrote:
VSID 0 is bad address. Don't create slb entries on coproc fault for
bad address

Signed-off-by: Aneesh Kumar K.V <redacted>
Reviewed-by: Balbir Singh <bsingharora@gmail.com>
Reviewed-by: Ian Munsie <redacted>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/64168f4296fa507ba059307984cddc

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help