From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Vegard Nossum <vegard.nossum@gmail•com>,
Pekka Enberg <penberg@cs•helsinki.fi>,
Ingo Molnar <mingo@elte•hu>
Cc: linux-next@vger•kernel.org, Nick Piggin <npiggin@suse•de>
Subject: linux-next: manual merge of the kmemcheck tree with the x86 tree
Date: Fri, 23 Jan 2009 15:44:09 +1100 [thread overview]
Message-ID: <20090123154409.e3d1cd1d.sfr@canb.auug.org.au> (raw)
Hi all,
Today's linux-next merge of the kmemcheck tree got a conflict in
arch/x86/mm/fault.c between commit do_page_fault ("x86: optimise x86's
do_page_fault (C entry point for the page fault path)") from the x86 tree
and commit 787ecfaa503dc63ff1831ddc74b15dad49bace1d ("x86: add hooks for
kmemcheck") from the kmemcheck tree.
I fixed it up (see below) but it is worth a check. I can carry the fix
as necessary.
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/
diff --cc arch/x86/mm/fault.c
index d3eee74,c73afbb..0000000
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@@ -806,7 -602,16 +807,14 @@@ void __kprobes do_page_fault(struct pt_
/* get the address */
address = read_cr2();
- si_code = SEGV_MAPERR;
-
+ /*
+ * Detect and handle instructions that would cause a page fault for
+ * both a tracked kernel page and a userspace page.
+ */
+ if(kmemcheck_active(regs))
+ kmemcheck_hide(regs);
+
- if (notify_page_fault(regs))
+ if (unlikely(notify_page_fault(regs)))
return;
if (unlikely(kmmio_fault(regs, address)))
return;
@@@ -829,12 -634,16 +837,16 @@@
#else
if (unlikely(address >= TASK_SIZE64)) {
#endif
- if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) &&
- vmalloc_fault(address) >= 0)
- return;
+ if (!(error_code & (PF_RSVD | PF_USER | PF_PROT))) {
+ if (vmalloc_fault(address) >= 0)
+ return;
+
+ if (kmemcheck_fault(regs, address, error_code))
+ return;
+ }
/* Can handle a stale RO->RW TLB */
- if (spurious_fault(address, error_code))
+ if (spurious_fault(error_code, address))
return;
/*
next reply other threads:[~2009-01-23 4:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 4:44 Stephen Rothwell [this message]
2009-01-23 14:21 ` linux-next: manual merge of the kmemcheck tree with the x86 tree Pekka Enberg
2009-01-23 15:53 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2009-03-06 6:04 Stephen Rothwell
2009-03-06 6:19 Stephen Rothwell
2009-03-06 6:24 Stephen Rothwell
2009-03-19 7:49 Stephen Rothwell
2009-06-01 7:55 Stephen Rothwell
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=20090123154409.e3d1cd1d.sfr@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mingo@elte$(echo .)hu \
--cc=npiggin@suse$(echo .)de \
--cc=penberg@cs$(echo .)helsinki.fi \
--cc=vegard.nossum@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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