aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-05-27 22:28:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-28 13:48:39 -0400
commit7b21fddd087678a70ad64afc0f632e0f1071b092 (patch)
treec3ee152ab9b57b6cbc1ee3c6fd495c704ec47f66 /arch
parent14d74e0cab7a7779a7ff0c3863c04c8a8e507106 (diff)
ns: Wire up the setns system call
32bit and 64bit on x86 are tested and working. The rest I have looked at closely and I can't find any problems. setns is an easy system call to wire up. It just takes two ints so I don't expect any weird architecture porting problems. While doing this I have noticed that we have some architectures that are very slow to get new system calls. cris seems to be the slowest where the last system calls wired up were preadv and pwritev. avr32 is weird in that recvmmsg was wired up but never declared in unistd.h. frv is behind with perf_event_open being the last syscall wired up. On h8300 the last system call wired up was epoll_wait. On m32r the last system call wired up was fallocate. mn10300 has recvmmsg as the last system call wired up. The rest seem to at least have syncfs wired up which was new in the 2.6.39. v2: Most of the architecture support added by Daniel Lezcano <dlezcano@fr.ibm.com> v3: ported to v2.6.36-rc4 by: Eric W. Biederman <ebiederm@xmission.com> v4: Moved wiring up of the system call to another patch v5: ported to v2.6.39-rc6 v6: rebased onto parisc-next and net-next to avoid syscall conflicts. v7: ported to Linus's latest post 2.6.39 tree. >  arch/blackfin/include/asm/unistd.h     |    3 ++- >  arch/blackfin/mach-common/entry.S      |    1 + Acked-by: Mike Frysinger <vapier@gentoo.org> Oh - ia64 wiring looks good. Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/asm/unistd.h3
-rw-r--r--arch/alpha/kernel/systbls.S1
-rw-r--r--arch/arm/include/asm/unistd.h1
-rw-r--r--arch/arm/kernel/calls.S1
-rw-r--r--arch/avr32/include/asm/unistd.h3
-rw-r--r--arch/avr32/kernel/syscall_table.S1
-rw-r--r--arch/blackfin/include/asm/unistd.h3
-rw-r--r--arch/blackfin/mach-common/entry.S1
-rw-r--r--arch/cris/arch-v10/kernel/entry.S1
-rw-r--r--arch/cris/arch-v32/kernel/entry.S1
-rw-r--r--arch/cris/include/asm/unistd.h3
-rw-r--r--arch/frv/include/asm/unistd.h3
-rw-r--r--arch/frv/kernel/entry.S1
-rw-r--r--arch/h8300/include/asm/unistd.h3
-rw-r--r--arch/h8300/kernel/syscalls.S1
-rw-r--r--arch/ia64/include/asm/unistd.h3
-rw-r--r--arch/ia64/kernel/entry.S1
-rw-r--r--arch/m32r/include/asm/unistd.h3
-rw-r--r--arch/m32r/kernel/syscall_table.S1
-rw-r--r--arch/m68k/include/asm/unistd.h3
-rw-r--r--arch/m68k/kernel/syscalltable.S1
-rw-r--r--arch/microblaze/include/asm/unistd.h3
-rw-r--r--arch/microblaze/kernel/syscall_table.S1
-rw-r--r--arch/mips/include/asm/unistd.h15
-rw-r--r--arch/mips/kernel/scall32-o32.S1
-rw-r--r--arch/mips/kernel/scall64-64.S1
-rw-r--r--arch/mips/kernel/scall64-n32.S1
-rw-r--r--arch/mips/kernel/scall64-o32.S1
-rw-r--r--arch/mn10300/include/asm/unistd.h3
-rw-r--r--arch/mn10300/kernel/entry.S1
-rw-r--r--arch/parisc/include/asm/unistd.h3
-rw-r--r--arch/parisc/kernel/syscall_table.S1
-rw-r--r--arch/powerpc/include/asm/systbl.h1
-rw-r--r--arch/powerpc/include/asm/unistd.h3
-rw-r--r--arch/s390/include/asm/unistd.h3
-rw-r--r--arch/s390/kernel/compat_wrapper.S6
-rw-r--r--arch/s390/kernel/syscalls.S1
-rw-r--r--arch/sh/include/asm/unistd_32.h3
-rw-r--r--arch/sh/include/asm/unistd_64.h3
-rw-r--r--arch/sh/kernel/syscalls_32.S1
-rw-r--r--arch/sh/kernel/syscalls_64.S1
-rw-r--r--arch/sparc/include/asm/unistd.h3
-rw-r--r--arch/sparc/kernel/systbls_32.S2
-rw-r--r--arch/sparc/kernel/systbls_64.S4
-rw-r--r--arch/x86/ia32/ia32entry.S1
-rw-r--r--arch/x86/include/asm/unistd_32.h3
-rw-r--r--arch/x86/include/asm/unistd_64.h2
-rw-r--r--arch/x86/kernel/syscall_table_32.S1
-rw-r--r--arch/xtensa/include/asm/unistd.h4
49 files changed, 84 insertions, 28 deletions
diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h
index b1834166922d..4ac48a095f3a 100644
--- a/arch/alpha/include/asm/unistd.h
+++ b/arch/alpha/include/asm/unistd.h
@@ -456,10 +456,11 @@
456#define __NR_open_by_handle_at 498 456#define __NR_open_by_handle_at 498
457#define __NR_clock_adjtime 499 457#define __NR_clock_adjtime 499
458#define __NR_syncfs 500 458#define __NR_syncfs 500
459#define __NR_setns 501
459 460
460#ifdef __KERNEL__ 461#ifdef __KERNEL__
461 462
462#define NR_SYSCALLS 501 463#define NR_SYSCALLS 502
463 464
464#define __ARCH_WANT_IPC_PARSE_VERSION 465#define __ARCH_WANT_IPC_PARSE_VERSION
465#define __ARCH_WANT_OLD_READDIR 466#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
index 15f999d41c75..b9c28f3f1956 100644
--- a/arch/alpha/kernel/systbls.S
+++ b/arch/alpha/kernel/systbls.S
@@ -519,6 +519,7 @@ sys_call_table:
519 .quad sys_open_by_handle_at 519 .quad sys_open_by_handle_at
520 .quad sys_clock_adjtime 520 .quad sys_clock_adjtime
521 .quad sys_syncfs /* 500 */ 521 .quad sys_syncfs /* 500 */
522 .quad sys_setns
522 523
523 .size sys_call_table, . - sys_call_table 524 .size sys_call_table, . - sys_call_table
524 .type sys_call_table, @object 525 .type sys_call_table, @object
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 87dbe3e21970..0c5fc55ad800 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -400,6 +400,7 @@
400#define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) 400#define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371)
401#define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) 401#define __NR_clock_adjtime (__NR_SYSCALL_BASE+372)
402#define __NR_syncfs (__NR_SYSCALL_BASE+373) 402#define __NR_syncfs (__NR_SYSCALL_BASE+373)
403#define __NR_setns (__NR_SYSCALL_BASE+374)
403 404
404/* 405/*
405 * The following SWIs are ARM private. 406 * The following SWIs are ARM private.
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 7fbf28c35bb2..a05f75928bea 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -383,6 +383,7 @@
383 CALL(sys_open_by_handle_at) 383 CALL(sys_open_by_handle_at)
384 CALL(sys_clock_adjtime) 384 CALL(sys_clock_adjtime)
385 CALL(sys_syncfs) 385 CALL(sys_syncfs)
386 CALL(sys_setns)
386#ifndef syscalls_counted 387#ifndef syscalls_counted
387.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 388.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
388#define syscalls_counted 389#define syscalls_counted
diff --git a/arch/avr32/include/asm/unistd.h b/arch/avr32/include/asm/unistd.h
index 89861a27543e..f714544e5560 100644
--- a/arch/avr32/include/asm/unistd.h
+++ b/arch/avr32/include/asm/unistd.h
@@ -299,9 +299,10 @@
299#define __NR_signalfd 279 299#define __NR_signalfd 279
300/* 280 was __NR_timerfd */ 300/* 280 was __NR_timerfd */
301#define __NR_eventfd 281 301#define __NR_eventfd 281
302#define __NR_setns 283
302 303
303#ifdef __KERNEL__ 304#ifdef __KERNEL__
304#define NR_syscalls 282 305#define NR_syscalls 284
305 306
306/* Old stuff */ 307/* Old stuff */
307#define __IGNORE_uselib 308#define __IGNORE_uselib
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S
index e76bad16b0f0..c7fd394d28a4 100644
--- a/arch/avr32/kernel/syscall_table.S
+++ b/arch/avr32/kernel/syscall_table.S
@@ -296,4 +296,5 @@ sys_call_table:
296 .long sys_ni_syscall /* 280, was sys_timerfd */ 296 .long sys_ni_syscall /* 280, was sys_timerfd */
297 .long sys_eventfd 297 .long sys_eventfd
298 .long sys_recvmmsg 298 .long sys_recvmmsg
299 .long sys_setns
299 .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ 300 .long sys_ni_syscall /* r8 is saturated at nr_syscalls */
diff --git a/arch/blackfin/include/asm/unistd.h b/arch/blackfin/include/asm/unistd.h
index ff9a9f35d50b..6ff9c411b145 100644
--- a/arch/blackfin/include/asm/unistd.h
+++ b/arch/blackfin/include/asm/unistd.h
@@ -397,8 +397,9 @@
397#define __NR_open_by_handle_at 376 397#define __NR_open_by_handle_at 376
398#define __NR_clock_adjtime 377 398#define __NR_clock_adjtime 377
399#define __NR_syncfs 378 399#define __NR_syncfs 378
400#define __NR_setns 379
400 401
401#define __NR_syscall 379 402#define __NR_syscall 380
402#define NR_syscalls __NR_syscall 403#define NR_syscalls __NR_syscall
403 404
404/* Old optional stuff no one actually uses */ 405/* Old optional stuff no one actually uses */
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index f96933f48a7f..dda11ef06be5 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -1753,6 +1753,7 @@ ENTRY(_sys_call_table)
1753 .long _sys_open_by_handle_at 1753 .long _sys_open_by_handle_at
1754 .long _sys_clock_adjtime 1754 .long _sys_clock_adjtime
1755 .long _sys_syncfs 1755 .long _sys_syncfs
1756 .long _sys_setns
1756 1757
1757 .rept NR_syscalls-(.-_sys_call_table)/4 1758 .rept NR_syscalls-(.-_sys_call_table)/4
1758 .long _sys_ni_syscall 1759 .long _sys_ni_syscall
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S
index 0d6420d087fd..1161883eb582 100644
--- a/arch/cris/arch-v10/kernel/entry.S
+++ b/arch/cris/arch-v10/kernel/entry.S
@@ -937,6 +937,7 @@ sys_call_table:
937 .long sys_inotify_init1 937 .long sys_inotify_init1
938 .long sys_preadv 938 .long sys_preadv
939 .long sys_pwritev 939 .long sys_pwritev
940 .long sys_setns /* 335 */
940 941
941 /* 942 /*
942 * NOTE!! This doesn't have to be exact - we just have 943 * NOTE!! This doesn't have to be exact - we just have
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S
index 3abf12c23e5f..84fed7e91ada 100644
--- a/arch/cris/arch-v32/kernel/entry.S
+++ b/arch/cris/arch-v32/kernel/entry.S
@@ -880,6 +880,7 @@ sys_call_table:
880 .long sys_inotify_init1 880 .long sys_inotify_init1
881 .long sys_preadv 881 .long sys_preadv
882 .long sys_pwritev 882 .long sys_pwritev
883 .long sys_setns /* 335 */
883 884
884 /* 885 /*
885 * NOTE!! This doesn't have to be exact - we just have 886 * NOTE!! This doesn't have to be exact - we just have
diff --git a/arch/cris/include/asm/unistd.h b/arch/cris/include/asm/unistd.h
index f6fad83b3a8c..f921b8b0f97e 100644
--- a/arch/cris/include/asm/unistd.h
+++ b/arch/cris/include/asm/unistd.h
@@ -339,10 +339,11 @@
339#define __NR_inotify_init1 332 339#define __NR_inotify_init1 332
340#define __NR_preadv 333 340#define __NR_preadv 333
341#define __NR_pwritev 334 341#define __NR_pwritev 334
342#define __NR_setns 335
342 343
343#ifdef __KERNEL__ 344#ifdef __KERNEL__
344 345
345#define NR_syscalls 335 346#define NR_syscalls 336
346 347
347#include <arch/unistd.h> 348#include <arch/unistd.h>
348 349
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h
index b28da499e22a..a569dff7cd59 100644
--- a/arch/frv/include/asm/unistd.h
+++ b/arch/frv/include/asm/unistd.h
@@ -343,10 +343,11 @@
343#define __NR_pwritev 334 343#define __NR_pwritev 334
344#define __NR_rt_tgsigqueueinfo 335 344#define __NR_rt_tgsigqueueinfo 335
345#define __NR_perf_event_open 336 345#define __NR_perf_event_open 336
346#define __NR_setns 337
346 347
347#ifdef __KERNEL__ 348#ifdef __KERNEL__
348 349
349#define NR_syscalls 337 350#define NR_syscalls 338
350 351
351#define __ARCH_WANT_IPC_PARSE_VERSION 352#define __ARCH_WANT_IPC_PARSE_VERSION
352/* #define __ARCH_WANT_OLD_READDIR */ 353/* #define __ARCH_WANT_OLD_READDIR */
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 63d579bf1c29..017d6d7b784f 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -1526,5 +1526,6 @@ sys_call_table:
1526 .long sys_pwritev 1526 .long sys_pwritev
1527 .long sys_rt_tgsigqueueinfo /* 335 */ 1527 .long sys_rt_tgsigqueueinfo /* 335 */
1528 .long sys_perf_event_open 1528 .long sys_perf_event_open
1529 .long sys_setns
1529 1530
1530syscall_table_size = (. - sys_call_table) 1531syscall_table_size = (. - sys_call_table)
diff --git a/arch/h8300/include/asm/unistd.h b/arch/h8300/include/asm/unistd.h
index 50f2c5a36591..2c3f8e60b1e0 100644
--- a/arch/h8300/include/asm/unistd.h
+++ b/arch/h8300/include/asm/unistd.h
@@ -325,10 +325,11 @@
325#define __NR_move_pages 317 325#define __NR_move_pages 317
326#define __NR_getcpu 318 326#define __NR_getcpu 318
327#define __NR_epoll_pwait 319 327#define __NR_epoll_pwait 319
328#define __NR_setns 320
328 329
329#ifdef __KERNEL__ 330#ifdef __KERNEL__
330 331
331#define NR_syscalls 320 332#define NR_syscalls 321
332 333
333#define __ARCH_WANT_IPC_PARSE_VERSION 334#define __ARCH_WANT_IPC_PARSE_VERSION
334#define __ARCH_WANT_OLD_READDIR 335#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S
index faefaff7d43d..f4b2e67bcc34 100644
--- a/arch/h8300/kernel/syscalls.S
+++ b/arch/h8300/kernel/syscalls.S
@@ -333,6 +333,7 @@ SYMBOL_NAME_LABEL(sys_call_table)
333 .long SYMBOL_NAME(sys_ni_syscall) /* sys_move_pages */ 333 .long SYMBOL_NAME(sys_ni_syscall) /* sys_move_pages */
334 .long SYMBOL_NAME(sys_getcpu) 334 .long SYMBOL_NAME(sys_getcpu)
335 .long SYMBOL_NAME(sys_ni_syscall) /* sys_epoll_pwait */ 335 .long SYMBOL_NAME(sys_ni_syscall) /* sys_epoll_pwait */
336 .long SYMBOL_NAME(sys_setns) /* 320 */
336 337
337 .macro call_sp addr 338 .macro call_sp addr
338 mov.l #SYMBOL_NAME(\addr),er6 339 mov.l #SYMBOL_NAME(\addr),er6
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index 404d037c5e10..1cf0f496f744 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -319,11 +319,12 @@
319#define __NR_open_by_handle_at 1327 319#define __NR_open_by_handle_at 1327
320#define __NR_clock_adjtime 1328 320#define __NR_clock_adjtime 1328
321#define __NR_syncfs 1329 321#define __NR_syncfs 1329
322#define __NR_setns 1330
322 323
323#ifdef __KERNEL__ 324#ifdef __KERNEL__
324 325
325 326
326#define NR_syscalls 306 /* length of syscall table */ 327#define NR_syscalls 307 /* length of syscall table */
327 328
328/* 329/*
329 * The following defines stop scripts/checksyscalls.sh from complaining about 330 * The following defines stop scripts/checksyscalls.sh from complaining about
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 6de2e23b3636..9ca80193cd4e 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1775,6 +1775,7 @@ sys_call_table:
1775 data8 sys_open_by_handle_at 1775 data8 sys_open_by_handle_at
1776 data8 sys_clock_adjtime 1776 data8 sys_clock_adjtime
1777 data8 sys_syncfs 1777 data8 sys_syncfs
1778 data8 sys_setns // 1330
1778 1779
1779 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls 1780 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
1780#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ 1781#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
diff --git a/arch/m32r/include/asm/unistd.h b/arch/m32r/include/asm/unistd.h
index c70545689da8..3e1db561aacc 100644
--- a/arch/m32r/include/asm/unistd.h
+++ b/arch/m32r/include/asm/unistd.h
@@ -330,10 +330,11 @@
330/* #define __NR_timerfd 322 removed */ 330/* #define __NR_timerfd 322 removed */
331#define __NR_eventfd 323 331#define __NR_eventfd 323
332#define __NR_fallocate 324 332#define __NR_fallocate 324
333#define __NR_setns 325
333 334
334#ifdef __KERNEL__ 335#ifdef __KERNEL__
335 336
336#define NR_syscalls 325 337#define NR_syscalls 326
337 338
338#define __ARCH_WANT_IPC_PARSE_VERSION 339#define __ARCH_WANT_IPC_PARSE_VERSION
339#define __ARCH_WANT_STAT64 340#define __ARCH_WANT_STAT64
diff --git a/arch/m32r/kernel/syscall_table.S b/arch/m32r/kernel/syscall_table.S
index 60536e271233..528f2e6ad064 100644
--- a/arch/m32r/kernel/syscall_table.S
+++ b/arch/m32r/kernel/syscall_table.S
@@ -324,3 +324,4 @@ ENTRY(sys_call_table)
324 .long sys_ni_syscall 324 .long sys_ni_syscall
325 .long sys_eventfd 325 .long sys_eventfd
326 .long sys_fallocate 326 .long sys_fallocate
327 .long sys_setns /* 325 */
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index f3b649de2a1b..43f984e93970 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -349,10 +349,11 @@
349#define __NR_open_by_handle_at 341 349#define __NR_open_by_handle_at 341
350#define __NR_clock_adjtime 342 350#define __NR_clock_adjtime 342
351#define __NR_syncfs 343 351#define __NR_syncfs 343
352#define __NR_setns 344
352 353
353#ifdef __KERNEL__ 354#ifdef __KERNEL__
354 355
355#define NR_syscalls 344 356#define NR_syscalls 345
356 357
357#define __ARCH_WANT_IPC_PARSE_VERSION 358#define __ARCH_WANT_IPC_PARSE_VERSION
358#define __ARCH_WANT_OLD_READDIR 359#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
index 6f7b09122a00..00d1452f9571 100644
--- a/arch/m68k/kernel/syscalltable.S
+++ b/arch/m68k/kernel/syscalltable.S
@@ -364,4 +364,5 @@ ENTRY(sys_call_table)
364 .long sys_open_by_handle_at 364 .long sys_open_by_handle_at
365 .long sys_clock_adjtime 365 .long sys_clock_adjtime
366 .long sys_syncfs 366 .long sys_syncfs
367 .long sys_setns
367 368
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h
index 30edd61a6b8f..7d7092b917ac 100644
--- a/arch/microblaze/include/asm/unistd.h
+++ b/arch/microblaze/include/asm/unistd.h
@@ -390,8 +390,9 @@
390#define __NR_open_by_handle_at 372 390#define __NR_open_by_handle_at 372
391#define __NR_clock_adjtime 373 391#define __NR_clock_adjtime 373
392#define __NR_syncfs 374 392#define __NR_syncfs 374
393#define __NR_setns 375
393 394
394#define __NR_syscalls 375 395#define __NR_syscalls 376
395 396
396#ifdef __KERNEL__ 397#ifdef __KERNEL__
397#ifndef __ASSEMBLY__ 398#ifndef __ASSEMBLY__
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
index 85cea81d1ca1..d915a122c865 100644
--- a/arch/microblaze/kernel/syscall_table.S
+++ b/arch/microblaze/kernel/syscall_table.S
@@ -379,3 +379,4 @@ ENTRY(sys_call_table)
379 .long sys_open_by_handle_at 379 .long sys_open_by_handle_at
380 .long sys_clock_adjtime 380 .long sys_clock_adjtime
381 .long sys_syncfs 381 .long sys_syncfs
382 .long sys_setns /* 375 */
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h
index fa2e37ea2be1..6fcfc480e9d0 100644
--- a/arch/mips/include/asm/unistd.h
+++ b/arch/mips/include/asm/unistd.h
@@ -363,16 +363,17 @@
363#define __NR_open_by_handle_at (__NR_Linux + 340) 363#define __NR_open_by_handle_at (__NR_Linux + 340)
364#define __NR_clock_adjtime (__NR_Linux + 341) 364#define __NR_clock_adjtime (__NR_Linux + 341)
365#define __NR_syncfs (__NR_Linux + 342) 365#define __NR_syncfs (__NR_Linux + 342)
366#define __NR_setns (__NR_Linux + 343)
366 367
367/* 368/*
368 * Offset of the last Linux o32 flavoured syscall 369 * Offset of the last Linux o32 flavoured syscall
369 */ 370 */
370#define __NR_Linux_syscalls 342 371#define __NR_Linux_syscalls 343
371 372
372#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 373#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
373 374
374#define __NR_O32_Linux 4000 375#define __NR_O32_Linux 4000
375#define __NR_O32_Linux_syscalls 342 376#define __NR_O32_Linux_syscalls 343
376 377
377#if _MIPS_SIM == _MIPS_SIM_ABI64 378#if _MIPS_SIM == _MIPS_SIM_ABI64
378 379
@@ -682,16 +683,17 @@
682#define __NR_open_by_handle_at (__NR_Linux + 299) 683#define __NR_open_by_handle_at (__NR_Linux + 299)
683#define __NR_clock_adjtime (__NR_Linux + 300) 684#define __NR_clock_adjtime (__NR_Linux + 300)
684#define __NR_syncfs (__NR_Linux + 301) 685#define __NR_syncfs (__NR_Linux + 301)
686#define __NR_setns (__NR_Linux + 302)
685 687
686/* 688/*
687 * Offset of the last Linux 64-bit flavoured syscall 689 * Offset of the last Linux 64-bit flavoured syscall
688 */ 690 */
689#define __NR_Linux_syscalls 301 691#define __NR_Linux_syscalls 302
690 692
691#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 693#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
692 694
693#define __NR_64_Linux 5000 695#define __NR_64_Linux 5000
694#define __NR_64_Linux_syscalls 301 696#define __NR_64_Linux_syscalls 302
695 697
696#if _MIPS_SIM == _MIPS_SIM_NABI32 698#if _MIPS_SIM == _MIPS_SIM_NABI32
697 699
@@ -1006,16 +1008,17 @@
1006#define __NR_open_by_handle_at (__NR_Linux + 304) 1008#define __NR_open_by_handle_at (__NR_Linux + 304)
1007#define __NR_clock_adjtime (__NR_Linux + 305) 1009#define __NR_clock_adjtime (__NR_Linux + 305)
1008#define __NR_syncfs (__NR_Linux + 306) 1010#define __NR_syncfs (__NR_Linux + 306)
1011#define __NR_setns (__NR_Linux + 307)
1009 1012
1010/* 1013/*
1011 * Offset of the last N32 flavoured syscall 1014 * Offset of the last N32 flavoured syscall
1012 */ 1015 */
1013#define __NR_Linux_syscalls 306 1016#define __NR_Linux_syscalls 307
1014 1017
1015#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 1018#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
1016 1019
1017#define __NR_N32_Linux 6000 1020#define __NR_N32_Linux 6000
1018#define __NR_N32_Linux_syscalls 306 1021#define __NR_N32_Linux_syscalls 307
1019 1022
1020#ifdef __KERNEL__ 1023#ifdef __KERNEL__
1021 1024
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 7a8e1dd7f6f2..99e656e425f3 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -589,6 +589,7 @@ einval: li v0, -ENOSYS
589 sys sys_open_by_handle_at 3 /* 4340 */ 589 sys sys_open_by_handle_at 3 /* 4340 */
590 sys sys_clock_adjtime 2 590 sys sys_clock_adjtime 2
591 sys sys_syncfs 1 591 sys sys_syncfs 1
592 sys sys_setns 2
592 .endm 593 .endm
593 594
594 /* We pre-compute the number of _instruction_ bytes needed to 595 /* We pre-compute the number of _instruction_ bytes needed to
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 2d31c83224f9..fb0575f47f3d 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -428,4 +428,5 @@ sys_call_table:
428 PTR sys_open_by_handle_at 428 PTR sys_open_by_handle_at
429 PTR sys_clock_adjtime /* 5300 */ 429 PTR sys_clock_adjtime /* 5300 */
430 PTR sys_syncfs 430 PTR sys_syncfs
431 PTR sys_setns
431 .size sys_call_table,.-sys_call_table 432 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 38a0503b9a4a..4de0c5534e73 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -428,4 +428,5 @@ EXPORT(sysn32_call_table)
428 PTR sys_open_by_handle_at 428 PTR sys_open_by_handle_at
429 PTR compat_sys_clock_adjtime /* 6305 */ 429 PTR compat_sys_clock_adjtime /* 6305 */
430 PTR sys_syncfs 430 PTR sys_syncfs
431 PTR sys_setns
431 .size sysn32_call_table,.-sysn32_call_table 432 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 91ea5e4041dd..4a387de08bfa 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -546,4 +546,5 @@ sys_call_table:
546 PTR compat_sys_open_by_handle_at /* 4340 */ 546 PTR compat_sys_open_by_handle_at /* 4340 */
547 PTR compat_sys_clock_adjtime 547 PTR compat_sys_clock_adjtime
548 PTR sys_syncfs 548 PTR sys_syncfs
549 PTR sys_setns
549 .size sys_call_table,.-sys_call_table 550 .size sys_call_table,.-sys_call_table
diff --git a/arch/mn10300/include/asm/unistd.h b/arch/mn10300/include/asm/unistd.h
index 9d056f515929..9051f921cbc7 100644
--- a/arch/mn10300/include/asm/unistd.h
+++ b/arch/mn10300/include/asm/unistd.h
@@ -349,10 +349,11 @@
349#define __NR_rt_tgsigqueueinfo 336 349#define __NR_rt_tgsigqueueinfo 336
350#define __NR_perf_event_open 337 350#define __NR_perf_event_open 337
351#define __NR_recvmmsg 338 351#define __NR_recvmmsg 338
352#define __NR_setns 339
352 353
353#ifdef __KERNEL__ 354#ifdef __KERNEL__
354 355
355#define NR_syscalls 339 356#define NR_syscalls 340
356 357
357/* 358/*
358 * specify the deprecated syscalls we want to support on this arch 359 * specify the deprecated syscalls we want to support on this arch
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
index fb93ad720b82..ae435e1d5669 100644
--- a/arch/mn10300/kernel/entry.S
+++ b/arch/mn10300/kernel/entry.S
@@ -759,6 +759,7 @@ ENTRY(sys_call_table)
759 .long sys_rt_tgsigqueueinfo 759 .long sys_rt_tgsigqueueinfo
760 .long sys_perf_event_open 760 .long sys_perf_event_open
761 .long sys_recvmmsg 761 .long sys_recvmmsg
762 .long sys_setns
762 763
763 764
764nr_syscalls=(.-sys_call_table)/4 765nr_syscalls=(.-sys_call_table)/4
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h
index 9cbc2c3bf630..3392de3e7be0 100644
--- a/arch/parisc/include/asm/unistd.h
+++ b/arch/parisc/include/asm/unistd.h
@@ -820,8 +820,9 @@
820#define __NR_name_to_handle_at (__NR_Linux + 325) 820#define __NR_name_to_handle_at (__NR_Linux + 325)
821#define __NR_open_by_handle_at (__NR_Linux + 326) 821#define __NR_open_by_handle_at (__NR_Linux + 326)
822#define __NR_syncfs (__NR_Linux + 327) 822#define __NR_syncfs (__NR_Linux + 327)
823#define __NR_setns (__NR_Linux + 328)
823 824
824#define __NR_Linux_syscalls (__NR_syncfs + 1) 825#define __NR_Linux_syscalls (__NR_setns + 1)
825 826
826 827
827#define __IGNORE_select /* newselect */ 828#define __IGNORE_select /* newselect */
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index a5b02ce4d41e..34a4f5a2fffb 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -426,6 +426,7 @@
426 ENTRY_SAME(name_to_handle_at) /* 325 */ 426 ENTRY_SAME(name_to_handle_at) /* 325 */
427 ENTRY_COMP(open_by_handle_at) 427 ENTRY_COMP(open_by_handle_at)
428 ENTRY_SAME(syncfs) 428 ENTRY_SAME(syncfs)
429 ENTRY_SAME(setns)
429 430
430 /* Nothing yet */ 431 /* Nothing yet */
431 432
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index 8489d372077f..f6736b7da463 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -353,3 +353,4 @@ COMPAT_SYS_SPU(open_by_handle_at)
353COMPAT_SYS_SPU(clock_adjtime) 353COMPAT_SYS_SPU(clock_adjtime)
354SYSCALL_SPU(syncfs) 354SYSCALL_SPU(syncfs)
355COMPAT_SYS_SPU(sendmmsg) 355COMPAT_SYS_SPU(sendmmsg)
356SYSCALL_SPU(setns)
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index 6d23c8193caa..b8b3f599362b 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -372,10 +372,11 @@
372#define __NR_clock_adjtime 347 372#define __NR_clock_adjtime 347
373#define __NR_syncfs 348 373#define __NR_syncfs 348
374#define __NR_sendmmsg 349 374#define __NR_sendmmsg 349
375#define __NR_setns 350
375 376
376#ifdef __KERNEL__ 377#ifdef __KERNEL__
377 378
378#define __NR_syscalls 350 379#define __NR_syscalls 351
379 380
380#define __NR__exit __NR_exit 381#define __NR__exit __NR_exit
381#define NR_syscalls __NR_syscalls 382#define NR_syscalls __NR_syscalls
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h
index 9208e69245a0..404bdb9671b4 100644
--- a/arch/s390/include/asm/unistd.h
+++ b/arch/s390/include/asm/unistd.h
@@ -276,7 +276,8 @@
276#define __NR_open_by_handle_at 336 276#define __NR_open_by_handle_at 336
277#define __NR_clock_adjtime 337 277#define __NR_clock_adjtime 337
278#define __NR_syncfs 338 278#define __NR_syncfs 338
279#define NR_syscalls 339 279#define __NR_setns 339
280#define NR_syscalls 340
280 281
281/* 282/*
282 * There are some system calls that are not present on 64 bit, some 283 * There are some system calls that are not present on 64 bit, some
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 1dc96ea08fa8..1f5eb789c3a7 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1904,3 +1904,9 @@ compat_sys_clock_adjtime_wrapper:
1904sys_syncfs_wrapper: 1904sys_syncfs_wrapper:
1905 lgfr %r2,%r2 # int 1905 lgfr %r2,%r2 # int
1906 jg sys_syncfs 1906 jg sys_syncfs
1907
1908 .globl sys_setns_wrapper
1909sys_setns_wrapper:
1910 lgfr %r2,%r2 # int
1911 lgfr %r3,%r3 # int
1912 jg sys_setns
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index 9c65fd4ddce0..6ee39ef8fe4a 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -347,3 +347,4 @@ SYSCALL(sys_name_to_handle_at,sys_name_to_handle_at,sys_name_to_handle_at_wrappe
347SYSCALL(sys_open_by_handle_at,sys_open_by_handle_at,compat_sys_open_by_handle_at_wrapper) 347SYSCALL(sys_open_by_handle_at,sys_open_by_handle_at,compat_sys_open_by_handle_at_wrapper)
348SYSCALL(sys_clock_adjtime,sys_clock_adjtime,compat_sys_clock_adjtime_wrapper) 348SYSCALL(sys_clock_adjtime,sys_clock_adjtime,compat_sys_clock_adjtime_wrapper)
349SYSCALL(sys_syncfs,sys_syncfs,sys_syncfs_wrapper) 349SYSCALL(sys_syncfs,sys_syncfs,sys_syncfs_wrapper)
350SYSCALL(sys_setns,sys_setns,sys_setns_wrapper)
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h
index bb7d2702c2c9..3432008d2888 100644
--- a/arch/sh/include/asm/unistd_32.h
+++ b/arch/sh/include/asm/unistd_32.h
@@ -374,8 +374,9 @@
374#define __NR_clock_adjtime 361 374#define __NR_clock_adjtime 361
375#define __NR_syncfs 362 375#define __NR_syncfs 362
376#define __NR_sendmmsg 363 376#define __NR_sendmmsg 363
377#define __NR_setns 364
377 378
378#define NR_syscalls 364 379#define NR_syscalls 365
379 380
380#ifdef __KERNEL__ 381#ifdef __KERNEL__
381 382
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h
index 46327cea1e5c..ec9898665f23 100644
--- a/arch/sh/include/asm/unistd_64.h
+++ b/arch/sh/include/asm/unistd_64.h
@@ -395,10 +395,11 @@
395#define __NR_clock_adjtime 372 395#define __NR_clock_adjtime 372
396#define __NR_syncfs 373 396#define __NR_syncfs 373
397#define __NR_sendmmsg 374 397#define __NR_sendmmsg 374
398#define __NR_setns 375
398 399
399#ifdef __KERNEL__ 400#ifdef __KERNEL__
400 401
401#define NR_syscalls 375 402#define NR_syscalls 376
402 403
403#define __ARCH_WANT_IPC_PARSE_VERSION 404#define __ARCH_WANT_IPC_PARSE_VERSION
404#define __ARCH_WANT_OLD_READDIR 405#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S
index 7c486f3e3a3c..39b051de4c7c 100644
--- a/arch/sh/kernel/syscalls_32.S
+++ b/arch/sh/kernel/syscalls_32.S
@@ -381,3 +381,4 @@ ENTRY(sys_call_table)
381 .long sys_clock_adjtime 381 .long sys_clock_adjtime
382 .long sys_syncfs 382 .long sys_syncfs
383 .long sys_sendmmsg 383 .long sys_sendmmsg
384 .long sys_setns
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S
index ba1a737afe80..089c4d825d08 100644
--- a/arch/sh/kernel/syscalls_64.S
+++ b/arch/sh/kernel/syscalls_64.S
@@ -401,3 +401,4 @@ sys_call_table:
401 .long sys_clock_adjtime 401 .long sys_clock_adjtime
402 .long sys_syncfs 402 .long sys_syncfs
403 .long sys_sendmmsg 403 .long sys_sendmmsg
404 .long sys_setns /* 375 */
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h
index c5387ed0add8..6260d5deeabc 100644
--- a/arch/sparc/include/asm/unistd.h
+++ b/arch/sparc/include/asm/unistd.h
@@ -405,8 +405,9 @@
405#define __NR_clock_adjtime 334 405#define __NR_clock_adjtime 334
406#define __NR_syncfs 335 406#define __NR_syncfs 335
407#define __NR_sendmmsg 336 407#define __NR_sendmmsg 336
408#define __NR_setns 337
408 409
409#define NR_syscalls 337 410#define NR_syscalls 338
410 411
411#ifdef __32bit_syscall_numbers__ 412#ifdef __32bit_syscall_numbers__
412/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, 413/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S
index 332c83ff7701..6e492d59f6b1 100644
--- a/arch/sparc/kernel/systbls_32.S
+++ b/arch/sparc/kernel/systbls_32.S
@@ -84,4 +84,4 @@ sys_call_table:
84/*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv 84/*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
85/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init 85/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
86/*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime 86/*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
87/*335*/ .long sys_syncfs, sys_sendmmsg 87/*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index 43887ca0be0e..f566518483b5 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -85,7 +85,7 @@ sys_call_table32:
85/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv 85/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv
86 .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init 86 .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init
87/*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime 87/*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime
88 .word sys_syncfs, compat_sys_sendmmsg 88 .word sys_syncfs, compat_sys_sendmmsg, sys_setns
89 89
90#endif /* CONFIG_COMPAT */ 90#endif /* CONFIG_COMPAT */
91 91
@@ -162,4 +162,4 @@ sys_call_table:
162/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv 162/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
163 .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init 163 .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
164/*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime 164/*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
165 .word sys_syncfs, sys_sendmmsg 165 .word sys_syncfs, sys_sendmmsg, sys_setns
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 95f5826be458..c1870dddd322 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -849,4 +849,5 @@ ia32_sys_call_table:
849 .quad compat_sys_clock_adjtime 849 .quad compat_sys_clock_adjtime
850 .quad sys_syncfs 850 .quad sys_syncfs
851 .quad compat_sys_sendmmsg /* 345 */ 851 .quad compat_sys_sendmmsg /* 345 */
852 .quad sys_setns
852ia32_syscall_end: 853ia32_syscall_end:
diff --git a/arch/x86/include/asm/unistd_32.h b/arch/x86/include/asm/unistd_32.h
index fb6a625c99bf..593485b38ab3 100644
--- a/arch/x86/include/asm/unistd_32.h
+++ b/arch/x86/include/asm/unistd_32.h
@@ -351,10 +351,11 @@
351#define __NR_clock_adjtime 343 351#define __NR_clock_adjtime 343
352#define __NR_syncfs 344 352#define __NR_syncfs 344
353#define __NR_sendmmsg 345 353#define __NR_sendmmsg 345
354#define __NR_setns 346
354 355
355#ifdef __KERNEL__ 356#ifdef __KERNEL__
356 357
357#define NR_syscalls 346 358#define NR_syscalls 347
358 359
359#define __ARCH_WANT_IPC_PARSE_VERSION 360#define __ARCH_WANT_IPC_PARSE_VERSION
360#define __ARCH_WANT_OLD_READDIR 361#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h
index 79f90eb15aad..705bf139288c 100644
--- a/arch/x86/include/asm/unistd_64.h
+++ b/arch/x86/include/asm/unistd_64.h
@@ -679,6 +679,8 @@ __SYSCALL(__NR_clock_adjtime, sys_clock_adjtime)
679__SYSCALL(__NR_syncfs, sys_syncfs) 679__SYSCALL(__NR_syncfs, sys_syncfs)
680#define __NR_sendmmsg 307 680#define __NR_sendmmsg 307
681__SYSCALL(__NR_sendmmsg, sys_sendmmsg) 681__SYSCALL(__NR_sendmmsg, sys_sendmmsg)
682#define __NR_setns 308
683__SYSCALL(__NR_setns, sys_setns)
682 684
683#ifndef __NO_STUBS 685#ifndef __NO_STUBS
684#define __ARCH_WANT_OLD_READDIR 686#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
index 32cbffb0c494..fbb0a045a1a2 100644
--- a/arch/x86/kernel/syscall_table_32.S
+++ b/arch/x86/kernel/syscall_table_32.S
@@ -345,3 +345,4 @@ ENTRY(sys_call_table)
345 .long sys_clock_adjtime 345 .long sys_clock_adjtime
346 .long sys_syncfs 346 .long sys_syncfs
347 .long sys_sendmmsg /* 345 */ 347 .long sys_sendmmsg /* 345 */
348 .long sys_setns
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h
index 528042c2951e..a6f934f37f1a 100644
--- a/arch/xtensa/include/asm/unistd.h
+++ b/arch/xtensa/include/asm/unistd.h
@@ -683,8 +683,10 @@ __SYSCALL(305, sys_ni_syscall, 0)
683__SYSCALL(306, sys_eventfd, 1) 683__SYSCALL(306, sys_eventfd, 1)
684#define __NR_recvmmsg 307 684#define __NR_recvmmsg 307
685__SYSCALL(307, sys_recvmmsg, 5) 685__SYSCALL(307, sys_recvmmsg, 5)
686#define __NR_setns 308
687__SYSCALL(308, sys_setns, 2)
686 688
687#define __NR_syscall_count 308 689#define __NR_syscall_count 309
688 690
689/* 691/*
690 * sysxtensa syscall handler 692 * sysxtensa syscall handler