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
033fbd9f
Commit
033fbd9f
authored
Sep 03, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/tmp3 into samba.org:/scratch/anton/export
parents
210e9f0b
61fc8737
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
27 deletions
+39
-27
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+27
-25
arch/ppc64/kernel/syscalls.c
arch/ppc64/kernel/syscalls.c
+4
-2
include/asm-ppc64/uaccess.h
include/asm-ppc64/uaccess.h
+8
-0
No files found.
arch/ppc64/kernel/sys_ppc32.c
View file @
033fbd9f
...
...
@@ -1243,16 +1243,19 @@ asmlinkage long sys32_settimeofday(struct compat_timeval *tv, struct timezone *t
}
struct
msgbuf32
{
s32
mtype
;
char
mtext
[
1
];
};
struct
msgbuf32
{
compat_long_t
mtype
;
char
mtext
[
1
];
};
struct
semid_ds32
{
struct
ipc_perm
sem_perm
;
compat_time_t
sem_otime
;
compat_time_t
sem_ctime
;
u32
sem_base
;
u32
sem_pending
;
u32
sem_pending_last
;
u32
undo
;
compat_uptr_t
sem_base
;
compat_uptr_t
sem_pending
;
compat_uptr_t
sem_pending_last
;
compat_uptr_t
undo
;
unsigned
short
sem_nsems
;
};
...
...
@@ -1262,21 +1265,20 @@ struct semid64_ds32 {
compat_time_t
sem_otime
;
unsigned
int
__unused2
;
compat_time_t
sem_ctime
;
u32
sem_nsems
;
u32
__unused3
;
u32
__unused4
;
compat_ulong_t
sem_nsems
;
compat_ulong_t
__unused3
;
compat_ulong_t
__unused4
;
};
struct
msqid_ds32
{
struct
msqid_ds32
{
struct
ipc_perm
msg_perm
;
u32
msg_first
;
u32
msg_last
;
compat_uptr_t
msg_first
;
compat_uptr_t
msg_last
;
compat_time_t
msg_stime
;
compat_time_t
msg_rtime
;
compat_time_t
msg_ctime
;
u32
msg_lcbytes
;
u32
msg_lqbytes
;
compat_ulong_t
msg_lcbytes
;
compat_ulong_t
msg_lqbytes
;
unsigned
short
msg_cbytes
;
unsigned
short
msg_qnum
;
unsigned
short
msg_qbytes
;
...
...
@@ -1292,13 +1294,13 @@ struct msqid64_ds32 {
compat_time_t
msg_rtime
;
unsigned
int
__unused3
;
compat_time_t
msg_ctime
;
unsigned
in
t
msg_cbytes
;
unsigned
in
t
msg_qnum
;
unsigned
in
t
msg_qbytes
;
compat_ulong_
t
msg_cbytes
;
compat_ulong_
t
msg_qnum
;
compat_ulong_
t
msg_qbytes
;
compat_pid_t
msg_lspid
;
compat_pid_t
msg_lrpid
;
unsigned
in
t
__unused4
;
unsigned
in
t
__unused5
;
compat_ulong_
t
__unused4
;
compat_ulong_
t
__unused5
;
};
struct
shmid_ds32
{
...
...
@@ -1311,8 +1313,8 @@ struct shmid_ds32 {
compat_ipc_pid_t
shm_lpid
;
unsigned
short
shm_nattch
;
unsigned
short
__unused
;
unsigned
in
t
__unused2
;
unsigned
in
t
__unused3
;
compat_uptr_
t
__unused2
;
compat_uptr_
t
__unused3
;
};
struct
shmid64_ds32
{
...
...
@@ -1327,9 +1329,9 @@ struct shmid64_ds32 {
compat_size_t
shm_segsz
;
compat_pid_t
shm_cpid
;
compat_pid_t
shm_lpid
;
unsigned
in
t
shm_nattch
;
unsigned
in
t
__unused5
;
unsigned
in
t
__unused6
;
compat_ulong_
t
shm_nattch
;
compat_ulong_
t
__unused5
;
compat_ulong_
t
__unused6
;
};
/*
...
...
@@ -1350,7 +1352,7 @@ static long do_sys32_semctl(int first, int second, int third, void *uptr)
err
=
-
EFAULT
;
if
(
get_user
(
pad
,
(
u32
*
)
uptr
))
return
err
;
if
(
third
==
SETVAL
)
if
(
(
third
&
~
IPC_64
)
==
SETVAL
)
fourth
.
val
=
(
int
)
pad
;
else
fourth
.
__pad
=
(
void
*
)
A
(
pad
);
...
...
arch/ppc64/kernel/syscalls.c
View file @
033fbd9f
/*
* linux/arch/ppc/kernel/sys_ppc.c
* linux/arch/ppc
64
/kernel/sys_ppc.c
*
* PowerPC version
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
...
...
@@ -40,7 +40,6 @@
#include <asm/uaccess.h>
#include <asm/ipc.h>
#include <asm/semaphore.h>
#include <asm/ppcdebug.h>
#include <asm/time.h>
extern
unsigned
long
wall_jiffies
;
...
...
@@ -79,6 +78,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
case
SEMCTL
:
{
union
semun
fourth
;
ret
=
-
EINVAL
;
if
(
!
ptr
)
break
;
if
((
ret
=
get_user
(
fourth
.
__pad
,
(
void
**
)
ptr
)))
...
...
@@ -94,6 +94,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
case
0
:
{
struct
ipc_kludge
tmp
;
ret
=
-
EINVAL
;
if
(
!
ptr
)
break
;
if
((
ret
=
copy_from_user
(
&
tmp
,
...
...
@@ -127,6 +128,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
break
;
}
case
1
:
/* iBCS2 emulator entry point */
ret
=
-
EINVAL
;
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
break
;
ret
=
sys_shmat
(
first
,
(
char
*
)
ptr
,
second
,
...
...
include/asm-ppc64/uaccess.h
View file @
033fbd9f
...
...
@@ -132,6 +132,7 @@ extern long __put_user_bad(void);
#define __put_user_size(x,ptr,size,retval,errret) \
do { \
might_sleep(); \
retval = 0; \
switch (size) { \
case 1: __put_user_asm(x,ptr,retval,"stb",errret); break; \
...
...
@@ -185,6 +186,7 @@ extern long __get_user_bad(void);
#define __get_user_size(x,ptr,size,retval,errret) \
do { \
might_sleep(); \
retval = 0; \
switch (size) { \
case 1: __get_user_asm(x,ptr,retval,"lbz",errret); break; \
...
...
@@ -220,6 +222,7 @@ extern unsigned long __copy_tofrom_user(void *to, const void *from,
static
inline
unsigned
long
__copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
{
might_sleep
();
if
(
__builtin_constant_p
(
n
))
{
unsigned
long
ret
;
...
...
@@ -244,6 +247,7 @@ __copy_from_user(void *to, const void __user *from, unsigned long n)
static
inline
unsigned
long
__copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
)
{
might_sleep
();
if
(
__builtin_constant_p
(
n
))
{
unsigned
long
ret
;
...
...
@@ -289,6 +293,7 @@ copy_to_user(void *to, const void *from, unsigned long n)
static
inline
unsigned
long
copy_in_user
(
void
*
to
,
const
void
*
from
,
unsigned
long
n
)
{
might_sleep
();
if
(
likely
(
access_ok
(
VERIFY_READ
,
from
,
n
)
&&
access_ok
(
VERIFY_WRITE
,
to
,
n
)))
n
=
__copy_tofrom_user
(
to
,
from
,
n
);
...
...
@@ -300,6 +305,7 @@ extern unsigned long __clear_user(void *addr, unsigned long size);
static
inline
unsigned
long
clear_user
(
void
*
addr
,
unsigned
long
size
)
{
might_sleep
();
if
(
likely
(
access_ok
(
VERIFY_WRITE
,
addr
,
size
)))
size
=
__clear_user
(
addr
,
size
);
return
size
;
...
...
@@ -310,6 +316,7 @@ extern int __strncpy_from_user(char *dst, const char *src, long count);
static
inline
long
strncpy_from_user
(
char
*
dst
,
const
char
*
src
,
long
count
)
{
might_sleep
();
if
(
likely
(
access_ok
(
VERIFY_READ
,
src
,
1
)))
return
__strncpy_from_user
(
dst
,
src
,
count
);
return
-
EFAULT
;
...
...
@@ -329,6 +336,7 @@ extern int __strnlen_user(const char *str, long len);
*/
static
inline
int
strnlen_user
(
const
char
*
str
,
long
len
)
{
might_sleep
();
if
(
likely
(
access_ok
(
VERIFY_READ
,
str
,
1
)))
return
__strnlen_user
(
str
,
len
);
return
0
;
...
...
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