mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Sparc miss chance to fix recoverable fault in copy_from_user
@ 2009-08-12  1:53 hyl
  2009-08-13 19:48 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: hyl @ 2009-08-12  1:53 UTC (permalink / raw)
  To: linux-kernel

if kernel code access the invalid address, ie, copy_from_user then tlb
miss handler
finally report error in sunv4_dtlb_errorthen halt. instead of halt,
should call do_sparc64_fault
to fix such fault by search extable.

a dirty fix like this can work( little testing,just boot and test the
copy_from_user).


--- a/arch/sparc/kernel/sun4v_tlb_miss.S
+++ b/arch/sparc/kernel/sun4v_tlb_miss.S
@@ -124,7 +124,7 @@ sun4v_dtlb_load:
 	mov	%g3, %o2		! PTE
 	mov	HV_MMU_DMMU, %o3	! flags
 	ta	HV_MMU_MAP_ADDR_TRAP
-	brnz,pn	%o0, sun4v_dtlb_error
+	brnz,pn	%o0, sun4v_dtlb_prot
 	 mov	%g2, %o1		! restore %o1
 	mov	%g1, %o0		! restore %o0
 	mov	%g5, %o2		! restore %o2



am i miss understanding the merged sparc/spar64?

this problem found on sparc64, via a simple module just access address 0
via copy_from_user. another simple test is kgdb, issue a cmd:
x 0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-14  3:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-12  1:53 Sparc miss chance to fix recoverable fault in copy_from_user hyl
2009-08-13 19:48 ` David Miller
2009-08-14  3:16   ` hyl
2009-08-14  3:29     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®