From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH] S390: Fix backtrace in vdso functions.
Date: Tue, 28 Nov 2017 13:09:00 -0000 [thread overview]
Message-ID: <6698d098-aea3-14cc-8ed7-762def848dc9@linaro.org> (raw)
In-Reply-To: <ead922fd-1eb9-3781-345d-6a2ea63ecd01@linux.vnet.ibm.com>
On 28/11/2017 10:44, Stefan Liebler wrote:
> Hi,
>
> On s390, GDB fails to show the complete backtrace from within vdso functions. The macro INTERNAL_VSYSCALL_CALL saves the return address in r14 to r10 before branching to the vdso function. The branch-instruction updates r14 in order to let the vdso function return. Then the original address in r14 is restored from r10. Unfortunately, there are no cfi-rules and GDB fails.
>
> Furthermore the call of the vdso function does not comply with the s390 ABI as no stack-frame for the vdso-function is generated.
>
> This patch removes the s390 specific macro INTERNAL_VSYSCALL_CALL and the common implementation in sysdeps/unix/sysv/linux/sysdep-vdso.h is used. Then the vdso function is called via function-pointer and GCC generates a new stack-frame and emits all needed cfi-rules.
>
> The defines CLOBBER_[0-6] are removed as they were only used in macro INTERNAL_VSYSCALL_CALL.
>
> The macro INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK is not used on s390. The only user is power. Thus it is removed from s390 sysdep.h.
I am almost sure we can remove it for powerpc as well (I can't see
no immediate gain on doing a function call using inline assembly
as for INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK on powerpc).
>
> ChangeLog:
>
> Â Â Â Â * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
> Â Â Â Â (INTERNAL_VSYSCALL_CALL, CLOBBER_0, CLOBBER_1, CLOBBER_2,
> Â Â Â Â CLOBBER_3, CLOBBER_4, CLOBBER_5, CLOBBER_6,
> Â Â Â Â INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Remove.
> Â Â Â Â * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
next prev parent reply other threads:[~2017-11-28 13:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 12:44 Stefan Liebler
2017-11-28 13:09 ` Adhemerval Zanella [this message]
2017-11-28 14:18 ` Florian Weimer
2017-11-28 15:53 ` Adhemerval Zanella
2017-11-28 16:35 ` Adhemerval Zanella
2017-12-04 8:00 ` Stefan Liebler
2017-12-04 10:48 ` Adhemerval Zanella
2017-12-04 15:42 ` Stefan Liebler
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=6698d098-aea3-14cc-8ed7-762def848dc9@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@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: link
Be 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).