Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
08274cef
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
08274cef
编写于
2月 27, 2007
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MIPS] Replace sys32_socketcall with the generic compat_sys_socketcall.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
440537ef
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
1 addition
and
115 deletion
+1
-115
arch/mips/kernel/linux32.c
arch/mips/kernel/linux32.c
+0
-114
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/scall64-o32.S
+1
-1
未找到文件。
arch/mips/kernel/linux32.c
浏览文件 @
08274cef
...
...
@@ -544,120 +544,6 @@ asmlinkage long sys32_sync_file_range(int fd, int __pad,
flags
);
}
/* Argument list sizes for sys_socketcall */
#define AL(x) ((x) * sizeof(unsigned int))
static
unsigned
char
socketcall_nargs
[
18
]
=
{
AL
(
0
),
AL
(
3
),
AL
(
3
),
AL
(
3
),
AL
(
2
),
AL
(
3
),
AL
(
3
),
AL
(
3
),
AL
(
4
),
AL
(
4
),
AL
(
4
),
AL
(
6
),
AL
(
6
),
AL
(
2
),
AL
(
5
),
AL
(
5
),
AL
(
3
),
AL
(
3
)};
#undef AL
/*
* System call vectors.
*
* Argument checking cleaned up. Saved 20% in size.
* This function doesn't need to set the kernel lock because
* it is set by the callees.
*/
asmlinkage
long
sys32_socketcall
(
int
call
,
unsigned
int
__user
*
args32
)
{
unsigned
int
a
[
6
];
unsigned
int
a0
,
a1
;
int
err
;
extern
asmlinkage
long
sys_socket
(
int
family
,
int
type
,
int
protocol
);
extern
asmlinkage
long
sys_bind
(
int
fd
,
struct
sockaddr
__user
*
umyaddr
,
int
addrlen
);
extern
asmlinkage
long
sys_connect
(
int
fd
,
struct
sockaddr
__user
*
uservaddr
,
int
addrlen
);
extern
asmlinkage
long
sys_listen
(
int
fd
,
int
backlog
);
extern
asmlinkage
long
sys_accept
(
int
fd
,
struct
sockaddr
__user
*
upeer_sockaddr
,
int
__user
*
upeer_addrlen
);
extern
asmlinkage
long
sys_getsockname
(
int
fd
,
struct
sockaddr
__user
*
usockaddr
,
int
__user
*
usockaddr_len
);
extern
asmlinkage
long
sys_getpeername
(
int
fd
,
struct
sockaddr
__user
*
usockaddr
,
int
__user
*
usockaddr_len
);
extern
asmlinkage
long
sys_socketpair
(
int
family
,
int
type
,
int
protocol
,
int
__user
*
usockvec
);
extern
asmlinkage
long
sys_send
(
int
fd
,
void
__user
*
buff
,
size_t
len
,
unsigned
flags
);
extern
asmlinkage
long
sys_sendto
(
int
fd
,
void
__user
*
buff
,
size_t
len
,
unsigned
flags
,
struct
sockaddr
__user
*
addr
,
int
addr_len
);
extern
asmlinkage
long
sys_recv
(
int
fd
,
void
__user
*
ubuf
,
size_t
size
,
unsigned
flags
);
extern
asmlinkage
long
sys_recvfrom
(
int
fd
,
void
__user
*
ubuf
,
size_t
size
,
unsigned
flags
,
struct
sockaddr
__user
*
addr
,
int
__user
*
addr_len
);
extern
asmlinkage
long
sys_shutdown
(
int
fd
,
int
how
);
extern
asmlinkage
long
sys_setsockopt
(
int
fd
,
int
level
,
int
optname
,
char
__user
*
optval
,
int
optlen
);
extern
asmlinkage
long
sys_getsockopt
(
int
fd
,
int
level
,
int
optname
,
char
__user
*
optval
,
int
__user
*
optlen
);
extern
asmlinkage
long
sys_sendmsg
(
int
fd
,
struct
msghdr
__user
*
msg
,
unsigned
flags
);
extern
asmlinkage
long
sys_recvmsg
(
int
fd
,
struct
msghdr
__user
*
msg
,
unsigned
int
flags
);
if
(
call
<
1
||
call
>
SYS_RECVMSG
)
return
-
EINVAL
;
/* copy_from_user should be SMP safe. */
if
(
copy_from_user
(
a
,
args32
,
socketcall_nargs
[
call
]))
return
-
EFAULT
;
a0
=
a
[
0
];
a1
=
a
[
1
];
switch
(
call
)
{
case
SYS_SOCKET
:
err
=
sys_socket
(
a0
,
a1
,
a
[
2
]);
break
;
case
SYS_BIND
:
err
=
sys_bind
(
a0
,(
struct
sockaddr
__user
*
)
A
(
a1
),
a
[
2
]);
break
;
case
SYS_CONNECT
:
err
=
sys_connect
(
a0
,
(
struct
sockaddr
__user
*
)
A
(
a1
),
a
[
2
]);
break
;
case
SYS_LISTEN
:
err
=
sys_listen
(
a0
,
a1
);
break
;
case
SYS_ACCEPT
:
err
=
sys_accept
(
a0
,(
struct
sockaddr
__user
*
)
A
(
a1
),
(
int
__user
*
)
A
(
a
[
2
]));
break
;
case
SYS_GETSOCKNAME
:
err
=
sys_getsockname
(
a0
,(
struct
sockaddr
__user
*
)
A
(
a1
),
(
int
__user
*
)
A
(
a
[
2
]));
break
;
case
SYS_GETPEERNAME
:
err
=
sys_getpeername
(
a0
,
(
struct
sockaddr
__user
*
)
A
(
a1
),
(
int
__user
*
)
A
(
a
[
2
]));
break
;
case
SYS_SOCKETPAIR
:
err
=
sys_socketpair
(
a0
,
a1
,
a
[
2
],
(
int
__user
*
)
A
(
a
[
3
]));
break
;
case
SYS_SEND
:
err
=
sys_send
(
a0
,
(
void
__user
*
)
A
(
a1
),
a
[
2
],
a
[
3
]);
break
;
case
SYS_SENDTO
:
err
=
sys_sendto
(
a0
,(
void
__user
*
)
A
(
a1
),
a
[
2
],
a
[
3
],
(
struct
sockaddr
__user
*
)
A
(
a
[
4
]),
a
[
5
]);
break
;
case
SYS_RECV
:
err
=
sys_recv
(
a0
,
(
void
__user
*
)
A
(
a1
),
a
[
2
],
a
[
3
]);
break
;
case
SYS_RECVFROM
:
err
=
sys_recvfrom
(
a0
,
(
void
__user
*
)
A
(
a1
),
a
[
2
],
a
[
3
],
(
struct
sockaddr
__user
*
)
A
(
a
[
4
]),
(
int
__user
*
)
A
(
a
[
5
]));
break
;
case
SYS_SHUTDOWN
:
err
=
sys_shutdown
(
a0
,
a1
);
break
;
case
SYS_SETSOCKOPT
:
err
=
sys_setsockopt
(
a0
,
a1
,
a
[
2
],
(
char
__user
*
)
A
(
a
[
3
]),
a
[
4
]);
break
;
case
SYS_GETSOCKOPT
:
err
=
sys_getsockopt
(
a0
,
a1
,
a
[
2
],
(
char
__user
*
)
A
(
a
[
3
]),
(
int
__user
*
)
A
(
a
[
4
]));
break
;
case
SYS_SENDMSG
:
err
=
sys_sendmsg
(
a0
,
(
struct
msghdr
__user
*
)
A
(
a1
),
a
[
2
]);
break
;
case
SYS_RECVMSG
:
err
=
sys_recvmsg
(
a0
,
(
struct
msghdr
__user
*
)
A
(
a1
),
a
[
2
]);
break
;
default:
err
=
-
EINVAL
;
break
;
}
return
err
;
}
struct
sigevent32
{
u32
sigev_value
;
u32
sigev_signo
;
...
...
arch/mips/kernel/scall64-o32.S
浏览文件 @
08274cef
...
...
@@ -307,7 +307,7 @@ sys_call_table:
PTR
compat_sys_statfs
PTR
compat_sys_fstatfs
/*
4100
*/
PTR
sys_ni_syscall
/*
sys_ioperm
*/
PTR
sys32
_socketcall
PTR
compat_sys
_socketcall
PTR
sys_syslog
PTR
compat_sys_setitimer
PTR
compat_sys_getitimer
/*
4105
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录