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
cf3e791e
Commit
cf3e791e
authored
Jan 21, 2003
by
Stephen Rothwell
Committed by
David Mosberger
Jan 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ia64: [COMPAT] compat_{old_}sigset_t
parent
7f7ac851
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
25 deletions
+22
-25
arch/ia64/ia32/ia32_signal.c
arch/ia64/ia32/ia32_signal.c
+13
-13
include/asm-ia64/compat.h
include/asm-ia64/compat.h
+7
-0
include/asm-ia64/ia32.h
include/asm-ia64/ia32.h
+2
-12
No files found.
arch/ia64/ia32/ia32_signal.c
View file @
cf3e791e
...
...
@@ -56,7 +56,7 @@ struct sigframe_ia32
int
sig
;
struct
sigcontext_ia32
sc
;
struct
_fpstate_ia32
fpstate
;
unsigned
int
extramask
[
_
IA32
_NSIG_WORDS
-
1
];
unsigned
int
extramask
[
_
COMPAT
_NSIG_WORDS
-
1
];
char
retcode
[
8
];
};
...
...
@@ -463,7 +463,7 @@ sigact_set_handler (struct k_sigaction *sa, unsigned int handler, unsigned int r
}
asmlinkage
long
ia32_rt_sigsuspend
(
sigset32
_t
*
uset
,
unsigned
int
sigsetsize
,
struct
sigscratch
*
scr
)
ia32_rt_sigsuspend
(
compat_sigset
_t
*
uset
,
unsigned
int
sigsetsize
,
struct
sigscratch
*
scr
)
{
extern
long
ia64_do_signal
(
sigset_t
*
oldset
,
struct
sigscratch
*
scr
,
long
in_syscall
);
sigset_t
oldset
,
set
;
...
...
@@ -504,7 +504,7 @@ ia32_rt_sigsuspend (sigset32_t *uset, unsigned int sigsetsize, struct sigscratch
asmlinkage
long
ia32_sigsuspend
(
unsigned
int
mask
,
struct
sigscratch
*
scr
)
{
return
ia32_rt_sigsuspend
((
sigset32
_t
*
)
&
mask
,
sizeof
(
mask
),
scr
);
return
ia32_rt_sigsuspend
((
compat_sigset
_t
*
)
&
mask
,
sizeof
(
mask
),
scr
);
}
asmlinkage
long
...
...
@@ -530,14 +530,14 @@ sys32_rt_sigaction (int sig, struct sigaction32 *act,
int
ret
;
/* XXX: Don't preclude handling different sized sigset_t's. */
if
(
sigsetsize
!=
sizeof
(
sigset32
_t
))
if
(
sigsetsize
!=
sizeof
(
compat_sigset
_t
))
return
-
EINVAL
;
if
(
act
)
{
ret
=
get_user
(
handler
,
&
act
->
sa_handler
);
ret
|=
get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
ret
|=
get_user
(
restorer
,
&
act
->
sa_restorer
);
ret
|=
copy_from_user
(
&
new_ka
.
sa
.
sa_mask
,
&
act
->
sa_mask
,
sizeof
(
sigset32
_t
));
ret
|=
copy_from_user
(
&
new_ka
.
sa
.
sa_mask
,
&
act
->
sa_mask
,
sizeof
(
compat_sigset
_t
));
if
(
ret
)
return
-
EFAULT
;
...
...
@@ -550,7 +550,7 @@ sys32_rt_sigaction (int sig, struct sigaction32 *act,
ret
=
put_user
(
IA32_SA_HANDLER
(
&
old_ka
),
&
oact
->
sa_handler
);
ret
|=
put_user
(
old_ka
.
sa
.
sa_flags
,
&
oact
->
sa_flags
);
ret
|=
put_user
(
IA32_SA_RESTORER
(
&
old_ka
),
&
oact
->
sa_restorer
);
ret
|=
copy_to_user
(
&
oact
->
sa_mask
,
&
old_ka
.
sa
.
sa_mask
,
sizeof
(
sigset32
_t
));
ret
|=
copy_to_user
(
&
oact
->
sa_mask
,
&
old_ka
.
sa
.
sa_mask
,
sizeof
(
compat_sigset
_t
));
}
return
ret
;
}
...
...
@@ -560,7 +560,7 @@ extern asmlinkage long sys_rt_sigprocmask (int how, sigset_t *set, sigset_t *ose
size_t
sigsetsize
);
asmlinkage
long
sys32_rt_sigprocmask
(
int
how
,
sigset32_t
*
set
,
sigset32
_t
*
oset
,
unsigned
int
sigsetsize
)
sys32_rt_sigprocmask
(
int
how
,
compat_sigset_t
*
set
,
compat_sigset
_t
*
oset
,
unsigned
int
sigsetsize
)
{
mm_segment_t
old_fs
=
get_fs
();
sigset_t
s
;
...
...
@@ -589,11 +589,11 @@ sys32_rt_sigprocmask (int how, sigset32_t *set, sigset32_t *oset, unsigned int s
asmlinkage
long
sys32_sigprocmask
(
int
how
,
unsigned
int
*
set
,
unsigned
int
*
oset
)
{
return
sys32_rt_sigprocmask
(
how
,
(
sigset32_t
*
)
set
,
(
sigset32
_t
*
)
oset
,
sizeof
(
*
set
));
return
sys32_rt_sigprocmask
(
how
,
(
compat_sigset_t
*
)
set
,
(
compat_sigset
_t
*
)
oset
,
sizeof
(
*
set
));
}
asmlinkage
long
sys32_rt_sigtimedwait
(
sigset32
_t
*
uthese
,
siginfo_t32
*
uinfo
,
sys32_rt_sigtimedwait
(
compat_sigset
_t
*
uthese
,
siginfo_t32
*
uinfo
,
struct
compat_timespec
*
uts
,
unsigned
int
sigsetsize
)
{
extern
asmlinkage
long
sys_rt_sigtimedwait
(
const
sigset_t
*
,
siginfo_t
*
,
...
...
@@ -605,7 +605,7 @@ sys32_rt_sigtimedwait (sigset32_t *uthese, siginfo_t32 *uinfo,
sigset_t
s
;
int
ret
;
if
(
copy_from_user
(
&
s
.
sig
,
uthese
,
sizeof
(
sigset32
_t
)))
if
(
copy_from_user
(
&
s
.
sig
,
uthese
,
sizeof
(
compat_sigset
_t
)))
return
-
EFAULT
;
if
(
uts
&&
get_compat_timespec
(
&
t
,
uts
))
return
-
EFAULT
;
...
...
@@ -645,7 +645,7 @@ sys32_sigaction (int sig, struct old_sigaction32 *act, struct old_sigaction32 *o
int
ret
;
if
(
act
)
{
old_sigset32
_t
mask
;
compat_old_sigset
_t
mask
;
ret
=
get_user
(
handler
,
&
act
->
sa_handler
);
ret
|=
get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
...
...
@@ -863,7 +863,7 @@ setup_frame_ia32 (int sig, struct k_sigaction *ka, sigset_t *set, struct pt_regs
err
|=
setup_sigcontext_ia32
(
&
frame
->
sc
,
&
frame
->
fpstate
,
regs
,
set
->
sig
[
0
]);
if
(
_
IA32
_NSIG_WORDS
>
1
)
if
(
_
COMPAT
_NSIG_WORDS
>
1
)
err
|=
__copy_to_user
(
frame
->
extramask
,
(
char
*
)
&
set
->
sig
+
4
,
sizeof
(
frame
->
extramask
));
...
...
@@ -1008,7 +1008,7 @@ sys32_sigreturn (int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int
goto
badframe
;
if
(
__get_user
(
set
.
sig
[
0
],
&
frame
->
sc
.
oldmask
)
||
(
_
IA32
_NSIG_WORDS
>
1
&&
__copy_from_user
((
char
*
)
&
set
.
sig
+
4
,
&
frame
->
extramask
,
||
(
_
COMPAT
_NSIG_WORDS
>
1
&&
__copy_from_user
((
char
*
)
&
set
.
sig
+
4
,
&
frame
->
extramask
,
sizeof
(
frame
->
extramask
))))
goto
badframe
;
...
...
include/asm-ia64/compat.h
View file @
cf3e791e
...
...
@@ -68,4 +68,11 @@ struct compat_flock {
compat_pid_t
l_pid
;
};
typedef
u32
compat_old_sigset_t
;
/* at least 32 bits */
#define _COMPAT_NSIG 64
#define _COMPAT_NSIG_BPW 32
typedef
u32
compat_sigset_word
;
#endif
/* _ASM_IA64_COMPAT_H */
include/asm-ia64/ia32.h
View file @
cf3e791e
...
...
@@ -132,10 +132,6 @@ struct ia32_user_fxsr_struct {
};
/* signal.h */
#define _IA32_NSIG 64
#define _IA32_NSIG_BPW 32
#define _IA32_NSIG_WORDS (_IA32_NSIG / _IA32_NSIG_BPW)
#define IA32_SET_SA_HANDLER(ka,handler,restorer) \
((ka)->sa.sa_handler = (__sighandler_t) \
(((unsigned long)(restorer) << 32) \
...
...
@@ -143,23 +139,17 @@ struct ia32_user_fxsr_struct {
#define IA32_SA_HANDLER(ka) ((unsigned long) (ka)->sa.sa_handler & 0xffffffff)
#define IA32_SA_RESTORER(ka) ((unsigned long) (ka)->sa.sa_handler >> 32)
typedef
struct
{
unsigned
int
sig
[
_IA32_NSIG_WORDS
];
}
sigset32_t
;
struct
sigaction32
{
unsigned
int
sa_handler
;
/* Really a pointer, but need to deal with 32 bits */
unsigned
int
sa_flags
;
unsigned
int
sa_restorer
;
/* Another 32 bit pointer */
sigset32
_t
sa_mask
;
/* A 32 bit mask */
compat_sigset
_t
sa_mask
;
/* A 32 bit mask */
};
typedef
unsigned
int
old_sigset32_t
;
/* at least 32 bits */
struct
old_sigaction32
{
unsigned
int
sa_handler
;
/* Really a pointer, but need to deal
with 32 bits */
old_sigset32
_t
sa_mask
;
/* A 32 bit mask */
compat_old_sigset
_t
sa_mask
;
/* A 32 bit mask */
unsigned
int
sa_flags
;
unsigned
int
sa_restorer
;
/* Another 32 bit pointer */
};
...
...
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