From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: Andreas Jaeger <aj@suse.de>,
gdb@sourceware.org, libc-alpha@sourceware.org
Subject: Re: Notes on a frame_unwind_address_in_block problem
Date: Mon, 17 Jul 2006 13:20:00 -0000 [thread overview]
Message-ID: <20060717131527.GA9392@nevyn.them.org> (raw)
In-Reply-To: <8340.192.87.1.22.1153121386.squirrel@webmail.xs4all.nl>
On Mon, Jul 17, 2006 at 09:29:46AM +0200, Mark Kettenis wrote:
> Something like what's done in the kernel (arch/x86_64/kernel/vsyscall.S).
> Hmm, I wonder why Daniel's box uses the trampoline from libc instead of
> the trampoline in the vsyscall page.
Ah, now, this is a very interesting question. I'm glad you asked :-)
__libc_sigaction (int sig, const struct sigaction *act, struct
sigaction *oact)
{
int result;
struct kernel_sigaction kact, koact;
if (act)
{
kact.k_sa_handler = act->sa_handler;
memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
kact.sa_flags = act->sa_flags | SA_RESTORER;
kact.sa_restorer = &restore_rt;
}
That's how we end up at the trampoline: through use of SA_RESTORER.
I didn't respond to this earlier because I wanted to find some time to
check whether that was necessary.
Andreas, looking at the i386 version, I guess that using SA_RESTORER
this way is not necessary. Simply a performance optimization because
the old trampolines (written to the stack) were so slow, or maybe
because they required an executable stack. i386 has
"if (GLRO(dl_sysinfo_dso) == NULL)" around it. Can x86_64 do the same
thing?
The existing unwind information would still be wrong, but on systems
with a vDSO it wouldn't matter any more.
> Anyway, if with the current libc, the trampoline provided by the kernel is
> supposed to be used, then it's probably not worth bothering to add CFI
> to libc, and I'd just remove the CFI_STARTPROC and CFI_ENDPROC statements.
Either way seems reasonable.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-07-17 13:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 22:22 Daniel Jacobowitz
2006-07-13 20:20 ` Mark Kettenis
2006-07-17 7:30 ` Andreas Jaeger
2006-07-17 13:15 ` Mark Kettenis
2006-07-17 13:20 ` Daniel Jacobowitz [this message]
2006-07-18 9:48 ` Andreas Jaeger
2006-07-18 18:39 ` Daniel Jacobowitz
2006-08-03 2:04 ` Daniel Jacobowitz
2006-08-03 2:38 ` Andi Kleen
2006-08-03 2:48 ` Daniel Jacobowitz
2006-08-03 3:12 ` Andi Kleen
2006-08-03 3:21 ` Daniel Jacobowitz
2006-08-03 3:29 ` Andi Kleen
2006-08-03 13:27 ` Daniel Jacobowitz
2006-08-18 15:08 ` Andreas Jaeger
2006-08-18 15:15 ` Daniel Jacobowitz
2006-08-21 8:50 ` Andreas Jaeger
2006-08-21 14:19 ` Ulrich Drepper
2006-08-21 14:52 ` Daniel Jacobowitz
2006-07-18 18:50 ` Daniel Jacobowitz
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=20060717131527.GA9392@nevyn.them.org \
--to=drow@false.org \
--cc=aj@suse.de \
--cc=gdb@sourceware.org \
--cc=libc-alpha@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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