From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] FRV: Fix sigaltstack handling for RT signals
Date: Fri, 11 Feb 2005 14:45:19 +0000 [thread overview]
Message-ID: <10374.1108133119@redhat.com> (raw)
The attached patch fixes sigaltstack handling for RT signal return. It was
reading a userspace struct into kernel space and then passing the kernel copy
to a generic signalling routine which then assumed it had been passed a
userspace pointer...
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-Off-By: Alexander Viro <aviro@redhat.com>
---
warthog>diffstat frv-sigaltstk-2611rc3.diff
signal.c | 11 +----------
1 files changed, 1 insertion(+), 10 deletions(-)
diff -uNrp /warthog/kernels/linux-2.6.11-rc3/arch/frv/kernel/signal.c linux-2.6.11-rc3-frv/arch/frv/kernel/signal.c
--- /warthog/kernels/linux-2.6.11-rc3/arch/frv/kernel/signal.c 2005-02-04 11:49:30.000000000 +0000
+++ linux-2.6.11-rc3-frv/arch/frv/kernel/signal.c 2005-02-11 12:46:40.369651032 +0000
@@ -242,18 +242,9 @@ asmlinkage int sys_rt_sigreturn(void)
if (restore_sigcontext(&frame->uc.uc_mcontext, &gr8))
goto badframe;
- if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
+ if (do_sigaltstack(&frame->uc.uc_stack, NULL, __frame->sp) == -EFAULT)
goto badframe;
- /* It is more difficult to avoid calling this function than to
- * call it and ignore errors. */
- /*
- * THIS CANNOT WORK! "&st" is a kernel address, and "do_sigaltstack()"
- * takes a user address (and verifies that it is a user address). End
- * result: it does exactly _nothing_.
- */
- do_sigaltstack(&st, NULL, __frame->sp);
-
return gr8;
badframe:
reply other threads:[~2005-02-11 14:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=10374.1108133119@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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