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
d808f621
Commit
d808f621
authored
Mar 10, 2003
by
Stephen Rothwell
Committed by
Christoph Hellwig
Mar 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] compat_sys_fcntl{,64} s390x part
Here is the s390x part of the patch with Martin's blessing.
parent
61d38b3c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
66 deletions
+23
-66
arch/s390x/kernel/entry.S
arch/s390x/kernel/entry.S
+2
-2
arch/s390x/kernel/linux32.c
arch/s390x/kernel/linux32.c
+0
-51
arch/s390x/kernel/linux32.h
arch/s390x/kernel/linux32.h
+0
-4
arch/s390x/kernel/wrapper32.S
arch/s390x/kernel/wrapper32.S
+6
-6
include/asm-s390x/compat.h
include/asm-s390x/compat.h
+15
-1
include/asm-s390x/fcntl.h
include/asm-s390x/fcntl.h
+0
-2
No files found.
arch/s390x/kernel/entry.S
View file @
d808f621
...
@@ -452,7 +452,7 @@ sys_call_table:
...
@@ -452,7 +452,7 @@ sys_call_table:
.
long
SYSCALL
(
sys_umount
,
sys32_umount_wrapper
)
.
long
SYSCALL
(
sys_umount
,
sys32_umount_wrapper
)
.
long
SYSCALL
(
sys_ni_syscall
,
sys_ni_syscall
)
/*
old
lock
syscall
*/
.
long
SYSCALL
(
sys_ni_syscall
,
sys_ni_syscall
)
/*
old
lock
syscall
*/
.
long
SYSCALL
(
sys_ioctl
,
sys32_ioctl_wrapper
)
.
long
SYSCALL
(
sys_ioctl
,
sys32_ioctl_wrapper
)
.
long
SYSCALL
(
sys_fcntl
,
sys32
_fcntl_wrapper
)
/*
55
*/
.
long
SYSCALL
(
sys_fcntl
,
compat_sys
_fcntl_wrapper
)
/*
55
*/
.
long
SYSCALL
(
sys_ni_syscall
,
sys_ni_syscall
)
/*
intel
mpx
syscall
*/
.
long
SYSCALL
(
sys_ni_syscall
,
sys_ni_syscall
)
/*
intel
mpx
syscall
*/
.
long
SYSCALL
(
sys_setpgid
,
sys32_setpgid_wrapper
)
.
long
SYSCALL
(
sys_setpgid
,
sys32_setpgid_wrapper
)
.
long
SYSCALL
(
sys_ni_syscall
,
sys_ni_syscall
)
/*
old
ulimit
syscall
*/
.
long
SYSCALL
(
sys_ni_syscall
,
sys_ni_syscall
)
/*
old
ulimit
syscall
*/
...
@@ -618,7 +618,7 @@ sys_call_table:
...
@@ -618,7 +618,7 @@ sys_call_table:
.
long
SYSCALL
(
sys_mincore
,
sys32_mincore_wrapper
)
.
long
SYSCALL
(
sys_mincore
,
sys32_mincore_wrapper
)
.
long
SYSCALL
(
sys_madvise
,
sys32_madvise_wrapper
)
.
long
SYSCALL
(
sys_madvise
,
sys32_madvise_wrapper
)
.
long
SYSCALL
(
sys_getdents64
,
sys32_getdents64_wrapper
)/*
220
*/
.
long
SYSCALL
(
sys_getdents64
,
sys32_getdents64_wrapper
)/*
220
*/
.
long
SYSCALL
(
sys_ni_syscall
,
sys32
_fcntl64_wrapper
)
.
long
SYSCALL
(
sys_ni_syscall
,
compat_sys
_fcntl64_wrapper
)
.
long
SYSCALL
(
sys_readahead
,
sys32_readahead
)
.
long
SYSCALL
(
sys_readahead
,
sys32_readahead
)
.
long
SYSCALL
(
sys_ni_syscall
,
sys32_sendfile64
)
.
long
SYSCALL
(
sys_ni_syscall
,
sys32_sendfile64
)
.
long
SYSCALL
(
sys_setxattr
,
sys32_setxattr_wrapper
)
.
long
SYSCALL
(
sys_setxattr
,
sys32_setxattr_wrapper
)
...
...
arch/s390x/kernel/linux32.c
View file @
d808f621
...
@@ -834,57 +834,6 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
...
@@ -834,57 +834,6 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
return
err
;
return
err
;
}
}
extern
asmlinkage
long
sys_fcntl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
);
asmlinkage
long
sys32_fcntl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
switch
(
cmd
)
{
case
F_GETLK
:
{
struct
flock
f
;
mm_segment_t
old_fs
;
long
ret
;
if
(
get_compat_flock
(
&
f
,
(
struct
compat_flock
*
)
A
(
arg
)))
return
-
EFAULT
;
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_fcntl
(
fd
,
cmd
,
(
unsigned
long
)
&
f
);
set_fs
(
old_fs
);
if
(
ret
)
return
ret
;
if
(
f
.
l_start
>=
0x7fffffffUL
||
f
.
l_start
+
f
.
l_len
>=
0x7fffffffUL
)
return
-
EOVERFLOW
;
if
(
put_compat_flock
(
&
f
,
(
struct
compat_flock
*
)
A
(
arg
)))
return
-
EFAULT
;
return
0
;
}
case
F_SETLK
:
case
F_SETLKW
:
{
struct
flock
f
;
mm_segment_t
old_fs
;
long
ret
;
if
(
get_compat_flock
(
&
f
,
(
struct
compat_flock
*
)
A
(
arg
)))
return
-
EFAULT
;
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_fcntl
(
fd
,
cmd
,
(
unsigned
long
)
&
f
);
set_fs
(
old_fs
);
if
(
ret
)
return
ret
;
return
0
;
}
default:
return
sys_fcntl
(
fd
,
cmd
,
(
unsigned
long
)
arg
);
}
}
asmlinkage
long
sys32_fcntl64
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
if
(
cmd
>=
F_GETLK64
&&
cmd
<=
F_SETLKW64
)
return
sys_fcntl
(
fd
,
cmd
+
F_GETLK
-
F_GETLK64
,
arg
);
return
sys32_fcntl
(
fd
,
cmd
,
arg
);
}
extern
asmlinkage
long
sys_truncate
(
const
char
*
path
,
unsigned
long
length
);
extern
asmlinkage
long
sys_truncate
(
const
char
*
path
,
unsigned
long
length
);
extern
asmlinkage
long
sys_ftruncate
(
unsigned
int
fd
,
unsigned
long
length
);
extern
asmlinkage
long
sys_ftruncate
(
unsigned
int
fd
,
unsigned
long
length
);
...
...
arch/s390x/kernel/linux32.h
View file @
d808f621
...
@@ -21,10 +21,6 @@ struct ipc_kludge_32 {
...
@@ -21,10 +21,6 @@ struct ipc_kludge_32 {
__s32
msgtyp
;
__s32
msgtyp
;
};
};
#define F_GETLK64 12
#define F_SETLK64 13
#define F_SETLKW64 14
struct
old_sigaction32
{
struct
old_sigaction32
{
__u32
sa_handler
;
/* Really a pointer, but need to deal with 32 bits */
__u32
sa_handler
;
/* Really a pointer, but need to deal with 32 bits */
compat_old_sigset_t
sa_mask
;
/* A 32 bit mask */
compat_old_sigset_t
sa_mask
;
/* A 32 bit mask */
...
...
arch/s390x/kernel/wrapper32.S
View file @
d808f621
...
@@ -227,12 +227,12 @@ sys32_ioctl_wrapper:
...
@@ -227,12 +227,12 @@ sys32_ioctl_wrapper:
llgfr
%
r4
,%
r4
#
unsigned
int
llgfr
%
r4
,%
r4
#
unsigned
int
jg
sys32_ioctl
#
branch
to
system
call
jg
sys32_ioctl
#
branch
to
system
call
.
globl
sys32
_fcntl_wrapper
.
globl
compat_sys
_fcntl_wrapper
sys32
_fcntl_wrapper
:
compat_sys
_fcntl_wrapper
:
llgfr
%
r2
,%
r2
#
unsigned
int
llgfr
%
r2
,%
r2
#
unsigned
int
llgfr
%
r3
,%
r3
#
unsigned
int
llgfr
%
r3
,%
r3
#
unsigned
int
llgfr
%
r4
,%
r4
#
unsigned
long
llgfr
%
r4
,%
r4
#
unsigned
long
jg
sys32_fcntl
#
branch
to
system
call
jg
compat_sys_fcntl
#
branch
to
system
call
.
globl
sys32_setpgid_wrapper
.
globl
sys32_setpgid_wrapper
sys32_setpgid_wrapper
:
sys32_setpgid_wrapper
:
...
@@ -1050,12 +1050,12 @@ sys32_getdents64_wrapper:
...
@@ -1050,12 +1050,12 @@ sys32_getdents64_wrapper:
llgfr
%
r4
,%
r4
#
unsigned
int
llgfr
%
r4
,%
r4
#
unsigned
int
jg
sys_getdents64
#
branch
to
system
call
jg
sys_getdents64
#
branch
to
system
call
.
globl
sys32
_fcntl64_wrapper
.
globl
compat_sys
_fcntl64_wrapper
sys32
_fcntl64_wrapper
:
compat_sys
_fcntl64_wrapper
:
llgfr
%
r2
,%
r2
#
unsigned
int
llgfr
%
r2
,%
r2
#
unsigned
int
llgfr
%
r3
,%
r3
#
unsigned
int
llgfr
%
r3
,%
r3
#
unsigned
int
llgfr
%
r4
,%
r4
#
unsigned
long
llgfr
%
r4
,%
r4
#
unsigned
long
jg
sys32_fcntl64
#
branch
to
system
call
jg
compat_sys_fcntl64
#
branch
to
system
call
.
globl
sys32_stat64_wrapper
.
globl
sys32_stat64_wrapper
sys32_stat64_wrapper
:
sys32_stat64_wrapper
:
...
...
include/asm-s390x/compat.h
View file @
d808f621
...
@@ -64,7 +64,18 @@ struct compat_flock {
...
@@ -64,7 +64,18 @@ struct compat_flock {
compat_off_t
l_start
;
compat_off_t
l_start
;
compat_off_t
l_len
;
compat_off_t
l_len
;
compat_pid_t
l_pid
;
compat_pid_t
l_pid
;
short
__unused
;
};
#define F_GETLK64 12
#define F_SETLK64 13
#define F_SETLKW64 14
struct
compat_flock64
{
short
l_type
;
short
l_whence
;
compat_loff_t
l_start
;
compat_loff_t
l_len
;
compat_pid_t
l_pid
;
};
};
struct
compat_statfs
{
struct
compat_statfs
{
...
@@ -87,4 +98,7 @@ typedef u32 compat_old_sigset_t; /* at least 32 bits */
...
@@ -87,4 +98,7 @@ typedef u32 compat_old_sigset_t; /* at least 32 bits */
typedef
u32
compat_sigset_word
;
typedef
u32
compat_sigset_word
;
#define COMPAT_OFF_T_MAX 0x7fffffff
#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
#endif
/* _ASM_S390X_COMPAT_H */
#endif
/* _ASM_S390X_COMPAT_H */
include/asm-s390x/fcntl.h
View file @
d808f621
...
@@ -80,6 +80,4 @@ struct flock {
...
@@ -80,6 +80,4 @@ struct flock {
#define F_LINUX_SPECIFIC_BASE 1024
#define F_LINUX_SPECIFIC_BASE 1024
#define flock64 flock
#endif
#endif
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