From: Mikael Pettersson <mikpelinux@gmail.com>
To: Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: rt_sigreturn rejects a substitute stack frame as invalid.
Date: Mon, 18 Aug 2014 12:59:49 +0200 [thread overview]
Message-ID: <21489.56485.380163.904338@gargle.gargle.HOWL> (raw)
In-Reply-To: <fadbcf1c3708.53f150fb@langara.bc.ca>
Steven Stewart-Gallus writes:
> Hello,
>
> I'm not totally sure that GLibc's setcontext is safe to use in a
> signal handler. So, I decided I was going to play things safe and let
> rt_sigreturn switch stacks for me instead. However, rt_sigreturn seems
> to reject my substitute stack frame as invalid and I'm not sure why.
I did similar things at my previous work (doing dynamic binary
instrumentation and virtualization of user-space binaries; can't
share the code alas, it's proprietary), but my code operated
directly on top of the kernel/user-space API, using the actual
kernel/user-space data structures rather than glibc's fake ones.
If you're sure that it's the kernel's rt_sigreturn and not whatever
glibc runs before it that complains, then a simple way of debugging
this is to modify your kernel to printk some diagnostics whenever
rt_sigreturn decides to error out.
You may also want to check out the 'pth' package.
prev parent reply other threads:[~2014-08-18 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-18 1:03 Steven Stewart-Gallus
2014-08-18 10:59 ` Mikael Pettersson [this message]
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=21489.56485.380163.904338@gargle.gargle.HOWL \
--to=mikpelinux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sstewartgallus00@mylangara.bc.ca \
/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
all inboxes | Powered by JetHome®