Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
35280bd4
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
35280bd4
编写于
2月 24, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch epoll_pwait to COMPAT_SYSCALL_DEFINE
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
19f4fc3a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
50 addition
and
63 deletion
+50
-63
arch/s390/kernel/compat_wrapper.S
arch/s390/kernel/compat_wrapper.S
+0
-10
arch/s390/kernel/syscalls.S
arch/s390/kernel/syscalls.S
+1
-1
fs/compat.c
fs/compat.c
+0
-49
fs/eventpoll.c
fs/eventpoll.c
+47
-0
include/linux/compat.h
include/linux/compat.h
+2
-3
未找到文件。
arch/s390/kernel/compat_wrapper.S
浏览文件 @
35280bd4
...
...
@@ -1270,16 +1270,6 @@ ENTRY(sys_getcpu_wrapper)
llgtr
%
r4
,%
r4
#
struct
getcpu_cache
*
jg
sys_getcpu
ENTRY
(
compat_sys_epoll_pwait_wrapper
)
lgfr
%
r2
,%
r2
#
int
llgtr
%
r3
,%
r3
#
struct
compat_epoll_event
*
lgfr
%
r4
,%
r4
#
int
lgfr
%
r5
,%
r5
#
int
llgtr
%
r6
,%
r6
#
compat_sigset_t
*
llgf
%
r0
,
164
(%
r15
)
#
compat_size_t
stg
%
r0
,
160
(%
r15
)
jg
compat_sys_epoll_pwait
ENTRY
(
compat_sys_utimes_wrapper
)
llgtr
%
r2
,%
r2
#
char
*
llgtr
%
r3
,%
r3
#
struct
compat_timeval
*
...
...
arch/s390/kernel/syscalls.S
浏览文件 @
35280bd4
...
...
@@ -320,7 +320,7 @@ SYSCALL(sys_tee,sys_tee,sys_tee_wrapper)
SYSCALL
(
sys_vmsplice
,
sys_vmsplice
,
compat_sys_vmsplice_wrapper
)
NI_SYSCALL
/
*
310
sys_move_pages
*/
SYSCALL
(
sys_getcpu
,
sys_getcpu
,
sys_getcpu_wrapper
)
SYSCALL
(
sys_epoll_pwait
,
sys_epoll_pwait
,
compat_sys_epoll_pwait
_wrapper
)
SYSCALL
(
sys_epoll_pwait
,
sys_epoll_pwait
,
compat_sys_epoll_pwait
)
SYSCALL
(
sys_utimes
,
sys_utimes
,
compat_sys_utimes_wrapper
)
SYSCALL
(
sys_s390_fallocate
,
sys_fallocate
,
sys_fallocate_wrapper
)
SYSCALL
(
sys_utimensat
,
sys_utimensat
,
compat_sys_utimensat_wrapper
)
/
*
315
*/
...
...
fs/compat.c
浏览文件 @
35280bd4
...
...
@@ -44,7 +44,6 @@
#include <linux/signal.h>
#include <linux/poll.h>
#include <linux/mm.h>
#include <linux/eventpoll.h>
#include <linux/fs_struct.h>
#include <linux/slab.h>
#include <linux/pagemap.h>
...
...
@@ -1659,54 +1658,6 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
return
ret
;
}
#ifdef CONFIG_EPOLL
asmlinkage
long
compat_sys_epoll_pwait
(
int
epfd
,
struct
compat_epoll_event
__user
*
events
,
int
maxevents
,
int
timeout
,
const
compat_sigset_t
__user
*
sigmask
,
compat_size_t
sigsetsize
)
{
long
err
;
compat_sigset_t
csigmask
;
sigset_t
ksigmask
,
sigsaved
;
/*
* If the caller wants a certain signal mask to be set during the wait,
* we apply it here.
*/
if
(
sigmask
)
{
if
(
sigsetsize
!=
sizeof
(
compat_sigset_t
))
return
-
EINVAL
;
if
(
copy_from_user
(
&
csigmask
,
sigmask
,
sizeof
(
csigmask
)))
return
-
EFAULT
;
sigset_from_compat
(
&
ksigmask
,
&
csigmask
);
sigdelsetmask
(
&
ksigmask
,
sigmask
(
SIGKILL
)
|
sigmask
(
SIGSTOP
));
sigprocmask
(
SIG_SETMASK
,
&
ksigmask
,
&
sigsaved
);
}
err
=
sys_epoll_wait
(
epfd
,
events
,
maxevents
,
timeout
);
/*
* If we changed the signal mask, we need to restore the original one.
* In case we've got a signal while waiting, we do not restore the
* signal mask yet, and we allow do_signal() to deliver the signal on
* the way back to userspace, before the signal mask is restored.
*/
if
(
sigmask
)
{
if
(
err
==
-
EINTR
)
{
memcpy
(
&
current
->
saved_sigmask
,
&
sigsaved
,
sizeof
(
sigsaved
));
set_restore_sigmask
();
}
else
sigprocmask
(
SIG_SETMASK
,
&
sigsaved
,
NULL
);
}
return
err
;
}
#endif
/* CONFIG_EPOLL */
#ifdef CONFIG_FHANDLE
/*
* Exactly like fs/open.c:sys_open_by_handle_at(), except that it
...
...
fs/eventpoll.c
浏览文件 @
35280bd4
...
...
@@ -40,6 +40,7 @@
#include <linux/atomic.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/compat.h>
/*
* LOCKING:
...
...
@@ -1940,6 +1941,52 @@ SYSCALL_DEFINE6(epoll_pwait, int, epfd, struct epoll_event __user *, events,
return
error
;
}
#ifdef CONFIG_COMPAT
COMPAT_SYSCALL_DEFINE6
(
epoll_pwait
,
int
,
epfd
,
struct
epoll_event
__user
*
,
events
,
int
,
maxevents
,
int
,
timeout
,
const
compat_sigset_t
__user
*
,
sigmask
,
compat_size_t
,
sigsetsize
)
{
long
err
;
compat_sigset_t
csigmask
;
sigset_t
ksigmask
,
sigsaved
;
/*
* If the caller wants a certain signal mask to be set during the wait,
* we apply it here.
*/
if
(
sigmask
)
{
if
(
sigsetsize
!=
sizeof
(
compat_sigset_t
))
return
-
EINVAL
;
if
(
copy_from_user
(
&
csigmask
,
sigmask
,
sizeof
(
csigmask
)))
return
-
EFAULT
;
sigset_from_compat
(
&
ksigmask
,
&
csigmask
);
sigdelsetmask
(
&
ksigmask
,
sigmask
(
SIGKILL
)
|
sigmask
(
SIGSTOP
));
sigprocmask
(
SIG_SETMASK
,
&
ksigmask
,
&
sigsaved
);
}
err
=
sys_epoll_wait
(
epfd
,
events
,
maxevents
,
timeout
);
/*
* If we changed the signal mask, we need to restore the original one.
* In case we've got a signal while waiting, we do not restore the
* signal mask yet, and we allow do_signal() to deliver the signal on
* the way back to userspace, before the signal mask is restored.
*/
if
(
sigmask
)
{
if
(
err
==
-
EINTR
)
{
memcpy
(
&
current
->
saved_sigmask
,
&
sigsaved
,
sizeof
(
sigsaved
));
set_restore_sigmask
();
}
else
sigprocmask
(
SIG_SETMASK
,
&
sigsaved
,
NULL
);
}
return
err
;
}
#endif
static
int
__init
eventpoll_init
(
void
)
{
struct
sysinfo
si
;
...
...
include/linux/compat.h
浏览文件 @
35280bd4
...
...
@@ -432,10 +432,9 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
/*
* epoll (fs/eventpoll.c) compat bits follow ...
*/
struct
epoll_event
;
#define compat_epoll_event epoll_event
struct
epoll_event
;
/* fortunately, this one is fixed-layout */
asmlinkage
long
compat_sys_epoll_pwait
(
int
epfd
,
struct
compat_
epoll_event
__user
*
events
,
struct
epoll_event
__user
*
events
,
int
maxevents
,
int
timeout
,
const
compat_sigset_t
__user
*
sigmask
,
compat_size_t
sigsetsize
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录