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
08274cef
Commit
08274cef
authored
Feb 27, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] Replace sys32_socketcall with the generic compat_sys_socketcall.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
440537ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
115 deletions
+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
No files found.
arch/mips/kernel/linux32.c
View file @
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
View file @
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
*/
...
...
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