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
d5dc77bf
Commit
d5dc77bf
authored
Feb 25, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consolidate compat lookup_dcookie()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
76b021d0
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
20 additions
and
60 deletions
+20
-60
arch/arm64/kernel/sys32.S
arch/arm64/kernel/sys32.S
+0
-7
arch/mips/kernel/linux32.c
arch/mips/kernel/linux32.c
+0
-6
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/scall64-o32.S
+1
-1
arch/parisc/kernel/sys_parisc32.c
arch/parisc/kernel/sys_parisc32.c
+0
-7
arch/parisc/kernel/syscall_table.S
arch/parisc/kernel/syscall_table.S
+1
-1
arch/powerpc/include/asm/systbl.h
arch/powerpc/include/asm/systbl.h
+1
-1
arch/powerpc/kernel/sys_ppc32.c
arch/powerpc/kernel/sys_ppc32.c
+0
-7
arch/s390/kernel/compat_wrapper.S
arch/s390/kernel/compat_wrapper.S
+0
-7
arch/s390/kernel/syscalls.S
arch/s390/kernel/syscalls.S
+1
-1
arch/sparc/kernel/sys_sparc32.c
arch/sparc/kernel/sys_sparc32.c
+0
-8
arch/sparc/kernel/systbls_64.S
arch/sparc/kernel/systbls_64.S
+1
-1
arch/tile/kernel/compat.c
arch/tile/kernel/compat.c
+0
-5
arch/x86/ia32/sys_ia32.c
arch/x86/ia32/sys_ia32.c
+0
-6
arch/x86/include/asm/sys_ia32.h
arch/x86/include/asm/sys_ia32.h
+0
-1
arch/x86/syscalls/syscall_32.tbl
arch/x86/syscalls/syscall_32.tbl
+1
-1
fs/dcookies.c
fs/dcookies.c
+12
-0
include/linux/compat.h
include/linux/compat.h
+1
-0
kernel/sys_ni.c
kernel/sys_ni.c
+1
-0
No files found.
arch/arm64/kernel/sys32.S
View file @
d5dc77bf
...
...
@@ -84,13 +84,6 @@ compat_sys_readahead_wrapper:
b
sys_readahead
ENDPROC
(
compat_sys_readahead_wrapper
)
compat_sys_lookup_dcookie
:
orr
x0
,
x0
,
x1
,
lsl
#
32
mov
w1
,
w2
mov
w2
,
w3
b
sys_lookup_dcookie
ENDPROC
(
compat_sys_lookup_dcookie
)
compat_sys_fadvise64_64_wrapper
:
mov
w6
,
w1
orr
x1
,
x2
,
x3
,
lsl
#
32
...
...
arch/mips/kernel/linux32.c
View file @
d5dc77bf
...
...
@@ -259,12 +259,6 @@ asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2,
merge_64
(
len_a4
,
len_a5
));
}
asmlinkage
long
sys32_lookup_dcookie
(
u32
a0
,
u32
a1
,
char
__user
*
buf
,
size_t
len
)
{
return
sys_lookup_dcookie
(
merge_64
(
a0
,
a1
),
buf
,
len
);
}
SYSCALL_DEFINE6
(
32
_fanotify_mark
,
int
,
fanotify_fd
,
unsigned
int
,
flags
,
u64
,
a3
,
u64
,
a4
,
int
,
dfd
,
const
char
__user
*
,
pathname
)
{
...
...
arch/mips/kernel/scall64-o32.S
View file @
d5dc77bf
...
...
@@ -439,7 +439,7 @@ sys_call_table:
PTR
compat_sys_io_submit
PTR
sys_io_cancel
/*
4245
*/
PTR
sys_exit_group
PTR
sys32
_lookup_dcookie
PTR
compat_sys
_lookup_dcookie
PTR
sys_epoll_create
PTR
sys_epoll_ctl
PTR
sys_epoll_wait
/*
4250
*/
...
...
arch/parisc/kernel/sys_parisc32.c
View file @
d5dc77bf
...
...
@@ -75,13 +75,6 @@ asmlinkage long sys32_semctl(int semid, int semnum, int cmd, union semun arg)
return
sys_semctl
(
semid
,
semnum
,
cmd
,
arg
);
}
long
sys32_lookup_dcookie
(
u32
cookie_high
,
u32
cookie_low
,
char
__user
*
buf
,
size_t
len
)
{
return
sys_lookup_dcookie
((
u64
)
cookie_high
<<
32
|
cookie_low
,
buf
,
len
);
}
asmlinkage
long
compat_sys_fanotify_mark
(
int
fan_fd
,
int
flags
,
u32
mask_hi
,
u32
mask_lo
,
int
fd
,
const
char
__user
*
pathname
)
...
...
arch/parisc/kernel/syscall_table.S
View file @
d5dc77bf
...
...
@@ -318,7 +318,7 @@
ENTRY_SAME
(
alloc_hugepages
)
/*
220
*/
ENTRY_SAME
(
free_hugepages
)
ENTRY_SAME
(
exit_group
)
ENTRY_
DIFF
(
lookup_dcookie
)
ENTRY_
COMP
(
lookup_dcookie
)
ENTRY_SAME
(
epoll_create
)
ENTRY_SAME
(
epoll_ctl
)
/*
225
*/
ENTRY_SAME
(
epoll_wait
)
...
...
arch/powerpc/include/asm/systbl.h
View file @
d5dc77bf
...
...
@@ -239,7 +239,7 @@ SYSCALL_SPU(io_cancel)
SYSCALL
(
set_tid_address
)
SYSX_SPU
(
sys_fadvise64
,
ppc32_fadvise64
,
sys_fadvise64
)
SYSCALL
(
exit_group
)
SYSX
(
sys_lookup_dcookie
,
ppc32_lookup_dcookie
,
sys_
lookup_dcookie
)
COMPAT_SYS
(
lookup_dcookie
)
SYSCALL_SPU
(
epoll_create
)
SYSCALL_SPU
(
epoll_ctl
)
SYSCALL_SPU
(
epoll_wait
)
...
...
arch/powerpc/kernel/sys_ppc32.c
View file @
d5dc77bf
...
...
@@ -177,13 +177,6 @@ asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long h
return
sys_ftruncate
(
fd
,
(
high
<<
32
)
|
low
);
}
long
ppc32_lookup_dcookie
(
u32
cookie_high
,
u32
cookie_low
,
char
__user
*
buf
,
size_t
len
)
{
return
sys_lookup_dcookie
((
u64
)
cookie_high
<<
32
|
cookie_low
,
buf
,
len
);
}
long
ppc32_fadvise64
(
int
fd
,
u32
unused
,
u32
offset_high
,
u32
offset_low
,
size_t
len
,
int
advice
)
{
...
...
arch/s390/kernel/compat_wrapper.S
View file @
d5dc77bf
...
...
@@ -926,13 +926,6 @@ ENTRY(sys_epoll_wait_wrapper)
lgfr
%
r5
,%
r5
#
int
jg
sys_epoll_wait
#
branch
to
system
call
ENTRY
(
sys32_lookup_dcookie_wrapper
)
sllg
%
r2
,%
r2
,
32
#
get
high
word
of
64
bit
dcookie
or
%
r2
,%
r3
#
get
low
word
of
64
bit
dcookie
llgtr
%
r3
,%
r4
#
char
*
llgfr
%
r4
,%
r5
#
size_t
jg
sys_lookup_dcookie
ENTRY
(
sys32_fadvise64_wrapper
)
lgfr
%
r2
,%
r2
#
int
sllg
%
r3
,%
r3
,
32
#
get
high
word
of
64
bit
loff_t
...
...
arch/s390/kernel/syscalls.S
View file @
d5dc77bf
...
...
@@ -118,7 +118,7 @@ SYSCALL(sys_newstat,sys_newstat,compat_sys_newstat_wrapper)
SYSCALL
(
sys_newlstat
,
sys_newlstat
,
compat_sys_newlstat_wrapper
)
SYSCALL
(
sys_newfstat
,
sys_newfstat
,
compat_sys_newfstat_wrapper
)
NI_SYSCALL
/
*
old
uname
syscall
*/
SYSCALL
(
sys_lookup_dcookie
,
sys_lookup_dcookie
,
sys32_lookup_dcookie_wrapper
)
/
*
110
*/
SYSCALL
(
sys_lookup_dcookie
,
sys_lookup_dcookie
,
compat_sys_lookup_dcookie
)
/
*
110
*/
SYSCALL
(
sys_vhangup
,
sys_vhangup
,
sys_vhangup
)
NI_SYSCALL
/
*
old
"idle"
system
call
*/
NI_SYSCALL
/
*
vm86old
for
i386
*/
...
...
arch/sparc/kernel/sys_sparc32.c
View file @
d5dc77bf
...
...
@@ -303,14 +303,6 @@ long compat_sys_fadvise64_64(int fd,
advice
);
}
long
sys32_lookup_dcookie
(
unsigned
long
cookie_high
,
unsigned
long
cookie_low
,
char
__user
*
buf
,
size_t
len
)
{
return
sys_lookup_dcookie
((
cookie_high
<<
32
)
|
cookie_low
,
buf
,
len
);
}
long
compat_sync_file_range
(
int
fd
,
unsigned
long
off_high
,
unsigned
long
off_low
,
unsigned
long
nb_high
,
unsigned
long
nb_low
,
int
flags
)
{
return
sys_sync_file_range
(
fd
,
...
...
arch/sparc/kernel/systbls_64.S
View file @
d5dc77bf
...
...
@@ -59,7 +59,7 @@ sys_call_table32:
/*
190
*/
.
word
sys_init_module
,
sys_sparc64_personality
,
sys_remap_file_pages
,
sys_epoll_create
,
sys_epoll_ctl
.
word
sys_epoll_wait
,
sys_ioprio_set
,
sys_getppid
,
compat_sys_sparc_sigaction
,
sys_sgetmask
/*
200
*/
.
word
sys_ssetmask
,
sys_sigsuspend
,
compat_sys_newlstat
,
sys_uselib
,
compat_sys_old_readdir
.
word
sys32_readahead
,
sys32_socketcall
,
sys_syslog
,
sys32
_lookup_dcookie
,
sys32_fadvise64
.
word
sys32_readahead
,
sys32_socketcall
,
sys_syslog
,
compat_sys
_lookup_dcookie
,
sys32_fadvise64
/*
210
*/
.
word
sys32_fadvise64_64
,
sys_tgkill
,
sys_waitpid
,
sys_swapoff
,
compat_sys_sysinfo
.
word
compat_sys_ipc
,
sys32_sigreturn
,
sys_clone
,
sys_ioprio_get
,
compat_sys_adjtimex
/*
220
*/
.
word
compat_sys_sigprocmask
,
sys_ni_syscall
,
sys_delete_module
,
sys_ni_syscall
,
sys_getpgid
...
...
arch/tile/kernel/compat.c
View file @
d5dc77bf
...
...
@@ -54,11 +54,6 @@ long compat_sys_pwrite64(unsigned int fd, char __user *ubuf, size_t count,
return
sys_pwrite64
(
fd
,
ubuf
,
count
,
((
loff_t
)
high
<<
32
)
|
low
);
}
long
compat_sys_lookup_dcookie
(
u32
low
,
u32
high
,
char
__user
*
buf
,
size_t
len
)
{
return
sys_lookup_dcookie
(((
loff_t
)
high
<<
32
)
|
low
,
buf
,
len
);
}
long
compat_sys_sync_file_range2
(
int
fd
,
unsigned
int
flags
,
u32
offset_lo
,
u32
offset_hi
,
u32
nbytes_lo
,
u32
nbytes_hi
)
...
...
arch/x86/ia32/sys_ia32.c
View file @
d5dc77bf
...
...
@@ -226,12 +226,6 @@ long sys32_vm86_warning(void)
return
-
ENOSYS
;
}
long
sys32_lookup_dcookie
(
u32
addr_low
,
u32
addr_high
,
char
__user
*
buf
,
size_t
len
)
{
return
sys_lookup_dcookie
(((
u64
)
addr_high
<<
32
)
|
addr_low
,
buf
,
len
);
}
asmlinkage
ssize_t
sys32_readahead
(
int
fd
,
unsigned
off_lo
,
unsigned
off_hi
,
size_t
count
)
{
...
...
arch/x86/include/asm/sys_ia32.h
View file @
d5dc77bf
...
...
@@ -45,7 +45,6 @@ asmlinkage long sys32_personality(unsigned long);
long
sys32_kill
(
int
,
int
);
long
sys32_fadvise64_64
(
int
,
__u32
,
__u32
,
__u32
,
__u32
,
int
);
long
sys32_vm86_warning
(
void
);
long
sys32_lookup_dcookie
(
u32
,
u32
,
char
__user
*
,
size_t
);
asmlinkage
ssize_t
sys32_readahead
(
int
,
unsigned
,
unsigned
,
size_t
);
asmlinkage
long
sys32_sync_file_range
(
int
,
unsigned
,
unsigned
,
...
...
arch/x86/syscalls/syscall_32.tbl
View file @
d5dc77bf
...
...
@@ -259,7 +259,7 @@
250 i386 fadvise64 sys_fadvise64 sys32_fadvise64
# 251 is available for reuse (was briefly sys_set_zone_reclaim)
252 i386 exit_group sys_exit_group
253 i386 lookup_dcookie sys_lookup_dcookie
sys32
_lookup_dcookie
253 i386 lookup_dcookie sys_lookup_dcookie
compat_sys
_lookup_dcookie
254 i386 epoll_create sys_epoll_create
255 i386 epoll_ctl sys_epoll_ctl
256 i386 epoll_wait sys_epoll_wait
...
...
fs/dcookies.c
View file @
d5dc77bf
...
...
@@ -25,6 +25,7 @@
#include <linux/dcookies.h>
#include <linux/mutex.h>
#include <linux/path.h>
#include <linux/compat.h>
#include <asm/uaccess.h>
/* The dcookies are allocated from a kmem_cache and
...
...
@@ -202,6 +203,17 @@ SYSCALL_DEFINE3(lookup_dcookie, u64, cookie64, char __user *, buf, size_t, len)
return
err
;
}
#ifdef CONFIG_COMPAT
COMPAT_SYSCALL_DEFINE4
(
lookup_dcookie
,
u32
,
w0
,
u32
,
w1
,
char
__user
*
,
buf
,
size_t
,
len
)
{
#ifdef __BIG_ENDIAN
return
sys_lookup_dcookie
(((
u64
)
w0
<<
32
)
|
w1
,
buf
,
len
);
#else
return
sys_lookup_dcookie
(((
u64
)
w1
<<
32
)
|
w0
,
buf
,
len
);
#endif
}
#endif
static
int
dcookie_init
(
void
)
{
struct
list_head
*
d
;
...
...
include/linux/compat.h
View file @
d5dc77bf
...
...
@@ -429,6 +429,7 @@ extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
asmlinkage
long
compat_sys_ptrace
(
compat_long_t
request
,
compat_long_t
pid
,
compat_long_t
addr
,
compat_long_t
data
);
asmlinkage
long
compat_sys_lookup_dcookie
(
u32
,
u32
,
char
__user
*
,
size_t
);
/*
* epoll (fs/eventpoll.c) compat bits follow ...
*/
...
...
kernel/sys_ni.c
View file @
d5dc77bf
...
...
@@ -20,6 +20,7 @@ cond_syscall(sys_quotactl);
cond_syscall
(
sys32_quotactl
);
cond_syscall
(
sys_acct
);
cond_syscall
(
sys_lookup_dcookie
);
cond_syscall
(
compat_sys_lookup_dcookie
);
cond_syscall
(
sys_swapon
);
cond_syscall
(
sys_swapoff
);
cond_syscall
(
sys_kexec_load
);
...
...
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