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
Kirill Smelkov
linux
Commits
785d3cd2
Commit
785d3cd2
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: prevent some functions involved with kprobes from being probed
Signed-off-by:
Nicolas Pitre
<
nico@marvell.com
>
parent
d30a0c8b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
13 deletions
+20
-13
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-armv.S
+7
-1
arch/arm/kernel/kprobes.c
arch/arm/kernel/kprobes.c
+1
-1
arch/arm/kernel/traps.c
arch/arm/kernel/traps.c
+0
-9
arch/arm/kernel/vmlinux.lds.S
arch/arm/kernel/vmlinux.lds.S
+1
-0
arch/arm/mm/fault.c
arch/arm/mm/fault.c
+2
-2
include/asm-arm/traps.h
include/asm-arm/traps.h
+9
-0
No files found.
arch/arm/kernel/entry-armv.S
View file @
785d3cd2
...
...
@@ -58,6 +58,12 @@
.
endm
#ifdef CONFIG_KPROBES
.
section
.
kprobes
.
text
,
"ax"
,%
progbits
#else
.
text
#endif
/*
*
Invalid
mode
handlers
*/
...
...
@@ -562,7 +568,7 @@ do_fpe:
.
data
ENTRY
(
fp_enter
)
.
word
no_fp
.
text
.
previous
no_fp
:
mov
pc
,
lr
...
...
arch/arm/kernel/kprobes.c
View file @
785d3cd2
...
...
@@ -55,7 +55,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
unsigned
long
addr
=
(
unsigned
long
)
p
->
addr
;
int
is
;
if
(
addr
&
0x3
)
if
(
addr
&
0x3
||
in_exception_text
(
addr
)
)
return
-
EINVAL
;
insn
=
*
p
->
addr
;
...
...
arch/arm/kernel/traps.c
View file @
785d3cd2
...
...
@@ -46,15 +46,6 @@ __setup("user_debug=", user_debug_setup);
static
void
dump_mem
(
const
char
*
str
,
unsigned
long
bottom
,
unsigned
long
top
);
static
inline
int
in_exception_text
(
unsigned
long
ptr
)
{
extern
char
__exception_text_start
[];
extern
char
__exception_text_end
[];
return
ptr
>=
(
unsigned
long
)
&
__exception_text_start
&&
ptr
<
(
unsigned
long
)
&
__exception_text_end
;
}
void
dump_backtrace_entry
(
unsigned
long
where
,
unsigned
long
from
,
unsigned
long
frame
)
{
#ifdef CONFIG_KALLSYMS
...
...
arch/arm/kernel/vmlinux.lds.S
View file @
785d3cd2
...
...
@@ -94,6 +94,7 @@ SECTIONS
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
#ifdef CONFIG_MMU
*(.
fixup
)
#endif
...
...
arch/arm/mm/fault.c
View file @
785d3cd2
...
...
@@ -239,7 +239,7 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
return
fault
;
}
static
int
static
int
__kprobes
do_page_fault
(
unsigned
long
addr
,
unsigned
int
fsr
,
struct
pt_regs
*
regs
)
{
struct
task_struct
*
tsk
;
...
...
@@ -338,7 +338,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
* interrupt or a critical region, and should only copy the information
* from the master page table, nothing more.
*/
static
int
static
int
__kprobes
do_translation_fault
(
unsigned
long
addr
,
unsigned
int
fsr
,
struct
pt_regs
*
regs
)
{
...
...
include/asm-arm/traps.h
View file @
785d3cd2
...
...
@@ -15,4 +15,13 @@ struct undef_hook {
void
register_undef_hook
(
struct
undef_hook
*
hook
);
void
unregister_undef_hook
(
struct
undef_hook
*
hook
);
static
inline
int
in_exception_text
(
unsigned
long
ptr
)
{
extern
char
__exception_text_start
[];
extern
char
__exception_text_end
[];
return
ptr
>=
(
unsigned
long
)
&
__exception_text_start
&&
ptr
<
(
unsigned
long
)
&
__exception_text_end
;
}
#endif
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