From: Paul Mundt <lethal@linux-sh.org>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: John Reiser <jreiser@BitWagon.com>, Andi Kleen <ak@suse.de>,
Ingo Molnar <mingo@elte.hu>,
Arjan van de Ven <arjan@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: + fully-honor-vdso_enabled.patch added to -mm tree
Date: Mon, 5 Mar 2007 19:12:31 +0900 [thread overview]
Message-ID: <20070305101231.GA12363@linux-sh.org> (raw)
In-Reply-To: <20070302221854.GA162@tv-sign.ru>
On Sat, Mar 03, 2007 at 01:18:54AM +0300, Oleg Nesterov wrote:
> On 03/02, John Reiser wrote:
> > Paul Mundt has commented on setup_rt_frame() and provided a patch which
> > bullet-proofs that area. I will include that patch into the next revision.
>
> Confused. I still think his patch incomplete. Don't we need the same check
> in setup_rt_frame() ?
>
Yes, you're right. The patch is missing the proper restorer logic in the
setup_rt_frame() case. This should handle both of them, restoring the
previous logic when the VDSO is disabled.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
--
arch/i386/kernel/signal.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c
index 4f99e87..26c2497 100644
--- a/arch/i386/kernel/signal.c
+++ b/arch/i386/kernel/signal.c
@@ -350,7 +350,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
goto give_sigsegv;
}
- if (current->binfmt->hasvdso)
+ if (current->binfmt->hasvdso && current->mm->context.vdso)
restorer = (void *)VDSO_SYM(&__kernel_sigreturn);
else
restorer = (void *)&frame->retcode;
@@ -449,17 +449,20 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
goto give_sigsegv;
/* Set up to return from userspace. */
- restorer = (void *)VDSO_SYM(&__kernel_rt_sigreturn);
+ if (current->binfmt->hasvdso && current->mm->context.vdso)
+ restorer = (void *)VDSO_SYM(&__kernel_rt_sigreturn);
+ else
+ restorer = (void *)&frame->retcode;
if (ka->sa.sa_flags & SA_RESTORER)
restorer = ka->sa.sa_restorer;
err |= __put_user(restorer, &frame->pretcode);
-
+
/*
* This is movl $,%eax ; int $0x80
*
- * WE DO NOT USE IT ANY MORE! It's only left here for historical
- * reasons and because gdb uses it as a signature to notice
- * signal handler stack frames.
+ * This is not used in the general case! It's left here for
+ * handling toggling of the VDSO state and because gdb uses it
+ * as a signature to notice signal handler stack frames.
*/
err |= __put_user(0xb8, (char __user *)(frame->retcode+0));
err |= __put_user(__NR_rt_sigreturn, (int __user *)(frame->retcode+1));
next prev parent reply other threads:[~2007-03-05 10:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-01 17:52 + fully-honor-vdso_enabled.patch added to -mm tree Oleg Nesterov
2007-03-02 3:48 ` Paul Mundt
2007-03-02 19:32 ` Oleg Nesterov
2007-03-02 21:19 ` John Reiser
2007-03-03 17:38 ` Oleg Nesterov
2007-03-02 21:06 ` John Reiser
2007-03-02 22:18 ` Oleg Nesterov
2007-03-05 10:12 ` Paul Mundt [this message]
2007-03-05 10:54 ` Oleg Nesterov
2007-03-05 10:56 ` Paul Mundt
2007-03-02 22:19 ` Chuck Ebbert
2007-03-02 23:11 ` Oleg Nesterov
2007-03-02 23:33 ` John Reiser
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=20070305101231.GA12363@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=jreiser@BitWagon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
/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