Skip to content

Commit

Permalink
Merge branch 'setns'
Browse files Browse the repository at this point in the history
* setns:
  ns: Wire up the setns system call

Done as a merge to make it easier to fix up conflicts in arm due to
addition of sendmmsg system call
  • Loading branch information
torvalds committed May 28, 2011
2 parents 29a6ccc + 7b21fdd commit 571503e
Show file tree
Hide file tree
Showing 50 changed files with 87 additions and 29 deletions.
3 changes: 2 additions & 1 deletion arch/alpha/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,11 @@
#define __NR_open_by_handle_at 498
#define __NR_clock_adjtime 499
#define __NR_syncfs 500
#define __NR_setns 501

#ifdef __KERNEL__

#define NR_SYSCALLS 501
#define NR_SYSCALLS 502

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
Expand Down
1 change: 1 addition & 0 deletions arch/alpha/kernel/systbls.S
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ sys_call_table:
.quad sys_open_by_handle_at
.quad sys_clock_adjtime
.quad sys_syncfs /* 500 */
.quad sys_setns

.size sys_call_table, . - sys_call_table
.type sys_call_table, @object
Expand Down
1 change: 1 addition & 0 deletions arch/arm/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
#define __NR_clock_adjtime (__NR_SYSCALL_BASE+372)
#define __NR_syncfs (__NR_SYSCALL_BASE+373)
#define __NR_sendmmsg (__NR_SYSCALL_BASE+374)
#define __NR_setns (__NR_SYSCALL_BASE+375)

/*
* The following SWIs are ARM private.
Expand Down
1 change: 1 addition & 0 deletions arch/arm/kernel/calls.S
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@
CALL(sys_clock_adjtime)
CALL(sys_syncfs)
CALL(sys_sendmmsg)
/* 375 */ CALL(sys_setns)
#ifndef syscalls_counted
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
#define syscalls_counted
Expand Down
3 changes: 2 additions & 1 deletion arch/avr32/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,10 @@
#define __NR_signalfd 279
/* 280 was __NR_timerfd */
#define __NR_eventfd 281
#define __NR_setns 283

#ifdef __KERNEL__
#define NR_syscalls 282
#define NR_syscalls 284

/* Old stuff */
#define __IGNORE_uselib
Expand Down
1 change: 1 addition & 0 deletions arch/avr32/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,5 @@ sys_call_table:
.long sys_ni_syscall /* 280, was sys_timerfd */
.long sys_eventfd
.long sys_recvmmsg
.long sys_setns
.long sys_ni_syscall /* r8 is saturated at nr_syscalls */
3 changes: 2 additions & 1 deletion arch/blackfin/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,9 @@
#define __NR_open_by_handle_at 376
#define __NR_clock_adjtime 377
#define __NR_syncfs 378
#define __NR_setns 379

#define __NR_syscall 379
#define __NR_syscall 380
#define NR_syscalls __NR_syscall

/* Old optional stuff no one actually uses */
Expand Down
1 change: 1 addition & 0 deletions arch/blackfin/mach-common/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,7 @@ ENTRY(_sys_call_table)
.long _sys_open_by_handle_at
.long _sys_clock_adjtime
.long _sys_syncfs
.long _sys_setns

.rept NR_syscalls-(.-_sys_call_table)/4
.long _sys_ni_syscall
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v10/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ sys_call_table:
.long sys_inotify_init1
.long sys_preadv
.long sys_pwritev
.long sys_setns /* 335 */

/*
* NOTE!! This doesn't have to be exact - we just have
Expand Down
1 change: 1 addition & 0 deletions arch/cris/arch-v32/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ sys_call_table:
.long sys_inotify_init1
.long sys_preadv
.long sys_pwritev
.long sys_setns /* 335 */

/*
* NOTE!! This doesn't have to be exact - we just have
Expand Down
3 changes: 2 additions & 1 deletion arch/cris/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,11 @@
#define __NR_inotify_init1 332
#define __NR_preadv 333
#define __NR_pwritev 334
#define __NR_setns 335

#ifdef __KERNEL__

#define NR_syscalls 335
#define NR_syscalls 336

#include <arch/unistd.h>

Expand Down
3 changes: 2 additions & 1 deletion arch/frv/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,11 @@
#define __NR_pwritev 334
#define __NR_rt_tgsigqueueinfo 335
#define __NR_perf_event_open 336
#define __NR_setns 337

#ifdef __KERNEL__

#define NR_syscalls 337
#define NR_syscalls 338

#define __ARCH_WANT_IPC_PARSE_VERSION
/* #define __ARCH_WANT_OLD_READDIR */
Expand Down
1 change: 1 addition & 0 deletions arch/frv/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -1526,5 +1526,6 @@ sys_call_table:
.long sys_pwritev
.long sys_rt_tgsigqueueinfo /* 335 */
.long sys_perf_event_open
.long sys_setns

syscall_table_size = (. - sys_call_table)
3 changes: 2 additions & 1 deletion arch/h8300/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,11 @@
#define __NR_move_pages 317
#define __NR_getcpu 318
#define __NR_epoll_pwait 319
#define __NR_setns 320

#ifdef __KERNEL__

#define NR_syscalls 320
#define NR_syscalls 321

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
Expand Down
1 change: 1 addition & 0 deletions arch/h8300/kernel/syscalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ SYMBOL_NAME_LABEL(sys_call_table)
.long SYMBOL_NAME(sys_ni_syscall) /* sys_move_pages */
.long SYMBOL_NAME(sys_getcpu)
.long SYMBOL_NAME(sys_ni_syscall) /* sys_epoll_pwait */
.long SYMBOL_NAME(sys_setns) /* 320 */

.macro call_sp addr
mov.l #SYMBOL_NAME(\addr),er6
Expand Down
3 changes: 2 additions & 1 deletion arch/ia64/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,12 @@
#define __NR_open_by_handle_at 1327
#define __NR_clock_adjtime 1328
#define __NR_syncfs 1329
#define __NR_setns 1330

#ifdef __KERNEL__


#define NR_syscalls 306 /* length of syscall table */
#define NR_syscalls 307 /* length of syscall table */

/*
* The following defines stop scripts/checksyscalls.sh from complaining about
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -1775,6 +1775,7 @@ sys_call_table:
data8 sys_open_by_handle_at
data8 sys_clock_adjtime
data8 sys_syncfs
data8 sys_setns // 1330

.org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
3 changes: 2 additions & 1 deletion arch/m32r/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,11 @@
/* #define __NR_timerfd 322 removed */
#define __NR_eventfd 323
#define __NR_fallocate 324
#define __NR_setns 325

#ifdef __KERNEL__

#define NR_syscalls 325
#define NR_syscalls 326

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_STAT64
Expand Down
1 change: 1 addition & 0 deletions arch/m32r/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,4 @@ ENTRY(sys_call_table)
.long sys_ni_syscall
.long sys_eventfd
.long sys_fallocate
.long sys_setns /* 325 */
3 changes: 2 additions & 1 deletion arch/m68k/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,11 @@
#define __NR_open_by_handle_at 341
#define __NR_clock_adjtime 342
#define __NR_syncfs 343
#define __NR_setns 344

#ifdef __KERNEL__

#define NR_syscalls 344
#define NR_syscalls 345

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/kernel/syscalltable.S
Original file line number Diff line number Diff line change
Expand Up @@ -364,4 +364,5 @@ ENTRY(sys_call_table)
.long sys_open_by_handle_at
.long sys_clock_adjtime
.long sys_syncfs
.long sys_setns

3 changes: 2 additions & 1 deletion arch/microblaze/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,9 @@
#define __NR_open_by_handle_at 372
#define __NR_clock_adjtime 373
#define __NR_syncfs 374
#define __NR_setns 375

#define __NR_syscalls 375
#define __NR_syscalls 376

#ifdef __KERNEL__
#ifndef __ASSEMBLY__
Expand Down
1 change: 1 addition & 0 deletions arch/microblaze/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,4 @@ ENTRY(sys_call_table)
.long sys_open_by_handle_at
.long sys_clock_adjtime
.long sys_syncfs
.long sys_setns /* 375 */
15 changes: 9 additions & 6 deletions arch/mips/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,17 @@
#define __NR_open_by_handle_at (__NR_Linux + 340)
#define __NR_clock_adjtime (__NR_Linux + 341)
#define __NR_syncfs (__NR_Linux + 342)
#define __NR_setns (__NR_Linux + 343)

/*
* Offset of the last Linux o32 flavoured syscall
*/
#define __NR_Linux_syscalls 342
#define __NR_Linux_syscalls 343

#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */

#define __NR_O32_Linux 4000
#define __NR_O32_Linux_syscalls 342
#define __NR_O32_Linux_syscalls 343

#if _MIPS_SIM == _MIPS_SIM_ABI64

Expand Down Expand Up @@ -682,16 +683,17 @@
#define __NR_open_by_handle_at (__NR_Linux + 299)
#define __NR_clock_adjtime (__NR_Linux + 300)
#define __NR_syncfs (__NR_Linux + 301)
#define __NR_setns (__NR_Linux + 302)

/*
* Offset of the last Linux 64-bit flavoured syscall
*/
#define __NR_Linux_syscalls 301
#define __NR_Linux_syscalls 302

#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */

#define __NR_64_Linux 5000
#define __NR_64_Linux_syscalls 301
#define __NR_64_Linux_syscalls 302

#if _MIPS_SIM == _MIPS_SIM_NABI32

Expand Down Expand Up @@ -1006,16 +1008,17 @@
#define __NR_open_by_handle_at (__NR_Linux + 304)
#define __NR_clock_adjtime (__NR_Linux + 305)
#define __NR_syncfs (__NR_Linux + 306)
#define __NR_setns (__NR_Linux + 307)

/*
* Offset of the last N32 flavoured syscall
*/
#define __NR_Linux_syscalls 306
#define __NR_Linux_syscalls 307

#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */

#define __NR_N32_Linux 6000
#define __NR_N32_Linux_syscalls 306
#define __NR_N32_Linux_syscalls 307

#ifdef __KERNEL__

Expand Down
1 change: 1 addition & 0 deletions arch/mips/kernel/scall32-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ einval: li v0, -ENOSYS
sys sys_open_by_handle_at 3 /* 4340 */
sys sys_clock_adjtime 2
sys sys_syncfs 1
sys sys_setns 2
.endm

/* We pre-compute the number of _instruction_ bytes needed to
Expand Down
1 change: 1 addition & 0 deletions arch/mips/kernel/scall64-64.S
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,5 @@ sys_call_table:
PTR sys_open_by_handle_at
PTR sys_clock_adjtime /* 5300 */
PTR sys_syncfs
PTR sys_setns
.size sys_call_table,.-sys_call_table
1 change: 1 addition & 0 deletions arch/mips/kernel/scall64-n32.S
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,5 @@ EXPORT(sysn32_call_table)
PTR sys_open_by_handle_at
PTR compat_sys_clock_adjtime /* 6305 */
PTR sys_syncfs
PTR sys_setns
.size sysn32_call_table,.-sysn32_call_table
1 change: 1 addition & 0 deletions arch/mips/kernel/scall64-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -546,4 +546,5 @@ sys_call_table:
PTR compat_sys_open_by_handle_at /* 4340 */
PTR compat_sys_clock_adjtime
PTR sys_syncfs
PTR sys_setns
.size sys_call_table,.-sys_call_table
3 changes: 2 additions & 1 deletion arch/mn10300/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,11 @@
#define __NR_rt_tgsigqueueinfo 336
#define __NR_perf_event_open 337
#define __NR_recvmmsg 338
#define __NR_setns 339

#ifdef __KERNEL__

#define NR_syscalls 339
#define NR_syscalls 340

/*
* specify the deprecated syscalls we want to support on this arch
Expand Down
1 change: 1 addition & 0 deletions arch/mn10300/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ ENTRY(sys_call_table)
.long sys_rt_tgsigqueueinfo
.long sys_perf_event_open
.long sys_recvmmsg
.long sys_setns


nr_syscalls=(.-sys_call_table)/4
3 changes: 2 additions & 1 deletion arch/parisc/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,9 @@
#define __NR_name_to_handle_at (__NR_Linux + 325)
#define __NR_open_by_handle_at (__NR_Linux + 326)
#define __NR_syncfs (__NR_Linux + 327)
#define __NR_setns (__NR_Linux + 328)

#define __NR_Linux_syscalls (__NR_syncfs + 1)
#define __NR_Linux_syscalls (__NR_setns + 1)


#define __IGNORE_select /* newselect */
Expand Down
1 change: 1 addition & 0 deletions arch/parisc/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@
ENTRY_SAME(name_to_handle_at) /* 325 */
ENTRY_COMP(open_by_handle_at)
ENTRY_SAME(syncfs)
ENTRY_SAME(setns)

/* Nothing yet */

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/systbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,4 @@ COMPAT_SYS_SPU(open_by_handle_at)
COMPAT_SYS_SPU(clock_adjtime)
SYSCALL_SPU(syncfs)
COMPAT_SYS_SPU(sendmmsg)
SYSCALL_SPU(setns)
3 changes: 2 additions & 1 deletion arch/powerpc/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,11 @@
#define __NR_clock_adjtime 347
#define __NR_syncfs 348
#define __NR_sendmmsg 349
#define __NR_setns 350

#ifdef __KERNEL__

#define __NR_syscalls 350
#define __NR_syscalls 351

#define __NR__exit __NR_exit
#define NR_syscalls __NR_syscalls
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@
#define __NR_open_by_handle_at 336
#define __NR_clock_adjtime 337
#define __NR_syncfs 338
#define NR_syscalls 339
#define __NR_setns 339
#define NR_syscalls 340

/*
* There are some system calls that are not present on 64 bit, some
Expand Down
6 changes: 6 additions & 0 deletions arch/s390/kernel/compat_wrapper.S
Original file line number Diff line number Diff line change
Expand Up @@ -1904,3 +1904,9 @@ compat_sys_clock_adjtime_wrapper:
sys_syncfs_wrapper:
lgfr %r2,%r2 # int
jg sys_syncfs

.globl sys_setns_wrapper
sys_setns_wrapper:
lgfr %r2,%r2 # int
lgfr %r3,%r3 # int
jg sys_setns
1 change: 1 addition & 0 deletions arch/s390/kernel/syscalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,4 @@ SYSCALL(sys_name_to_handle_at,sys_name_to_handle_at,sys_name_to_handle_at_wrappe
SYSCALL(sys_open_by_handle_at,sys_open_by_handle_at,compat_sys_open_by_handle_at_wrapper)
SYSCALL(sys_clock_adjtime,sys_clock_adjtime,compat_sys_clock_adjtime_wrapper)
SYSCALL(sys_syncfs,sys_syncfs,sys_syncfs_wrapper)
SYSCALL(sys_setns,sys_setns,sys_setns_wrapper)
3 changes: 2 additions & 1 deletion arch/sh/include/asm/unistd_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,9 @@
#define __NR_clock_adjtime 361
#define __NR_syncfs 362
#define __NR_sendmmsg 363
#define __NR_setns 364

#define NR_syscalls 364
#define NR_syscalls 365

#ifdef __KERNEL__

Expand Down
Loading

0 comments on commit 571503e

Please sign in to comment.