From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7829) id CB95D3858407; Fri, 17 Dec 2021 20:20:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB95D3858407 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Matheus Castanho To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] powerpc64[le]: Allocate extra stack frame on syscall.S X-Act-Checkin: glibc X-Git-Author: Matheus Castanho X-Git-Refname: refs/heads/release/2.34/master X-Git-Oldrev: 03de6917bd11c0591867607ce74ef658f76eabb9 X-Git-Newrev: 5daf13b1e637eec0f7a2de05b177cb0d76479aa2 Message-Id: <20211217202026.CB95D3858407@sourceware.org> Date: Fri, 17 Dec 2021 20:20:26 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2021 20:20:26 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5daf13b1e637eec0f7a2de05b177cb0d76479aa2 commit 5daf13b1e637eec0f7a2de05b177cb0d76479aa2 Author: Matheus Castanho Date: Wed Dec 1 11:14:40 2021 -0300 powerpc64[le]: Allocate extra stack frame on syscall.S The syscall function does not allocate the extra stack frame for scv like other assembly syscalls using DO_CALL_SCV. So after commit d120fb9941 changed the offset that is used to save LR, syscall ended up using an invalid offset, causing regressions on powerpc64. So make sure the extra stack frame is allocated in syscall.S as well to make it consistent with other uses of DO_CALL_SCV and avoid similar issues in the future. Tested on powerpc, powerpc64, and powerpc64le (with and without scv) Reviewed-by: Raphael M Zinsly (cherry picked from commit ae91d3df24a4a1b1f264d101a71a298bff310d14) Diff: --- sysdeps/unix/sysv/linux/powerpc/syscall.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S index a29652feaf..a5497c8370 100644 --- a/sysdeps/unix/sysv/linux/powerpc/syscall.S +++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S @@ -27,7 +27,11 @@ ENTRY (syscall) mr r8,r9 #if defined(USE_PPC_SCV) && !IS_IN(rtld) && (defined(__PPC64__) || defined(__powerpc64__)) CHECK_SCV_SUPPORT r9 0f + stdu r1,-SCV_FRAME_SIZE(r1) + cfi_adjust_cfa_offset(SCV_FRAME_SIZE) DO_CALL_SCV + addi r1,r1,SCV_FRAME_SIZE + cfi_adjust_cfa_offset(-SCV_FRAME_SIZE) RET_SCV b 1f #endif