From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@osdl.org, viro@zeniv.linux.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 03/15] frv: signal annotations
Date: Mon, 19 Jun 2006 13:24:50 +0100 [thread overview]
Message-ID: <20060619122450.10060.98183.stgit@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060619122445.10060.97532.stgit@warthog.cambridge.redhat.com>
From: Al Viro <viro@zeniv.linux.org.uk>
Add annotations to the FRV signal handling for sparse.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-Off-By: David Howells <dhowells@redhat.com>
---
arch/frv/kernel/signal.c | 20 ++++++++++----------
include/asm-frv/signal.h | 6 +++---
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c
index 679c1d5..dd5e6fd 100644
--- a/arch/frv/kernel/signal.c
+++ b/arch/frv/kernel/signal.c
@@ -98,7 +98,7 @@ int sys_sigaltstack(const stack_t __user
struct sigframe
{
- void (*pretcode)(void);
+ __sigrestore_t pretcode;
int sig;
struct sigcontext sc;
unsigned long extramask[_NSIG_WORDS-1];
@@ -107,10 +107,10 @@ struct sigframe
struct rt_sigframe
{
- void (*pretcode)(void);
+ __sigrestore_t pretcode;
int sig;
- struct siginfo *pinfo;
- void *puc;
+ struct siginfo __user *pinfo;
+ void __user *puc;
struct siginfo info;
struct ucontext uc;
uint32_t retcode[2];
@@ -284,7 +284,7 @@ static int setup_frame(int sig, struct k
* setlos #__NR_sigreturn,gr7
* tira gr0,0
*/
- if (__put_user((void (*)(void))frame->retcode, &frame->pretcode) ||
+ if (__put_user((__sigrestore_t)frame->retcode, &frame->pretcode) ||
__put_user(0x8efc0000|__NR_sigreturn, &frame->retcode[0]) ||
__put_user(0xc0700000, &frame->retcode[1]))
goto give_sigsegv;
@@ -300,7 +300,7 @@ static int setup_frame(int sig, struct k
if (get_personality & FDPIC_FUNCPTRS) {
struct fdpic_func_descriptor __user *funcptr =
- (struct fdpic_func_descriptor *) ka->sa.sa_handler;
+ (struct fdpic_func_descriptor __user *) ka->sa.sa_handler;
__get_user(__frame->pc, &funcptr->text);
__get_user(__frame->gr15, &funcptr->GOT);
} else {
@@ -359,8 +359,8 @@ static int setup_rt_frame(int sig, struc
/* Create the ucontext. */
if (__put_user(0, &frame->uc.uc_flags) ||
- __put_user(0, &frame->uc.uc_link) ||
- __put_user((void*)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp) ||
+ __put_user(NULL, &frame->uc.uc_link) ||
+ __put_user((void __user *)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp) ||
__put_user(sas_ss_flags(__frame->sp), &frame->uc.uc_stack.ss_flags) ||
__put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size))
goto give_sigsegv;
@@ -382,7 +382,7 @@ static int setup_rt_frame(int sig, struc
* setlos #__NR_sigreturn,gr7
* tira gr0,0
*/
- if (__put_user((void (*)(void))frame->retcode, &frame->pretcode) ||
+ if (__put_user((__sigrestore_t)frame->retcode, &frame->pretcode) ||
__put_user(0x8efc0000|__NR_rt_sigreturn, &frame->retcode[0]) ||
__put_user(0xc0700000, &frame->retcode[1]))
goto give_sigsegv;
@@ -398,7 +398,7 @@ static int setup_rt_frame(int sig, struc
__frame->gr9 = (unsigned long) &frame->info;
if (get_personality & FDPIC_FUNCPTRS) {
- struct fdpic_func_descriptor *funcptr =
+ struct fdpic_func_descriptor __user *funcptr =
(struct fdpic_func_descriptor __user *) ka->sa.sa_handler;
__get_user(__frame->pc, &funcptr->text);
__get_user(__frame->gr15, &funcptr->GOT);
diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h
index 6736689..dcc1b35 100644
--- a/include/asm-frv/signal.h
+++ b/include/asm-frv/signal.h
@@ -114,13 +114,13 @@ struct old_sigaction {
__sighandler_t sa_handler;
old_sigset_t sa_mask;
unsigned long sa_flags;
- void (*sa_restorer)(void);
+ __sigrestore_t sa_restorer;
};
struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
- void (*sa_restorer)(void);
+ __sigrestore_t sa_restorer;
sigset_t sa_mask; /* mask last for extensibility */
};
@@ -146,7 +146,7 @@ #define sa_sigaction _u._sa_sigaction
#endif /* __KERNEL__ */
typedef struct sigaltstack {
- void *ss_sp;
+ void __user *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;
next prev parent reply other threads:[~2006-06-19 12:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-19 12:24 [PATCH 01/15] frv: __user infrastructure David Howells
2006-06-19 12:24 ` [PATCH 02/15] frv: basic __iomem annotations David Howells
2006-06-19 12:24 ` David Howells [this message]
2006-06-19 12:24 ` [PATCH 04/15] frv: sysctl __user annotations David Howells
2006-06-19 12:24 ` [PATCH 05/15] frv: binfmt_elf_fdpic " David Howells
2006-06-19 12:24 ` [PATCH 06/15] frv: misc " David Howells
2006-06-19 12:24 ` [PATCH 07/15] frv: misc sparse annotations David Howells
2006-06-19 12:25 ` [PATCH 08/15] frv: wrong syscall David Howells
2006-06-19 12:25 ` [PATCH 09/15] ext2 XIP won't build without MMU David Howells
2006-06-19 12:25 ` [PATCH 10/15] frv: initrd is grossly broken on frv (never built) David Howells
2006-06-19 12:25 ` [PATCH 11/15] frv: NULL noise removal in frv xchg() David Howells
2006-06-19 12:25 ` [PATCH 12/15] frv: ieee1394 is borken on frv David Howells
2006-06-19 12:25 ` [PATCH 13/15] frv: Add missing qualifier to memcpy_fromio() prototype David Howells
2006-06-19 12:25 ` [PATCH 14/15] frv: trivial cleanups in frv_ksyms.c David Howells
2006-06-19 12:25 ` [PATCH 15/15] frv: clean frv unistd.h David Howells
2006-06-19 16:00 ` David Woodhouse
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=20060619122450.10060.98183.stgit@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=viro@zeniv.linux.org.uk \
/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®