]> sourceware.org Git - glibc.git/commitdiff
arm: align stack in clone [BZ 28020]
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 25 Jun 2021 18:58:59 +0000 (19:58 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 28 Jun 2021 10:35:44 +0000 (11:35 +0100)
The arm PCS requires 8 byte aligned stack at function entry.
Previously unaligned stack could crash the clone child.

Fixes bug 28020.

sysdeps/unix/sysv/linux/arm/clone.S

index 44eefee3fc299fefe7a5fa9ba94a37a8496f3ca2..05596cb7a5f3dd08b341c14466fc19f4c2df72de 100644 (file)
@@ -31,6 +31,8 @@
 ENTRY(__clone)
        @ sanity check args
        cmp     r0, #0
+       @ align sp
+       and     r1, r1, #-8
        ite     ne
        cmpne   r1, #0
        moveq   r0, #-EINVAL
This page took 0.045283 seconds and 5 git commands to generate.