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
nexedi
linux
Commits
42f3678e
Commit
42f3678e
authored
Apr 08, 2003
by
Linus Torvalds
Committed by
Linus Torvalds
Apr 08, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotate i386/signal.c with address space type annotations.
parent
afb34093
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
17 deletions
+19
-17
arch/i386/kernel/signal.c
arch/i386/kernel/signal.c
+13
-13
include/asm-generic/siginfo.h
include/asm-generic/siginfo.h
+1
-1
include/asm-i386/i387.h
include/asm-i386/i387.h
+2
-2
include/asm-i386/sigcontext.h
include/asm-i386/sigcontext.h
+3
-1
No files found.
arch/i386/kernel/signal.c
View file @
42f3678e
...
@@ -53,7 +53,7 @@ sys_sigsuspend(int history0, int history1, old_sigset_t mask)
...
@@ -53,7 +53,7 @@ sys_sigsuspend(int history0, int history1, old_sigset_t mask)
}
}
asmlinkage
int
asmlinkage
int
sys_rt_sigsuspend
(
sigset_t
*
unewset
,
size_t
sigsetsize
)
sys_rt_sigsuspend
(
sigset_t
__user
*
unewset
,
size_t
sigsetsize
)
{
{
struct
pt_regs
*
regs
=
(
struct
pt_regs
*
)
&
unewset
;
struct
pt_regs
*
regs
=
(
struct
pt_regs
*
)
&
unewset
;
sigset_t
saveset
,
newset
;
sigset_t
saveset
,
newset
;
...
@@ -82,8 +82,8 @@ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
...
@@ -82,8 +82,8 @@ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
}
}
asmlinkage
int
asmlinkage
int
sys_sigaction
(
int
sig
,
const
struct
old_sigaction
*
act
,
sys_sigaction
(
int
sig
,
const
struct
old_sigaction
__user
*
act
,
struct
old_sigaction
*
oact
)
struct
old_sigaction
__user
*
oact
)
{
{
struct
k_sigaction
new_ka
,
old_ka
;
struct
k_sigaction
new_ka
,
old_ka
;
int
ret
;
int
ret
;
...
@@ -148,7 +148,7 @@ struct rt_sigframe
...
@@ -148,7 +148,7 @@ struct rt_sigframe
};
};
static
int
static
int
restore_sigcontext
(
struct
pt_regs
*
regs
,
struct
sigcontext
*
sc
,
int
*
peax
)
restore_sigcontext
(
struct
pt_regs
*
regs
,
struct
sigcontext
__user
*
sc
,
int
*
peax
)
{
{
unsigned
int
err
=
0
;
unsigned
int
err
=
0
;
...
@@ -192,7 +192,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
...
@@ -192,7 +192,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
}
}
{
{
struct
_fpstate
*
buf
;
struct
_fpstate
__user
*
buf
;
err
|=
__get_user
(
buf
,
&
sc
->
fpstate
);
err
|=
__get_user
(
buf
,
&
sc
->
fpstate
);
if
(
buf
)
{
if
(
buf
)
{
if
(
verify_area
(
VERIFY_READ
,
buf
,
sizeof
(
*
buf
)))
if
(
verify_area
(
VERIFY_READ
,
buf
,
sizeof
(
*
buf
)))
...
@@ -211,7 +211,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
...
@@ -211,7 +211,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
asmlinkage
int
sys_sigreturn
(
unsigned
long
__unused
)
asmlinkage
int
sys_sigreturn
(
unsigned
long
__unused
)
{
{
struct
pt_regs
*
regs
=
(
struct
pt_regs
*
)
&
__unused
;
struct
pt_regs
*
regs
=
(
struct
pt_regs
*
)
&
__unused
;
struct
sigframe
*
frame
=
(
struct
sigframe
*
)(
regs
->
esp
-
8
);
struct
sigframe
__user
*
frame
=
(
struct
sigframe
__user
*
)(
regs
->
esp
-
8
);
sigset_t
set
;
sigset_t
set
;
int
eax
;
int
eax
;
...
@@ -241,7 +241,7 @@ asmlinkage int sys_sigreturn(unsigned long __unused)
...
@@ -241,7 +241,7 @@ asmlinkage int sys_sigreturn(unsigned long __unused)
asmlinkage
int
sys_rt_sigreturn
(
unsigned
long
__unused
)
asmlinkage
int
sys_rt_sigreturn
(
unsigned
long
__unused
)
{
{
struct
pt_regs
*
regs
=
(
struct
pt_regs
*
)
&
__unused
;
struct
pt_regs
*
regs
=
(
struct
pt_regs
*
)
&
__unused
;
struct
rt_sigframe
*
frame
=
(
struct
rt_sigframe
*
)(
regs
->
esp
-
4
);
struct
rt_sigframe
__user
*
frame
=
(
struct
rt_sigframe
__user
*
)(
regs
->
esp
-
4
);
sigset_t
set
;
sigset_t
set
;
stack_t
st
;
stack_t
st
;
int
eax
;
int
eax
;
...
@@ -278,7 +278,7 @@ asmlinkage int sys_rt_sigreturn(unsigned long __unused)
...
@@ -278,7 +278,7 @@ asmlinkage int sys_rt_sigreturn(unsigned long __unused)
*/
*/
static
int
static
int
setup_sigcontext
(
struct
sigcontext
*
sc
,
struct
_fpstate
*
fpstate
,
setup_sigcontext
(
struct
sigcontext
__user
*
sc
,
struct
_fpstate
__user
*
fpstate
,
struct
pt_regs
*
regs
,
unsigned
long
mask
)
struct
pt_regs
*
regs
,
unsigned
long
mask
)
{
{
int
tmp
,
err
=
0
;
int
tmp
,
err
=
0
;
...
@@ -323,7 +323,7 @@ setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
...
@@ -323,7 +323,7 @@ setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
/*
/*
* Determine which stack to use..
* Determine which stack to use..
*/
*/
static
inline
void
*
static
inline
void
__user
*
get_sigframe
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
size_t
frame_size
)
get_sigframe
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
size_t
frame_size
)
{
{
unsigned
long
esp
;
unsigned
long
esp
;
...
@@ -344,14 +344,14 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
...
@@ -344,14 +344,14 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
esp
=
(
unsigned
long
)
ka
->
sa
.
sa_restorer
;
esp
=
(
unsigned
long
)
ka
->
sa
.
sa_restorer
;
}
}
return
(
void
*
)((
esp
-
frame_size
)
&
-
8ul
);
return
(
void
__user
*
)((
esp
-
frame_size
)
&
-
8ul
);
}
}
static
void
setup_frame
(
int
sig
,
struct
k_sigaction
*
ka
,
static
void
setup_frame
(
int
sig
,
struct
k_sigaction
*
ka
,
sigset_t
*
set
,
struct
pt_regs
*
regs
)
sigset_t
*
set
,
struct
pt_regs
*
regs
)
{
{
void
*
restorer
;
void
*
restorer
;
struct
sigframe
*
frame
;
struct
sigframe
__user
*
frame
;
int
err
=
0
;
int
err
=
0
;
frame
=
get_sigframe
(
ka
,
regs
,
sizeof
(
*
frame
));
frame
=
get_sigframe
(
ka
,
regs
,
sizeof
(
*
frame
));
...
@@ -373,7 +373,7 @@ static void setup_frame(int sig, struct k_sigaction *ka,
...
@@ -373,7 +373,7 @@ static void setup_frame(int sig, struct k_sigaction *ka,
goto
give_sigsegv
;
goto
give_sigsegv
;
if
(
_NSIG_WORDS
>
1
)
{
if
(
_NSIG_WORDS
>
1
)
{
err
|=
__copy_to_user
(
frame
->
extramask
,
&
set
->
sig
[
1
],
err
|=
__copy_to_user
(
&
frame
->
extramask
,
&
set
->
sig
[
1
],
sizeof
(
frame
->
extramask
));
sizeof
(
frame
->
extramask
));
}
}
if
(
err
)
if
(
err
)
...
@@ -428,7 +428,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
...
@@ -428,7 +428,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t
*
set
,
struct
pt_regs
*
regs
)
sigset_t
*
set
,
struct
pt_regs
*
regs
)
{
{
void
*
restorer
;
void
*
restorer
;
struct
rt_sigframe
*
frame
;
struct
rt_sigframe
__user
*
frame
;
int
err
=
0
;
int
err
=
0
;
frame
=
get_sigframe
(
ka
,
regs
,
sizeof
(
*
frame
));
frame
=
get_sigframe
(
ka
,
regs
,
sizeof
(
*
frame
));
...
...
include/asm-generic/siginfo.h
View file @
42f3678e
...
@@ -275,7 +275,7 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
...
@@ -275,7 +275,7 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
#endif
#endif
extern
int
copy_siginfo_to_user
(
struct
siginfo
*
to
,
struct
siginfo
*
from
);
extern
int
copy_siginfo_to_user
(
struct
siginfo
__user
*
to
,
struct
siginfo
*
from
);
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
...
...
include/asm-i386/i387.h
View file @
42f3678e
...
@@ -81,8 +81,8 @@ extern void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr );
...
@@ -81,8 +81,8 @@ extern void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr );
/*
/*
* Signal frame handlers...
* Signal frame handlers...
*/
*/
extern
int
save_i387
(
struct
_fpstate
*
buf
);
extern
int
save_i387
(
struct
_fpstate
__user
*
buf
);
extern
int
restore_i387
(
struct
_fpstate
*
buf
);
extern
int
restore_i387
(
struct
_fpstate
__user
*
buf
);
/*
/*
* ptrace request handers...
* ptrace request handers...
...
...
include/asm-i386/sigcontext.h
View file @
42f3678e
#ifndef _ASMi386_SIGCONTEXT_H
#ifndef _ASMi386_SIGCONTEXT_H
#define _ASMi386_SIGCONTEXT_H
#define _ASMi386_SIGCONTEXT_H
#include <linux/compiler.h>
/*
/*
* As documented in the iBCS2 standard..
* As documented in the iBCS2 standard..
*
*
...
@@ -74,7 +76,7 @@ struct sigcontext {
...
@@ -74,7 +76,7 @@ struct sigcontext {
unsigned
long
eflags
;
unsigned
long
eflags
;
unsigned
long
esp_at_signal
;
unsigned
long
esp_at_signal
;
unsigned
short
ss
,
__ssh
;
unsigned
short
ss
,
__ssh
;
struct
_fpstate
*
fpstate
;
struct
_fpstate
__user
*
fpstate
;
unsigned
long
oldmask
;
unsigned
long
oldmask
;
unsigned
long
cr2
;
unsigned
long
cr2
;
};
};
...
...
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