public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] ARC: align child stack in clone Date: Fri, 17 Feb 2023 19:15:30 +0000 (GMT) [thread overview] Message-ID: <20230217191530.123E93857B93@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=87abcf9a6e34d64f556b0b9d3ccd2689b2c2e0b6 commit 87abcf9a6e34d64f556b0b9d3ccd2689b2c2e0b6 Author: Pavel Kozlov <pavel.kozlov@synopsys.com> Date: Wed Dec 21 20:19:46 2022 +0400 ARC: align child stack in clone The ARCv2 ABI requires 4 byte stack pointer alignment. Don't allow to use unaligned child stack in clone. As the stack grows down, align it down. This was pointed by misc/tst-misalign-clone-internal and misc/tst-misalign-clone tests. Stack alignmet fixes these tests fails. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Diff: --- sysdeps/unix/sysv/linux/arc/clone.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/arc/clone.S b/sysdeps/unix/sysv/linux/arc/clone.S index e41a5942eb..7666496256 100644 --- a/sysdeps/unix/sysv/linux/arc/clone.S +++ b/sysdeps/unix/sysv/linux/arc/clone.S @@ -41,6 +41,7 @@ ENTRY (__clone) cmp r0, 0 /* @fn can't be NULL. */ + and r1,r1,-4 /* @child_stack be 4 bytes aligned per ABI. */ cmp.ne r1, 0 /* @child_stack can't be NULL. */ bz L (__sys_err)
reply other threads:[~2023-02-17 19:15 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230217191530.123E93857B93@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).