powerpc/mm/coproc: Handle bad address on coproc slb fault
PATCH 1/1 powerpc/mm/coproc: Handle bad address on coproc slb fault
VSID 0 is bad address. Don't create slb entries on coproc fault for bad address
Signed-off-by Aneesh Kumar K.V <[email protected]>
---
NOTE: note tested
arch/powerpc/mm/copro_fault.c | 3 +++ 1 file changed, 3 insertions(+)
arch/powerpc/mm/copro_fault.c +3 -0
@@ -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;
Signature · 1 line
2.10.2
Quoted 6 lines · Aneesh Kumar K.V
VSID 0 is bad address. Don't create slb entries on coproc fault for bad address
Signed-off-by Aneesh Kumar K.V <[email protected]>---
NOTE: note tested
^^^ ?
Quoted 9 lines
arch/powerpc/mm/copro_fault.c | 3 +++ 1 file changed, 3 insertions(+)arch/powerpc/mm/copro_fault.c +0
-0
arch/powerpc/mm/copro_fault.c int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb) · line 139
Quoted 6 lines
arch/powerpc/mm/copro_fault.c +3
-0@@ -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 <[email protected]>
Balbir Singh.
Reviewed-by Ian Munsie <[email protected]>
Michael Ellerman
AppliedQuoted 6 lines · Aneesh Kumar K.V
VSID 0 is bad address. Don't create slb entries on coproc fault for bad address
Signed-off-by Aneesh Kumar K.V <[email protected]>Reviewed-by Balbir Singh <[email protected]>Reviewed-by Ian Munsie <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/64168f4296fa507ba059307984cddc
cheers