Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
25ce1dd7
Commit
25ce1dd7
authored
Dec 03, 2007
by
Nicolas Pitre
Committed by
Russell King
Jan 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM kprobes: add the kprobes hook to the page fault handler
Signed-off-by:
Nicolas Pitre
<
nico@marvell.com
>
parent
24ba613c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
arch/arm/mm/fault.c
arch/arm/mm/fault.c
+27
-0
No files found.
arch/arm/mm/fault.c
View file @
25ce1dd7
...
...
@@ -12,6 +12,7 @@
#include <linux/signal.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/kprobes.h>
#include <asm/system.h>
#include <asm/pgtable.h>
...
...
@@ -20,6 +21,29 @@
#include "fault.h"
#ifdef CONFIG_KPROBES
static
inline
int
notify_page_fault
(
struct
pt_regs
*
regs
,
unsigned
int
fsr
)
{
int
ret
=
0
;
if
(
!
user_mode
(
regs
))
{
/* kprobe_running() needs smp_processor_id() */
preempt_disable
();
if
(
kprobe_running
()
&&
kprobe_fault_handler
(
regs
,
fsr
))
ret
=
1
;
preempt_enable
();
}
return
ret
;
}
#else
static
inline
int
notify_page_fault
(
struct
pt_regs
*
regs
,
unsigned
int
fsr
)
{
return
0
;
}
#endif
/*
* This is useful to dump out the page tables associated with
* 'addr' in mm 'mm'.
...
...
@@ -222,6 +246,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
struct
mm_struct
*
mm
;
int
fault
,
sig
,
code
;
if
(
notify_page_fault
(
regs
,
fsr
))
return
0
;
tsk
=
current
;
mm
=
tsk
->
mm
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment