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
05ca65c3
Commit
05ca65c3
authored
May 28, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add __user annotations to arch/ppc64/kernel/syscalls.c
parent
324610cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
arch/ppc64/kernel/syscalls.c
arch/ppc64/kernel/syscalls.c
+17
-17
include/asm-ppc64/ipc.h
include/asm-ppc64/ipc.h
+1
-1
include/asm-ppc64/unistd.h
include/asm-ppc64/unistd.h
+1
-1
No files found.
arch/ppc64/kernel/syscalls.c
View file @
05ca65c3
...
...
@@ -57,7 +57,7 @@ check_bugs(void)
* This is really horribly ugly.
*/
asmlinkage
int
sys_ipc
(
uint
call
,
int
first
,
int
second
,
long
third
,
void
*
ptr
,
long
fifth
)
sys_ipc
(
uint
call
,
int
first
,
int
second
,
long
third
,
void
__user
*
ptr
,
long
fifth
)
{
int
version
,
ret
;
...
...
@@ -67,12 +67,12 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
ret
=
-
ENOSYS
;
switch
(
call
)
{
case
SEMOP
:
ret
=
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
ret
=
sys_semtimedop
(
first
,
(
struct
sembuf
__user
*
)
ptr
,
second
,
NULL
);
break
;
case
SEMTIMEDOP
:
ret
=
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
(
const
struct
timespec
*
)
fifth
);
ret
=
sys_semtimedop
(
first
,
(
struct
sembuf
__user
*
)
ptr
,
second
,
(
const
struct
timespec
__user
*
)
fifth
);
break
;
case
SEMGET
:
ret
=
sys_semget
(
first
,
second
,
third
);
...
...
@@ -83,13 +83,13 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
ret
=
-
EINVAL
;
if
(
!
ptr
)
break
;
if
((
ret
=
get_user
(
fourth
.
__pad
,
(
void
*
*
)
ptr
)))
if
((
ret
=
get_user
(
fourth
.
__pad
,
(
void
__user
*
__user
*
)
ptr
)))
break
;
ret
=
sys_semctl
(
first
,
second
,
third
,
fourth
);
break
;
}
case
MSGSND
:
ret
=
sys_msgsnd
(
first
,
(
struct
msgbuf
*
)
ptr
,
second
,
third
);
ret
=
sys_msgsnd
(
first
,
(
struct
msgbuf
__user
*
)
ptr
,
second
,
third
);
break
;
case
MSGRCV
:
switch
(
version
)
{
...
...
@@ -100,7 +100,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
if
(
!
ptr
)
break
;
if
((
ret
=
copy_from_user
(
&
tmp
,
(
struct
ipc_kludge
*
)
ptr
,
(
struct
ipc_kludge
__user
*
)
ptr
,
sizeof
(
tmp
))
?
-
EFAULT
:
0
))
break
;
ret
=
sys_msgrcv
(
first
,
tmp
.
msgp
,
second
,
tmp
.
msgtyp
,
...
...
@@ -108,7 +108,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
break
;
}
default:
ret
=
sys_msgrcv
(
first
,
(
struct
msgbuf
*
)
ptr
,
ret
=
sys_msgrcv
(
first
,
(
struct
msgbuf
__user
*
)
ptr
,
second
,
fifth
,
third
);
break
;
}
...
...
@@ -117,35 +117,35 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
ret
=
sys_msgget
((
key_t
)
first
,
second
);
break
;
case
MSGCTL
:
ret
=
sys_msgctl
(
first
,
second
,
(
struct
msqid_ds
*
)
ptr
);
ret
=
sys_msgctl
(
first
,
second
,
(
struct
msqid_ds
__user
*
)
ptr
);
break
;
case
SHMAT
:
switch
(
version
)
{
default:
{
ulong
raddr
;
ret
=
do_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
ret
=
do_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
break
;
ret
=
put_user
(
raddr
,
(
ulong
*
)
third
);
ret
=
put_user
(
raddr
,
(
ulong
__user
*
)
third
);
break
;
}
case
1
:
/* iBCS2 emulator entry point */
ret
=
-
EINVAL
;
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
break
;
ret
=
do_shmat
(
first
,
(
char
*
)
ptr
,
second
,
ret
=
do_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
(
ulong
*
)
third
);
break
;
}
break
;
case
SHMDT
:
ret
=
sys_shmdt
((
char
*
)
ptr
);
ret
=
sys_shmdt
((
char
__user
*
)
ptr
);
break
;
case
SHMGET
:
ret
=
sys_shmget
(
first
,
second
,
third
);
break
;
case
SHMCTL
:
ret
=
sys_shmctl
(
first
,
second
,
(
struct
shmid_ds
*
)
ptr
);
ret
=
sys_shmctl
(
first
,
second
,
(
struct
shmid_ds
__user
*
)
ptr
);
break
;
}
...
...
@@ -156,7 +156,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
* sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way unix traditionally does this, though.
*/
asmlinkage
int
sys_pipe
(
int
*
fildes
)
asmlinkage
int
sys_pipe
(
int
__user
*
fildes
)
{
int
fd
[
2
];
int
error
;
...
...
@@ -202,7 +202,7 @@ static int __init set_fakeppc(char *str)
}
__setup
(
"fakeppc"
,
set_fakeppc
);
asmlinkage
int
sys_uname
(
struct
old_utsname
*
name
)
asmlinkage
int
sys_uname
(
struct
old_utsname
__user
*
name
)
{
int
err
=
-
EFAULT
;
...
...
@@ -214,7 +214,7 @@ asmlinkage int sys_uname(struct old_utsname * name)
return
err
;
}
asmlinkage
time_t
sys64_time
(
time_t
*
tloc
)
asmlinkage
time_t
sys64_time
(
time_t
__user
*
tloc
)
{
time_t
secs
;
time_t
usecs
;
...
...
include/asm-ppc64/ipc.h
View file @
05ca65c3
...
...
@@ -12,7 +12,7 @@
* 2 of the License, or (at your option) any later version.
*/
struct
ipc_kludge
{
struct
msgbuf
*
msgp
;
struct
msgbuf
__user
*
msgp
;
long
msgtyp
;
};
...
...
include/asm-ppc64/unistd.h
View file @
05ca65c3
...
...
@@ -455,7 +455,7 @@ int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
int
sys_vfork
(
unsigned
long
p1
,
unsigned
long
p2
,
unsigned
long
p3
,
unsigned
long
p4
,
unsigned
long
p5
,
unsigned
long
p6
,
struct
pt_regs
*
regs
);
int
sys_pipe
(
int
*
fildes
);
int
sys_pipe
(
int
__user
*
fildes
);
int
sys_ptrace
(
long
request
,
long
pid
,
long
addr
,
long
data
);
struct
sigaction
;
long
sys_rt_sigaction
(
int
sig
,
const
struct
sigaction
__user
*
act
,
...
...
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