projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
312df5f
)
[PATCH] x86_64: check if ptrace RIP is canonical
author
Andi Kleen
<ak@suse.de>
Tue, 17 May 2005 04:53:29 +0000
(21:53 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Tue, 17 May 2005 14:59:15 +0000
(07:59 -0700)
This works around an AMD Erratum.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/ptrace.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86_64/kernel/ptrace.c
b/arch/x86_64/kernel/ptrace.c
index e26e86bb56fe53381e2016e4f478dbdc37ec0294..892212161aa86410cd3166a0919de74f1cd37951 100644
(file)
--- a/
arch/x86_64/kernel/ptrace.c
+++ b/
arch/x86_64/kernel/ptrace.c
@@
-277,6
+277,11
@@
static int putreg(struct task_struct *child,
return -EIO;
value &= 0xffff;
break;
+ case offsetof(struct user_regs_struct, rip):
+ /* Check if the new RIP address is canonical */
+ if (value >= TASK_SIZE)
+ return -EIO;
+ break;
}
put_stack_long(child, regno - sizeof(struct pt_regs), value);
return 0;