From: hyl <heyongli@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Sparc miss chance to fix recoverable fault in copy_from_user
Date: Wed, 12 Aug 2009 09:53:01 +0800 [thread overview]
Message-ID: <505766fa0908111853y7030399ewb07d4cec6829fd16@mail.gmail.com> (raw)
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
next reply other threads:[~2009-08-12 1:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-12 1:53 hyl [this message]
2009-08-13 19:48 ` David Miller
2009-08-14 3:16 ` hyl
2009-08-14 3:29 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505766fa0908111853y7030399ewb07d4cec6829fd16@mail.gmail.com \
--to=heyongli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®