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
1b3c872c
Commit
1b3c872c
authored
May 31, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rt_sigtimedwait(): move compat to native
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
464d6242
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
35 deletions
+35
-35
include/linux/signal.h
include/linux/signal.h
+0
-2
kernel/compat.c
kernel/compat.c
+0
-32
kernel/signal.c
kernel/signal.c
+35
-1
No files found.
include/linux/signal.h
View file @
1b3c872c
...
...
@@ -246,8 +246,6 @@ extern int do_send_sig_info(int sig, struct siginfo *info,
struct
task_struct
*
p
,
bool
group
);
extern
int
group_send_sig_info
(
int
sig
,
struct
siginfo
*
info
,
struct
task_struct
*
p
);
extern
int
__group_send_sig_info
(
int
,
struct
siginfo
*
,
struct
task_struct
*
);
extern
int
do_sigtimedwait
(
const
sigset_t
*
,
siginfo_t
*
,
const
struct
timespec
*
);
extern
int
sigprocmask
(
int
,
sigset_t
*
,
sigset_t
*
);
extern
void
set_current_blocked
(
sigset_t
*
);
extern
void
__set_current_blocked
(
const
sigset_t
*
);
...
...
kernel/compat.c
View file @
1b3c872c
...
...
@@ -866,38 +866,6 @@ sigset_to_compat(compat_sigset_t *compat, const sigset_t *set)
}
}
COMPAT_SYSCALL_DEFINE4
(
rt_sigtimedwait
,
compat_sigset_t
__user
*
,
uthese
,
struct
compat_siginfo
__user
*
,
uinfo
,
struct
compat_timespec
__user
*
,
uts
,
compat_size_t
,
sigsetsize
)
{
compat_sigset_t
s32
;
sigset_t
s
;
struct
timespec
t
;
siginfo_t
info
;
long
ret
;
if
(
sigsetsize
!=
sizeof
(
sigset_t
))
return
-
EINVAL
;
if
(
copy_from_user
(
&
s32
,
uthese
,
sizeof
(
compat_sigset_t
)))
return
-
EFAULT
;
sigset_from_compat
(
&
s
,
&
s32
);
if
(
uts
)
{
if
(
compat_get_timespec
(
&
t
,
uts
))
return
-
EFAULT
;
}
ret
=
do_sigtimedwait
(
&
s
,
&
info
,
uts
?
&
t
:
NULL
);
if
(
ret
>
0
&&
uinfo
)
{
if
(
copy_siginfo_to_user32
(
uinfo
,
&
info
))
ret
=
-
EFAULT
;
}
return
ret
;
}
#ifdef __ARCH_WANT_COMPAT_SYS_TIME
/* compat_time_t is a 32 bit "long" and needs to get converted. */
...
...
kernel/signal.c
View file @
1b3c872c
...
...
@@ -2768,7 +2768,7 @@ int copy_siginfo_to_user(siginfo_t __user *to, const siginfo_t *from)
* @info: if non-null, the signal's siginfo is returned here
* @ts: upper bound on process time suspension
*/
int
do_sigtimedwait
(
const
sigset_t
*
which
,
siginfo_t
*
info
,
static
int
do_sigtimedwait
(
const
sigset_t
*
which
,
siginfo_t
*
info
,
const
struct
timespec
*
ts
)
{
ktime_t
*
to
=
NULL
,
timeout
=
KTIME_MAX
;
...
...
@@ -2857,6 +2857,40 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese,
return
ret
;
}
#ifdef CONFIG_COMPAT
COMPAT_SYSCALL_DEFINE4
(
rt_sigtimedwait
,
compat_sigset_t
__user
*
,
uthese
,
struct
compat_siginfo
__user
*
,
uinfo
,
struct
compat_timespec
__user
*
,
uts
,
compat_size_t
,
sigsetsize
)
{
compat_sigset_t
s32
;
sigset_t
s
;
struct
timespec
t
;
siginfo_t
info
;
long
ret
;
if
(
sigsetsize
!=
sizeof
(
sigset_t
))
return
-
EINVAL
;
if
(
copy_from_user
(
&
s32
,
uthese
,
sizeof
(
compat_sigset_t
)))
return
-
EFAULT
;
sigset_from_compat
(
&
s
,
&
s32
);
if
(
uts
)
{
if
(
compat_get_timespec
(
&
t
,
uts
))
return
-
EFAULT
;
}
ret
=
do_sigtimedwait
(
&
s
,
&
info
,
uts
?
&
t
:
NULL
);
if
(
ret
>
0
&&
uinfo
)
{
if
(
copy_siginfo_to_user32
(
uinfo
,
&
info
))
ret
=
-
EFAULT
;
}
return
ret
;
}
#endif
/**
* sys_kill - send a signal to a process
* @pid: the PID of the process
...
...
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