Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b6d199cc
Commit
b6d199cc
authored
Jul 06, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparse: annotate signal handler and ss_sp as user pointers
parent
da0504fc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
include/asm-i386/signal.h
include/asm-i386/signal.h
+9
-4
include/asm-ppc64/signal.h
include/asm-ppc64/signal.h
+10
-4
kernel/signal.c
kernel/signal.c
+3
-3
No files found.
include/asm-i386/signal.h
View file @
b6d199cc
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include <linux/types.h>
#include <linux/types.h>
#include <linux/linkage.h>
#include <linux/linkage.h>
#include <linux/time.h>
#include <linux/time.h>
#include <linux/compiler.h>
/* Avoid too many header ordering problems. */
/* Avoid too many header ordering problems. */
struct
siginfo
;
struct
siginfo
;
...
@@ -128,7 +129,11 @@ typedef unsigned long sigset_t;
...
@@ -128,7 +129,11 @@ typedef unsigned long sigset_t;
#define SIG_SETMASK 2
/* for setting the signal mask */
#define SIG_SETMASK 2
/* for setting the signal mask */
/* Type of a signal handler. */
/* Type of a signal handler. */
typedef
void
(
*
__sighandler_t
)(
int
);
typedef
void
__signalfn_t
(
int
);
typedef
__signalfn_t
__user
*
__sighandler_t
;
typedef
void
__restorefn_t
(
void
);
typedef
__restorefn_t
__user
*
__sigrestore_t
;
#define SIG_DFL ((__sighandler_t)0)
/* default signal handling */
#define SIG_DFL ((__sighandler_t)0)
/* default signal handling */
#define SIG_IGN ((__sighandler_t)1)
/* ignore signal */
#define SIG_IGN ((__sighandler_t)1)
/* ignore signal */
...
@@ -139,13 +144,13 @@ struct old_sigaction {
...
@@ -139,13 +144,13 @@ struct old_sigaction {
__sighandler_t
sa_handler
;
__sighandler_t
sa_handler
;
old_sigset_t
sa_mask
;
old_sigset_t
sa_mask
;
unsigned
long
sa_flags
;
unsigned
long
sa_flags
;
void
(
*
sa_restorer
)(
void
)
;
__sigrestore_t
sa_restorer
;
};
};
struct
sigaction
{
struct
sigaction
{
__sighandler_t
sa_handler
;
__sighandler_t
sa_handler
;
unsigned
long
sa_flags
;
unsigned
long
sa_flags
;
void
(
*
sa_restorer
)(
void
)
;
__sigrestore_t
sa_restorer
;
sigset_t
sa_mask
;
/* mask last for extensibility */
sigset_t
sa_mask
;
/* mask last for extensibility */
};
};
...
@@ -171,7 +176,7 @@ struct sigaction {
...
@@ -171,7 +176,7 @@ struct sigaction {
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
typedef
struct
sigaltstack
{
typedef
struct
sigaltstack
{
void
*
ss_sp
;
void
__user
*
ss_sp
;
int
ss_flags
;
int
ss_flags
;
size_t
ss_size
;
size_t
ss_size
;
}
stack_t
;
}
stack_t
;
...
...
include/asm-ppc64/signal.h
View file @
b6d199cc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define _ASMPPC64_SIGNAL_H
#define _ASMPPC64_SIGNAL_H
#include <linux/types.h>
#include <linux/types.h>
#include <linux/compiler.h>
#include <asm/siginfo.h>
#include <asm/siginfo.h>
/* Avoid too many header ordering problems. */
/* Avoid too many header ordering problems. */
...
@@ -114,7 +115,12 @@ typedef struct {
...
@@ -114,7 +115,12 @@ typedef struct {
#define SIG_SETMASK 2
/* for setting the signal mask */
#define SIG_SETMASK 2
/* for setting the signal mask */
/* Type of a signal handler. */
/* Type of a signal handler. */
typedef
void
(
*
__sighandler_t
)(
int
);
typedef
void
__sigfunction
(
int
);
typedef
__sigfunction
__user
*
__sighandler_t
;
/* Type of the restorer function */
typedef
void
__sigrestorer
(
void
);
typedef
__sigrestorer
__user
*
__sigrestorer_t
;
#define SIG_DFL ((__sighandler_t)0)
/* default signal handling */
#define SIG_DFL ((__sighandler_t)0)
/* default signal handling */
#define SIG_IGN ((__sighandler_t)1)
/* ignore signal */
#define SIG_IGN ((__sighandler_t)1)
/* ignore signal */
...
@@ -124,13 +130,13 @@ struct old_sigaction {
...
@@ -124,13 +130,13 @@ struct old_sigaction {
__sighandler_t
sa_handler
;
__sighandler_t
sa_handler
;
old_sigset_t
sa_mask
;
old_sigset_t
sa_mask
;
unsigned
long
sa_flags
;
unsigned
long
sa_flags
;
void
(
*
sa_restorer
)(
void
)
;
__sigrestorer_t
sa_restorer
;
};
};
struct
sigaction
{
struct
sigaction
{
__sighandler_t
sa_handler
;
__sighandler_t
sa_handler
;
unsigned
long
sa_flags
;
unsigned
long
sa_flags
;
void
(
*
sa_restorer
)(
void
)
;
__sigrestorer_t
sa_restorer
;
sigset_t
sa_mask
;
/* mask last for extensibility */
sigset_t
sa_mask
;
/* mask last for extensibility */
};
};
...
@@ -139,7 +145,7 @@ struct k_sigaction {
...
@@ -139,7 +145,7 @@ struct k_sigaction {
};
};
typedef
struct
sigaltstack
{
typedef
struct
sigaltstack
{
void
*
ss_sp
;
void
__user
*
ss_sp
;
int
ss_flags
;
int
ss_flags
;
size_t
ss_size
;
size_t
ss_size
;
}
stack_t
;
}
stack_t
;
...
...
kernel/signal.c
View file @
b6d199cc
...
@@ -157,7 +157,7 @@ static kmem_cache_t *sigqueue_cachep;
...
@@ -157,7 +157,7 @@ static kmem_cache_t *sigqueue_cachep;
static
int
sig_ignored
(
struct
task_struct
*
t
,
int
sig
)
static
int
sig_ignored
(
struct
task_struct
*
t
,
int
sig
)
{
{
void
*
handler
;
void
__user
*
handler
;
/*
/*
* Tracers always want to know about signals..
* Tracers always want to know about signals..
...
@@ -2362,13 +2362,13 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s
...
@@ -2362,13 +2362,13 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s
int
error
;
int
error
;
if
(
uoss
)
{
if
(
uoss
)
{
oss
.
ss_sp
=
(
void
*
)
current
->
sas_ss_sp
;
oss
.
ss_sp
=
(
void
__user
*
)
current
->
sas_ss_sp
;
oss
.
ss_size
=
current
->
sas_ss_size
;
oss
.
ss_size
=
current
->
sas_ss_size
;
oss
.
ss_flags
=
sas_ss_flags
(
sp
);
oss
.
ss_flags
=
sas_ss_flags
(
sp
);
}
}
if
(
uss
)
{
if
(
uss
)
{
void
*
ss_sp
;
void
__user
*
ss_sp
;
size_t
ss_size
;
size_t
ss_size
;
int
ss_flags
;
int
ss_flags
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment