From: Xavier Roche <roche+kml2@exalead.com>
To: Nicholas Miell <nmiell@comcast.net>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: sigaction's ucontext_t with incorrect stack reference when SA_SIGINFO is being used ?
Date: Wed, 24 Jan 2007 08:44:43 +0100 [thread overview]
Message-ID: <45B70E6B.40104@exalead.com> (raw)
In-Reply-To: <1169530677.2995.8.camel@entropy>
Nicholas Miell wrote:
> so if uc_stack doesn't point to the stack in use immediately prior to
> signal generation, this is a bug.
Looking at arch/i386/kernel/signal.c (and others) inside
setup_rt_frame(), the problem is pretty obvious:
err |= __put_user(current->sas_ss_sp, &frame_user->uc.uc_stack.ss_sp);
err |= __put_user(sas_ss_flags(regs->esp),
&frame->uc.uc_stack.ss_flags);
err |= __put_user(current->sas_ss_size, &frame_user->uc.uc_stack.ss_size);
And of course, the ss_sp is NULL when no alternative stack is used.
Seems definitively a bug.
However, my reading of include/linux/sched.h and thread_info.h did not
enlighten me on the way to get the original thread's stack base and size.
prev parent reply other threads:[~2007-01-24 7:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-22 8:57 sigaction's ucontext_t with incorrect stack reference when SA_SIGINFO is being used ? Xavier Roche
2007-01-23 5:37 ` Nicholas Miell
2007-01-24 7:44 ` Xavier Roche [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=45B70E6B.40104@exalead.com \
--to=roche+kml2@exalead.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nmiell@comcast.net \
/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