summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3f1c604)
raw | patch | inline | side by side (parent: 3f1c604)
author | Jiangli Yuan <a6808c@motorola.com> | |
Wed, 10 Dec 2014 01:02:59 +0000 (17:02 -0800) | ||
committer | Elliott Hughes <enh@google.com> | |
Wed, 10 Dec 2014 18:47:01 +0000 (18:47 +0000) |
Directly save data into stack without properly adjustment
of stack point is dangous. For example, if a signal comes,
kernel will put sigframe into userspace's stack, which
will overwrite the saved data if sp is not adjusted properly.
Bug: 15195265
Change-Id: Iea0cadfd3b94d50cf40252ad52fe5950811b9192
Signed-off-by: Jiangli Yuan <a6808c@motorola.com>
of stack point is dangous. For example, if a signal comes,
kernel will put sigframe into userspace's stack, which
will overwrite the saved data if sp is not adjusted properly.
Bug: 15195265
Change-Id: Iea0cadfd3b94d50cf40252ad52fe5950811b9192
Signed-off-by: Jiangli Yuan <a6808c@motorola.com>
libc/arch-arm/bionic/__bionic_clone.S | patch | blob | history |
index f5cf9e0e34f3f911c50aa6f411316e6e879c36ea..b02a70992e734985768e839281932c315fafb21d 100644 (file)
ldmfd ip, {r4, r5, r6}
# store 'fn' and 'arg' to the child stack
- str r5, [r1, #-4]
- str r6, [r1, #-8]
+ stmdb r1!, {r5, r6}
# System call
ldr r7, =__NR_clone
1: # The child.
# Setting lr to 0 will make the unwinder stop at __start_thread
mov lr, #0
- ldr r0, [sp, #-4]
- ldr r1, [sp, #-8]
+ pop {r0, r1}
b __start_thread
END(__bionic_clone)
.hidden __bionic_clone