* [GIT PULL] Namespace file descriptors for 2.6.40
@ 2011-05-21 23:39 ` Eric W. Biederman
0 siblings, 0 replies; 26+ messages in thread
From: Eric W. Biederman @ 2011-05-21 23:39 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel, Linux Containers, netdev, James Bottomley,
Geert Uytterhoeven
Please pull the namespace file descriptor git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd.git
In a hopeless quest to avoid conflicts when merging a new system call
and wiring it up I have pulled in bits of net-next and the parisc tree.
You have already pulled the net-next bits. The parisc bits in my tree
are:
James Bottomley (4):
[PARISC] wire up fanotify syscalls
[PARISC] wire up clock_adjtime syscall
[PARISC] wire up the fhandle syscalls
[PARISC] wire up syncfs syscall
Meelis Roos (1):
[PARISC] fix pacache .size with new binutils
Since then I have gained conflicts in alpha and m68k.
For alpha all that is needed is a simple incrementing of
the syscall number in my tree and adding of my syscall to
the end of the list.
For m68k please just delete all of the syscall entries the conflict will
add to arch/m68k/kernel/entry_mm.S. The m68k tree has consolidated
everything in arch/m68k/kernel/syscalltable.S
This tree adds the files /proc/<pid>/ns/net, /proc/<pid>/ns/ipc,
/proc/<pid>/ns/uts that can be opened to refer to the namespaces of a
process at the time those files are opened, and can be bind mounted to
keep the specified namespace alive without a process.
This tree adds the setns system call that can be used to change the
specified namespace of a process to the namespace specified by a system
call.
This tree adds a new rtnetlink attribute that allows for moving a
network device into a network namespace specified by a file descriptor.
Support for the other namespaces is planned but is not ready for 2.6.40.
These changes dramatically simplify what a userspace process has to do
to keep a namespace alive, and to execute system calls in it.
The shortlog:
Stephen Rothwell (1):
net: fix get_net_ns_by_fd for !CONFIG_NET_NS
Eric W. Biederman (11):
ns: proc files for namespace naming policy.
ns: Introduce the setns syscall
ns proc: Add support for the network namespace.
ns proc: Add support for the uts namespace
ns proc: Add support for the ipc namespace
net: Allow setting the network namespace by fd
Merge commit '2e7bad5f34b5beed47542490c760ed26574e38ba' into HEAD
Merge commit '7143b7d41218d4fc2ea33e6056c73609527ae687' into HEAD
ns: Wire up the setns system call
ns: Declare sys_setns in syscalls.h
ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry.
The diffstat:
arch/alpha/include/asm/unistd.h | 3 +-
arch/alpha/kernel/systbls.S | 1 +
arch/arm/include/asm/unistd.h | 1 +
arch/arm/kernel/calls.S | 1 +
arch/avr32/include/asm/unistd.h | 3 +-
arch/avr32/kernel/syscall_table.S | 1 +
arch/blackfin/include/asm/unistd.h | 3 +-
arch/blackfin/mach-common/entry.S | 1 +
arch/cris/arch-v10/kernel/entry.S | 1 +
arch/cris/arch-v32/kernel/entry.S | 1 +
arch/cris/include/asm/unistd.h | 3 +-
arch/frv/include/asm/unistd.h | 3 +-
arch/frv/kernel/entry.S | 1 +
arch/h8300/include/asm/unistd.h | 3 +-
arch/h8300/kernel/syscalls.S | 1 +
arch/ia64/include/asm/unistd.h | 3 +-
arch/ia64/kernel/entry.S | 1 +
arch/m32r/include/asm/unistd.h | 3 +-
arch/m32r/kernel/syscall_table.S | 1 +
arch/m68k/include/asm/unistd.h | 3 +-
arch/m68k/kernel/syscalltable.S | 1 +
arch/microblaze/include/asm/unistd.h | 3 +-
arch/microblaze/kernel/syscall_table.S | 1 +
arch/mips/include/asm/unistd.h | 15 ++-
arch/mips/kernel/scall32-o32.S | 1 +
arch/mips/kernel/scall64-64.S | 1 +
arch/mips/kernel/scall64-n32.S | 1 +
arch/mips/kernel/scall64-o32.S | 1 +
arch/mn10300/include/asm/unistd.h | 3 +-
arch/mn10300/kernel/entry.S | 1 +
arch/parisc/include/asm/unistd.h | 10 ++-
arch/parisc/kernel/pacache.S | 6 +-
arch/parisc/kernel/sys_parisc32.c | 8 ++
arch/parisc/kernel/syscall_table.S | 7 +
arch/powerpc/include/asm/systbl.h | 1 +
arch/powerpc/include/asm/unistd.h | 3 +-
arch/s390/include/asm/unistd.h | 3 +-
arch/s390/kernel/syscalls.S | 1 +
arch/sh/include/asm/unistd_32.h | 3 +-
arch/sh/include/asm/unistd_64.h | 3 +-
arch/sh/kernel/syscalls_32.S | 1 +
arch/sh/kernel/syscalls_64.S | 1 +
arch/sparc/include/asm/unistd.h | 3 +-
arch/sparc/kernel/systbls_32.S | 2 +-
arch/sparc/kernel/systbls_64.S | 4 +-
arch/x86/ia32/ia32entry.S | 1 +
arch/x86/include/asm/unistd_32.h | 3 +-
arch/x86/include/asm/unistd_64.h | 2 +
arch/x86/kernel/syscall_table_32.S | 1 +
arch/xtensa/include/asm/unistd.h | 4 +-
fs/proc/Makefile | 1 +
fs/proc/base.c | 20 ++--
fs/proc/inode.c | 7 +
fs/proc/internal.h | 18 +++
fs/proc/namespaces.c | 198 ++++++++++++++++++++++++++++++++
include/asm-generic/unistd.h | 4 +-
include/linux/if_link.h | 1 +
include/linux/proc_fs.h | 21 ++++
include/linux/syscalls.h | 1 +
include/net/net_namespace.h | 1 +
ipc/namespace.c | 37 ++++++
kernel/nsproxy.c | 42 +++++++
kernel/utsname.c | 39 ++++++
net/core/net_namespace.c | 65 +++++++++++
net/core/rtnetlink.c | 5 +-
65 files changed, 547 insertions(+), 46 deletions(-)
Thanks,
Eric
^ permalink raw reply [flat|nested] 26+ messages in thread* [GIT PULL] Namespace file descriptors for 2.6.40
@ 2011-05-21 23:39 ` Eric W. Biederman
0 siblings, 0 replies; 26+ messages in thread
From: Eric W. Biederman @ 2011-05-21 23:39 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel, Linux Containers, netdev, James Bottomley,
Geert Uytterhoeven
Please pull the namespace file descriptor git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd.git
In a hopeless quest to avoid conflicts when merging a new system call
and wiring it up I have pulled in bits of net-next and the parisc tree.
You have already pulled the net-next bits. The parisc bits in my tree
are:
James Bottomley (4):
[PARISC] wire up fanotify syscalls
[PARISC] wire up clock_adjtime syscall
[PARISC] wire up the fhandle syscalls
[PARISC] wire up syncfs syscall
Meelis Roos (1):
[PARISC] fix pacache .size with new binutils
Since then I have gained conflicts in alpha and m68k.
For alpha all that is needed is a simple incrementing of
the syscall number in my tree and adding of my syscall to
the end of the list.
For m68k please just delete all of the syscall entries the conflict will
add to arch/m68k/kernel/entry_mm.S. The m68k tree has consolidated
everything in arch/m68k/kernel/syscalltable.S
This tree adds the files /proc/<pid>/ns/net, /proc/<pid>/ns/ipc,
/proc/<pid>/ns/uts that can be opened to refer to the namespaces of a
process at the time those files are opened, and can be bind mounted to
keep the specified namespace alive without a process.
This tree adds the setns system call that can be used to change the
specified namespace of a process to the namespace specified by a system
call.
This tree adds a new rtnetlink attribute that allows for moving a
network device into a network namespace specified by a file descriptor.
Support for the other namespaces is planned but is not ready for 2.6.40.
These changes dramatically simplify what a userspace process has to do
to keep a namespace alive, and to execute system calls in it.
The shortlog:
Stephen Rothwell (1):
net: fix get_net_ns_by_fd for !CONFIG_NET_NS
Eric W. Biederman (11):
ns: proc files for namespace naming policy.
ns: Introduce the setns syscall
ns proc: Add support for the network namespace.
ns proc: Add support for the uts namespace
ns proc: Add support for the ipc namespace
net: Allow setting the network namespace by fd
Merge commit '2e7bad5f34b5beed47542490c760ed26574e38ba' into HEAD
Merge commit '7143b7d41218d4fc2ea33e6056c73609527ae687' into HEAD
ns: Wire up the setns system call
ns: Declare sys_setns in syscalls.h
ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry.
The diffstat:
arch/alpha/include/asm/unistd.h | 3 +-
arch/alpha/kernel/systbls.S | 1 +
arch/arm/include/asm/unistd.h | 1 +
arch/arm/kernel/calls.S | 1 +
arch/avr32/include/asm/unistd.h | 3 +-
arch/avr32/kernel/syscall_table.S | 1 +
arch/blackfin/include/asm/unistd.h | 3 +-
arch/blackfin/mach-common/entry.S | 1 +
arch/cris/arch-v10/kernel/entry.S | 1 +
arch/cris/arch-v32/kernel/entry.S | 1 +
arch/cris/include/asm/unistd.h | 3 +-
arch/frv/include/asm/unistd.h | 3 +-
arch/frv/kernel/entry.S | 1 +
arch/h8300/include/asm/unistd.h | 3 +-
arch/h8300/kernel/syscalls.S | 1 +
arch/ia64/include/asm/unistd.h | 3 +-
arch/ia64/kernel/entry.S | 1 +
arch/m32r/include/asm/unistd.h | 3 +-
arch/m32r/kernel/syscall_table.S | 1 +
arch/m68k/include/asm/unistd.h | 3 +-
arch/m68k/kernel/syscalltable.S | 1 +
arch/microblaze/include/asm/unistd.h | 3 +-
arch/microblaze/kernel/syscall_table.S | 1 +
arch/mips/include/asm/unistd.h | 15 ++-
arch/mips/kernel/scall32-o32.S | 1 +
arch/mips/kernel/scall64-64.S | 1 +
arch/mips/kernel/scall64-n32.S | 1 +
arch/mips/kernel/scall64-o32.S | 1 +
arch/mn10300/include/asm/unistd.h | 3 +-
arch/mn10300/kernel/entry.S | 1 +
arch/parisc/include/asm/unistd.h | 10 ++-
arch/parisc/kernel/pacache.S | 6 +-
arch/parisc/kernel/sys_parisc32.c | 8 ++
arch/parisc/kernel/syscall_table.S | 7 +
arch/powerpc/include/asm/systbl.h | 1 +
arch/powerpc/include/asm/unistd.h | 3 +-
arch/s390/include/asm/unistd.h | 3 +-
arch/s390/kernel/syscalls.S | 1 +
arch/sh/include/asm/unistd_32.h | 3 +-
arch/sh/include/asm/unistd_64.h | 3 +-
arch/sh/kernel/syscalls_32.S | 1 +
arch/sh/kernel/syscalls_64.S | 1 +
arch/sparc/include/asm/unistd.h | 3 +-
arch/sparc/kernel/systbls_32.S | 2 +-
arch/sparc/kernel/systbls_64.S | 4 +-
arch/x86/ia32/ia32entry.S | 1 +
arch/x86/include/asm/unistd_32.h | 3 +-
arch/x86/include/asm/unistd_64.h | 2 +
arch/x86/kernel/syscall_table_32.S | 1 +
arch/xtensa/include/asm/unistd.h | 4 +-
fs/proc/Makefile | 1 +
fs/proc/base.c | 20 ++--
fs/proc/inode.c | 7 +
fs/proc/internal.h | 18 +++
fs/proc/namespaces.c | 198 ++++++++++++++++++++++++++++++++
include/asm-generic/unistd.h | 4 +-
include/linux/if_link.h | 1 +
include/linux/proc_fs.h | 21 ++++
include/linux/syscalls.h | 1 +
include/net/net_namespace.h | 1 +
ipc/namespace.c | 37 ++++++
kernel/nsproxy.c | 42 +++++++
kernel/utsname.c | 39 ++++++
net/core/net_namespace.c | 65 +++++++++++
net/core/rtnetlink.c | 5 +-
65 files changed, 547 insertions(+), 46 deletions(-)
Thanks,
Eric
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [GIT PULL] Namespace file descriptors for 2.6.40
2011-05-21 23:39 ` Eric W. Biederman
(?)
@ 2011-05-21 23:42 ` Linus Torvalds
2011-05-22 0:33 ` Eric W. Biederman
-1 siblings, 1 reply; 26+ messages in thread
From: Linus Torvalds @ 2011-05-21 23:42 UTC (permalink / raw)
To: Eric W. Biederman
Cc: linux-kernel, Linux Containers, netdev, James Bottomley,
Geert Uytterhoeven
On Sat, May 21, 2011 at 4:39 PM, Eric W. Biederman
<ebiederm@xmission.com> wrote:
>
> In a hopeless quest to avoid conflicts when merging a new system call
> and wiring it up I have pulled in bits of net-next and the parisc tree.
> You have already pulled the net-next bits. The parisc bits in my tree
> are:
Ok, this just means that I won't pull from you.
It's that simple. We don't do this. Ever.
Why the hell did you even worry about wiring up parisc system calls?
That's not your job.
Linus
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [GIT PULL] Namespace file descriptors for 2.6.40
2011-05-21 23:42 ` Linus Torvalds
@ 2011-05-22 0:33 ` Eric W. Biederman
[not found] ` <m1boyvpo9r.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
0 siblings, 1 reply; 26+ messages in thread
From: Eric W. Biederman @ 2011-05-22 0:33 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel, Linux Containers, netdev, James Bottomley,
Geert Uytterhoeven
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Sat, May 21, 2011 at 4:39 PM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
>>
>> In a hopeless quest to avoid conflicts when merging a new system call
>> and wiring it up I have pulled in bits of net-next and the parisc tree.
>> You have already pulled the net-next bits. The parisc bits in my tree
>> are:
>
> Ok, this just means that I won't pull from you.
Sure. I will try to be a little more patient and resend the pull
request after James has sent the pull request for the parisc tree.
At which point the only unique changes in my tree will be mine.
> It's that simple. We don't do this. Ever.
Hah. I seem to remember bits of pulling from non-rebasing trees being ok
in well defined contexts. This seems like one. Especially when you
have checked with the maintainers.
Plus all of the parisc bits in addition to being in the linux-next
are trivially correct.
> Why the hell did you even worry about wiring up parisc system calls?
> That's not your job.
Because in general it is the job of he who changes something to fix up
every possible place.
Now maybe I went a little too far in trying to resolve the conflicts,
but I did check with the David Miller and James Bottomley and they knew
what I was doing.
Quite honestly adding system calls is a mess that know one seems to
know how to do right. So I flipped a coin and took a stab at it.
Eric
^ permalink raw reply [flat|nested] 26+ messages in thread
* [GIT PULL] Namespace file descriptors for 2.6.40
@ 2011-05-23 21:05 ` Eric W. Biederman
0 siblings, 0 replies; 26+ messages in thread
From: Eric W. Biederman @ 2011-05-23 21:05 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel, Linux Containers, netdev, James Bottomley,
Geert Uytterhoeven
Please pull the namespace file descriptor git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd.git
Because other syscall work has happened in other trees there
are conflicts on alpha and m68k.
For alpha all that is needed is a simple incrementing of the syscall
number in my tree and adding of my syscall to the end of the list.
For m68k please just delete all of the syscall entries the conflict will
add to arch/m68k/kernel/entry_mm.S. The m68k tree has consolidated
everything in arch/m68k/kernel/syscalltable.S
This tree adds the files /proc/<pid>/ns/net, /proc/<pid>/ns/ipc,
/proc/<pid>/ns/uts that can be opened to refer to the namespaces of a
process at the time those files are opened, and can be bind mounted to
keep the specified namespace alive without a process.
This tree adds the setns system call that can be used to change the
specified namespace of a process to the namespace specified by a system
call.
This tree adds a new rtnetlink attribute that allows for moving a
network device into a network namespace specified by a file descriptor.
Support for the other namespaces is planned but is not ready for 2.6.40.
These changes dramatically simplify what a userspace process has to do
to keep a namespace alive, and to execute system calls in it.
The shortlog:
Stephen Rothwell (1):
net: fix get_net_ns_by_fd for !CONFIG_NET_NS
Eric W. Biederman (11):
ns: proc files for namespace naming policy.
ns: Introduce the setns syscall
ns proc: Add support for the network namespace.
ns proc: Add support for the uts namespace
ns proc: Add support for the ipc namespace
net: Allow setting the network namespace by fd
Merge commit '2e7bad5f34b5beed47542490c760ed26574e38ba' into HEAD
Merge commit '7143b7d41218d4fc2ea33e6056c73609527ae687' into HEAD
ns: Wire up the setns system call
ns: Declare sys_setns in syscalls.h
ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry.
The diffstat:
arch/alpha/include/asm/unistd.h | 3 +-
arch/alpha/kernel/systbls.S | 1 +
arch/arm/include/asm/unistd.h | 1 +
arch/arm/kernel/calls.S | 1 +
arch/avr32/include/asm/unistd.h | 3 +-
arch/avr32/kernel/syscall_table.S | 1 +
arch/blackfin/include/asm/unistd.h | 3 +-
arch/blackfin/mach-common/entry.S | 1 +
arch/cris/arch-v10/kernel/entry.S | 1 +
arch/cris/arch-v32/kernel/entry.S | 1 +
arch/cris/include/asm/unistd.h | 3 +-
arch/frv/include/asm/unistd.h | 3 +-
arch/frv/kernel/entry.S | 1 +
arch/h8300/include/asm/unistd.h | 3 +-
arch/h8300/kernel/syscalls.S | 1 +
arch/ia64/include/asm/unistd.h | 3 +-
arch/ia64/kernel/entry.S | 1 +
arch/m32r/include/asm/unistd.h | 3 +-
arch/m32r/kernel/syscall_table.S | 1 +
arch/m68k/include/asm/unistd.h | 3 +-
arch/m68k/kernel/syscalltable.S | 1 +
arch/microblaze/include/asm/unistd.h | 3 +-
arch/microblaze/kernel/syscall_table.S | 1 +
arch/mips/include/asm/unistd.h | 15 ++-
arch/mips/kernel/scall32-o32.S | 1 +
arch/mips/kernel/scall64-64.S | 1 +
arch/mips/kernel/scall64-n32.S | 1 +
arch/mips/kernel/scall64-o32.S | 1 +
arch/mn10300/include/asm/unistd.h | 3 +-
arch/mn10300/kernel/entry.S | 1 +
arch/parisc/include/asm/unistd.h | 4 +-
arch/parisc/kernel/syscall_table.S | 1 +
arch/powerpc/include/asm/systbl.h | 1 +
arch/powerpc/include/asm/unistd.h | 3 +-
arch/s390/include/asm/unistd.h | 3 +-
arch/s390/kernel/syscalls.S | 1 +
arch/sh/include/asm/unistd_32.h | 3 +-
arch/sh/include/asm/unistd_64.h | 3 +-
arch/sh/kernel/syscalls_32.S | 1 +
arch/sh/kernel/syscalls_64.S | 1 +
arch/sparc/include/asm/unistd.h | 3 +-
arch/sparc/kernel/systbls_32.S | 2 +-
arch/sparc/kernel/systbls_64.S | 4 +-
arch/x86/ia32/ia32entry.S | 1 +
arch/x86/include/asm/unistd_32.h | 3 +-
arch/x86/include/asm/unistd_64.h | 2 +
arch/x86/kernel/syscall_table_32.S | 1 +
arch/xtensa/include/asm/unistd.h | 4 +-
fs/proc/Makefile | 1 +
fs/proc/base.c | 20 ++--
fs/proc/inode.c | 7 +
fs/proc/internal.h | 18 +++
fs/proc/namespaces.c | 198 ++++++++++++++++++++++++++++++++
include/asm-generic/unistd.h | 4 +-
include/linux/if_link.h | 1 +
include/linux/proc_fs.h | 21 ++++
include/linux/syscalls.h | 1 +
include/net/net_namespace.h | 1 +
ipc/namespace.c | 37 ++++++
kernel/nsproxy.c | 42 +++++++
kernel/utsname.c | 39 ++++++
net/core/net_namespace.c | 65 +++++++++++
net/core/rtnetlink.c | 5 +-
63 files changed, 525 insertions(+), 42 deletions(-)
Thanks,
Eric
^ permalink raw reply [flat|nested] 26+ messages in thread* [GIT PULL] Namespace file descriptors for 2.6.40
@ 2011-05-23 21:05 ` Eric W. Biederman
0 siblings, 0 replies; 26+ messages in thread
From: Eric W. Biederman @ 2011-05-23 21:05 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel, Linux Containers, netdev, James Bottomley,
Geert Uytterhoeven
Please pull the namespace file descriptor git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd.git
Because other syscall work has happened in other trees there
are conflicts on alpha and m68k.
For alpha all that is needed is a simple incrementing of the syscall
number in my tree and adding of my syscall to the end of the list.
For m68k please just delete all of the syscall entries the conflict will
add to arch/m68k/kernel/entry_mm.S. The m68k tree has consolidated
everything in arch/m68k/kernel/syscalltable.S
This tree adds the files /proc/<pid>/ns/net, /proc/<pid>/ns/ipc,
/proc/<pid>/ns/uts that can be opened to refer to the namespaces of a
process at the time those files are opened, and can be bind mounted to
keep the specified namespace alive without a process.
This tree adds the setns system call that can be used to change the
specified namespace of a process to the namespace specified by a system
call.
This tree adds a new rtnetlink attribute that allows for moving a
network device into a network namespace specified by a file descriptor.
Support for the other namespaces is planned but is not ready for 2.6.40.
These changes dramatically simplify what a userspace process has to do
to keep a namespace alive, and to execute system calls in it.
The shortlog:
Stephen Rothwell (1):
net: fix get_net_ns_by_fd for !CONFIG_NET_NS
Eric W. Biederman (11):
ns: proc files for namespace naming policy.
ns: Introduce the setns syscall
ns proc: Add support for the network namespace.
ns proc: Add support for the uts namespace
ns proc: Add support for the ipc namespace
net: Allow setting the network namespace by fd
Merge commit '2e7bad5f34b5beed47542490c760ed26574e38ba' into HEAD
Merge commit '7143b7d41218d4fc2ea33e6056c73609527ae687' into HEAD
ns: Wire up the setns system call
ns: Declare sys_setns in syscalls.h
ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry.
The diffstat:
arch/alpha/include/asm/unistd.h | 3 +-
arch/alpha/kernel/systbls.S | 1 +
arch/arm/include/asm/unistd.h | 1 +
arch/arm/kernel/calls.S | 1 +
arch/avr32/include/asm/unistd.h | 3 +-
arch/avr32/kernel/syscall_table.S | 1 +
arch/blackfin/include/asm/unistd.h | 3 +-
arch/blackfin/mach-common/entry.S | 1 +
arch/cris/arch-v10/kernel/entry.S | 1 +
arch/cris/arch-v32/kernel/entry.S | 1 +
arch/cris/include/asm/unistd.h | 3 +-
arch/frv/include/asm/unistd.h | 3 +-
arch/frv/kernel/entry.S | 1 +
arch/h8300/include/asm/unistd.h | 3 +-
arch/h8300/kernel/syscalls.S | 1 +
arch/ia64/include/asm/unistd.h | 3 +-
arch/ia64/kernel/entry.S | 1 +
arch/m32r/include/asm/unistd.h | 3 +-
arch/m32r/kernel/syscall_table.S | 1 +
arch/m68k/include/asm/unistd.h | 3 +-
arch/m68k/kernel/syscalltable.S | 1 +
arch/microblaze/include/asm/unistd.h | 3 +-
arch/microblaze/kernel/syscall_table.S | 1 +
arch/mips/include/asm/unistd.h | 15 ++-
arch/mips/kernel/scall32-o32.S | 1 +
arch/mips/kernel/scall64-64.S | 1 +
arch/mips/kernel/scall64-n32.S | 1 +
arch/mips/kernel/scall64-o32.S | 1 +
arch/mn10300/include/asm/unistd.h | 3 +-
arch/mn10300/kernel/entry.S | 1 +
arch/parisc/include/asm/unistd.h | 4 +-
arch/parisc/kernel/syscall_table.S | 1 +
arch/powerpc/include/asm/systbl.h | 1 +
arch/powerpc/include/asm/unistd.h | 3 +-
arch/s390/include/asm/unistd.h | 3 +-
arch/s390/kernel/syscalls.S | 1 +
arch/sh/include/asm/unistd_32.h | 3 +-
arch/sh/include/asm/unistd_64.h | 3 +-
arch/sh/kernel/syscalls_32.S | 1 +
arch/sh/kernel/syscalls_64.S | 1 +
arch/sparc/include/asm/unistd.h | 3 +-
arch/sparc/kernel/systbls_32.S | 2 +-
arch/sparc/kernel/systbls_64.S | 4 +-
arch/x86/ia32/ia32entry.S | 1 +
arch/x86/include/asm/unistd_32.h | 3 +-
arch/x86/include/asm/unistd_64.h | 2 +
arch/x86/kernel/syscall_table_32.S | 1 +
arch/xtensa/include/asm/unistd.h | 4 +-
fs/proc/Makefile | 1 +
fs/proc/base.c | 20 ++--
fs/proc/inode.c | 7 +
fs/proc/internal.h | 18 +++
fs/proc/namespaces.c | 198 ++++++++++++++++++++++++++++++++
include/asm-generic/unistd.h | 4 +-
include/linux/if_link.h | 1 +
include/linux/proc_fs.h | 21 ++++
include/linux/syscalls.h | 1 +
include/net/net_namespace.h | 1 +
ipc/namespace.c | 37 ++++++
kernel/nsproxy.c | 42 +++++++
kernel/utsname.c | 39 ++++++
net/core/net_namespace.c | 65 +++++++++++
net/core/rtnetlink.c | 5 +-
63 files changed, 525 insertions(+), 42 deletions(-)
Thanks,
Eric
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [GIT PULL] Namespace file descriptors for 2.6.40
2011-05-23 21:05 ` Eric W. Biederman
(?)
@ 2011-05-25 21:05 ` C Anthony Risinger
2011-05-25 21:38 ` Serge E. Hallyn
-1 siblings, 1 reply; 26+ messages in thread
From: C Anthony Risinger @ 2011-05-25 21:05 UTC (permalink / raw)
To: Eric W. Biederman; +Cc: Linux Containers, netdev, linux-kernel
On Mon, May 23, 2011 at 4:05 PM, Eric W. Biederman
<ebiederm@xmission.com> wrote:
>
> This tree adds the files /proc/<pid>/ns/net, /proc/<pid>/ns/ipc,
> /proc/<pid>/ns/uts that can be opened to refer to the namespaces of a
> process at the time those files are opened, and can be bind mounted to
> keep the specified namespace alive without a process.
>
> This tree adds the setns system call that can be used to change the
> specified namespace of a process to the namespace specified by a system
> call.
i just have a quick question regarding these, apologies if wrong place
to respond -- i trimmed to lists only.
if i understand correctly, mount namespaces (for example), allow one
to build such constructs as "private /tmp" and similar that even
`root` cannot access ... and there are many reasons `root` does not
deserve to completely know/interact with user processes (FUSE makes a
good example ... just because i [user] have SSH access to a machine,
why should `root`?)
would these /proc additions break such guarantees? IOW, would it now
become possible for `root` to inject stuff into my private namespaces,
and/or has these guarantees never existed and i am mistaken? is there
any kind of ACL mechanism that endows the origin process (or similar)
with the ability to dictate who can hold and/or interact with these
references?
Thanks for your time,
--
C Anthony
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [GIT PULL] Namespace file descriptors for 2.6.40
2011-05-25 21:05 ` C Anthony Risinger
@ 2011-05-25 21:38 ` Serge E. Hallyn
2011-05-25 21:55 ` C Anthony Risinger
0 siblings, 1 reply; 26+ messages in thread
From: Serge E. Hallyn @ 2011-05-25 21:38 UTC (permalink / raw)
To: C Anthony Risinger
Cc: Eric W. Biederman, Linux Containers, netdev, linux-kernel
Quoting C Anthony Risinger (anthony@xtfx.me):
> On Mon, May 23, 2011 at 4:05 PM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
> >
> > This tree adds the files /proc/<pid>/ns/net, /proc/<pid>/ns/ipc,
> > /proc/<pid>/ns/uts that can be opened to refer to the namespaces of a
> > process at the time those files are opened, and can be bind mounted to
> > keep the specified namespace alive without a process.
> >
> > This tree adds the setns system call that can be used to change the
> > specified namespace of a process to the namespace specified by a system
> > call.
>
> i just have a quick question regarding these, apologies if wrong place
> to respond -- i trimmed to lists only.
>
> if i understand correctly, mount namespaces (for example), allow one
> to build such constructs as "private /tmp" and similar that even
> `root` cannot access ... and there are many reasons `root` does not
> deserve to completely know/interact with user processes (FUSE makes a
> good example ... just because i [user] have SSH access to a machine,
> why should `root`?)
>
> would these /proc additions break such guarantees? IOW, would it now
> become possible for `root` to inject stuff into my private namespaces,
> and/or has these guarantees never existed and i am mistaken? is there
> any kind of ACL mechanism that endows the origin process (or similar)
> with the ability to dictate who can hold and/or interact with these
> references?
If for instance you have a file open in your private /tmp, then root
in another mounts ns can open the file through /proc/$$/fd/N anyway.
If it's a directory, he can now traverse the whole fs.
-serge
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [GIT PULL] Namespace file descriptors for 2.6.40
2011-05-25 21:38 ` Serge E. Hallyn
@ 2011-05-25 21:55 ` C Anthony Risinger
2011-05-25 22:11 ` Michał Mirosław
2011-05-25 23:40 ` Eric W. Biederman
0 siblings, 2 replies; 26+ messages in thread
From: C Anthony Risinger @ 2011-05-25 21:55 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: Eric W. Biederman, Linux Containers, netdev, linux-kernel
On Wed, May 25, 2011 at 4:38 PM, Serge E. Hallyn <serge@hallyn.com> wrote:
> Quoting C Anthony Risinger (anthony@xtfx.me):
>> On Mon, May 23, 2011 at 4:05 PM, Eric W. Biederman
>> <ebiederm@xmission.com> wrote:
>> >
>> > This tree adds the files /proc/<pid>/ns/net, /proc/<pid>/ns/ipc,
>> > /proc/<pid>/ns/uts that can be opened to refer to the namespaces of a
>> > process at the time those files are opened, and can be bind mounted to
>> > keep the specified namespace alive without a process.
>> >
>> > This tree adds the setns system call that can be used to change the
>> > specified namespace of a process to the namespace specified by a system
>> > call.
>>
>> i just have a quick question regarding these, apologies if wrong place
>> to respond -- i trimmed to lists only.
>>
>> if i understand correctly, mount namespaces (for example), allow one
>> to build such constructs as "private /tmp" and similar that even
>> `root` cannot access ... and there are many reasons `root` does not
>> deserve to completely know/interact with user processes (FUSE makes a
>> good example ... just because i [user] have SSH access to a machine,
>> why should `root`?)
>>
>> would these /proc additions break such guarantees? IOW, would it now
>> become possible for `root` to inject stuff into my private namespaces,
>> and/or has these guarantees never existed and i am mistaken? is there
>> any kind of ACL mechanism that endows the origin process (or similar)
>> with the ability to dictate who can hold and/or interact with these
>> references?
>
> If for instance you have a file open in your private /tmp, then root
> in another mounts ns can open the file through /proc/$$/fd/N anyway.
> If it's a directory, he can now traverse the whole fs.
aaah right :-( ... there's always another way isn't there ... curse
you Linux for being so flexible! (just kidding baby i love you)
this seems like a more fundamental issue then? or should i not expect
to be able to achieve separation like this? i ask in the context of
OS virt via cgroups + namespaces, eg. LXC et al, because i'm about to
perform a massive overhaul to our crusty sub-2.6.18 infrastructure and
i've used/followed these technologies for couple years now ... and
it's starting to feel like "the right time".
C Anthony
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [GIT PULL] Namespace file descriptors for 2.6.40
2011-05-25 21:55 ` C Anthony Risinger
@ 2011-05-25 22:11 ` Michał Mirosław
2011-05-25 23:40 ` Eric W. Biederman
1 sibling, 0 replies; 26+ messages in thread
From: Michał Mirosław @ 2011-05-25 22:11 UTC (permalink / raw)
To: C Anthony Risinger
Cc: Serge E. Hallyn, Eric W. Biederman, Linux Containers, netdev,
linux-kernel
2011/5/25 C Anthony Risinger <anthony@xtfx.me>:
> On Wed, May 25, 2011 at 4:38 PM, Serge E. Hallyn <serge@hallyn.com> wrote:
>> Quoting C Anthony Risinger (anthony@xtfx.me):
[...]
>>> if i understand correctly, mount namespaces (for example), allow one
>>> to build such constructs as "private /tmp" and similar that even
>>> `root` cannot access ... and there are many reasons `root` does not
>>> deserve to completely know/interact with user processes (FUSE makes a
>>> good example ... just because i [user] have SSH access to a machine,
>>> why should `root`?)
>> If for instance you have a file open in your private /tmp, then root
>> in another mounts ns can open the file through /proc/$$/fd/N anyway.
>> If it's a directory, he can now traverse the whole fs.
> aaah right :-( ... there's always another way isn't there ... curse
> you Linux for being so flexible! (just kidding baby i love you)
>
> this seems like a more fundamental issue then? or should i not expect
> to be able to achieve separation like this? i ask in the context of
> OS virt via cgroups + namespaces, eg. LXC et al, because i'm about to
> perform a massive overhaul to our crusty sub-2.6.18 infrastructure and
> i've used/followed these technologies for couple years now ... and
> it's starting to feel like "the right time".
You either trust the admin or don't use the machine. There is no third way.
Best Regards,
Michał Mirosław
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [GIT PULL] Namespace file descriptors for 2.6.40
2011-05-25 21:55 ` C Anthony Risinger
2011-05-25 22:11 ` Michał Mirosław
@ 2011-05-25 23:40 ` Eric W. Biederman
2011-05-27 20:18 ` C Anthony Risinger
1 sibling, 1 reply; 26+ messages in thread
From: Eric W. Biederman @ 2011-05-25 23:40 UTC (permalink / raw)
To: C Anthony Risinger
Cc: Serge E. Hallyn, Linux Containers, netdev, linux-kernel
C Anthony Risinger <anthony@xtfx.me> writes:
> On Wed, May 25, 2011 at 4:38 PM, Serge E. Hallyn <serge@hallyn.com> wrote:
>> Quoting C Anthony Risinger (anthony@xtfx.me):
>>> On Mon, May 23, 2011 at 4:05 PM, Eric W. Biederman
>>> <ebiederm@xmission.com> wrote:
>>> >
>>> > This tree adds the files /proc/<pid>/ns/net, /proc/<pid>/ns/ipc,
>>> > /proc/<pid>/ns/uts that can be opened to refer to the namespaces of a
>>> > process at the time those files are opened, and can be bind mounted to
>>> > keep the specified namespace alive without a process.
>>> >
>>> > This tree adds the setns system call that can be used to change the
>>> > specified namespace of a process to the namespace specified by a system
>>> > call.
>>>
>>> i just have a quick question regarding these, apologies if wrong place
>>> to respond -- i trimmed to lists only.
>>>
>>> if i understand correctly, mount namespaces (for example), allow one
>>> to build such constructs as "private /tmp" and similar that even
>>> `root` cannot access ... and there are many reasons `root` does not
>>> deserve to completely know/interact with user processes (FUSE makes a
>>> good example ... just because i [user] have SSH access to a machine,
>>> why should `root`?)
>>>
>>> would these /proc additions break such guarantees? IOW, would it now
>>> become possible for `root` to inject stuff into my private namespaces,
>>> and/or has these guarantees never existed and i am mistaken? is there
>>> any kind of ACL mechanism that endows the origin process (or similar)
>>> with the ability to dictate who can hold and/or interact with these
>>> references?
>>
>> If for instance you have a file open in your private /tmp, then root
>> in another mounts ns can open the file through /proc/$$/fd/N anyway.
>> If it's a directory, he can now traverse the whole fs.
>
> aaah right :-( ... there's always another way isn't there ... curse
> you Linux for being so flexible! (just kidding baby i love you)
Even more significant the access to the new files is guarded by the
ptrace access checks. And if root can ptrace your process root
can remote control your process.
> this seems like a more fundamental issue then? or should i not expect
> to be able to achieve separation like this? i ask in the context of
> OS virt via cgroups + namespaces, eg. LXC et al, because i'm about to
> perform a massive overhaul to our crusty sub-2.6.18 infrastructure and
> i've used/followed these technologies for couple years now ... and
> it's starting to feel like "the right time".
I don't think anything really new is allowed, but we haven't designed
anything that radically reduces the power of root either.
At some point we may have the user namespace done and that should
give you a root like user with vastly reduced powers, but we aren't
there yet.
Eric
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [GIT PULL] Namespace file descriptors for 2.6.40
2011-05-25 23:40 ` Eric W. Biederman
@ 2011-05-27 20:18 ` C Anthony Risinger
0 siblings, 0 replies; 26+ messages in thread
From: C Anthony Risinger @ 2011-05-27 20:18 UTC (permalink / raw)
To: Eric W. Biederman; +Cc: Serge E. Hallyn, Linux Containers, netdev, linux-kernel
On Wed, May 25, 2011 at 6:40 PM, Eric W. Biederman
<ebiederm@xmission.com> wrote:
> C Anthony Risinger <anthony@xtfx.me> writes:
>
>> On Wed, May 25, 2011 at 4:38 PM, Serge E. Hallyn <serge@hallyn.com> wrote:
>>> Quoting C Anthony Risinger (anthony@xtfx.me):
>>>> On Mon, May 23, 2011 at 4:05 PM, Eric W. Biederman
>>>> <ebiederm@xmission.com> wrote:
>>>> >
>>>> > This tree adds the files /proc/<pid>/ns/net, /proc/<pid>/ns/ipc,
>>>> > /proc/<pid>/ns/uts that can be opened to refer to the namespaces of a
>>>> > process at the time those files are opened, and can be bind mounted to
>>>> > keep the specified namespace alive without a process.
>>>> >
>>>> > This tree adds the setns system call that can be used to change the
>>>> > specified namespace of a process to the namespace specified by a system
>>>> > call.
>>>>
>>>> i just have a quick question regarding these, apologies if wrong place
>>>> to respond -- i trimmed to lists only.
>>>>
>>>> if i understand correctly, mount namespaces (for example), allow one
>>>> to build such constructs as "private /tmp" and similar that even
>>>> `root` cannot access ... and there are many reasons `root` does not
>>>> deserve to completely know/interact with user processes (FUSE makes a
>>>> good example ... just because i [user] have SSH access to a machine,
>>>> why should `root`?)
>>>>
>>>> would these /proc additions break such guarantees? IOW, would it now
>>>> become possible for `root` to inject stuff into my private namespaces,
>>>> and/or has these guarantees never existed and i am mistaken? is there
>>>> any kind of ACL mechanism that endows the origin process (or similar)
>>>> with the ability to dictate who can hold and/or interact with these
>>>> references?
>>>
>>> If for instance you have a file open in your private /tmp, then root
>>> in another mounts ns can open the file through /proc/$$/fd/N anyway.
>>> If it's a directory, he can now traverse the whole fs.
>>
>> aaah right :-( ... there's always another way isn't there ... curse
>> you Linux for being so flexible! (just kidding baby i love you)
>
> Even more significant the access to the new files is guarded by the
> ptrace access checks. And if root can ptrace your process root
> can remote control your process.
>
>> this seems like a more fundamental issue then? or should i not expect
>> to be able to achieve separation like this? i ask in the context of
>> OS virt via cgroups + namespaces, eg. LXC et al, because i'm about to
>> perform a massive overhaul to our crusty sub-2.6.18 infrastructure and
>> i've used/followed these technologies for couple years now ... and
>> it's starting to feel like "the right time".
>
> I don't think anything really new is allowed, but we haven't designed
> anything that radically reduces the power of root either.
>
> At some point we may have the user namespace done and that should
> give you a root like user with vastly reduced powers, but we aren't
> there yet.
ok -- i knew there was some user namespace work still left for a
namespaced root -- i was specifically thinking of the root user in the
host. i was under the impression that namespaces could achieve
separation even from the host (save the kernel itself) ... but it
seems i was mistaken ... still much to learn about Linux i suppose,
even though i use it everyday for years and years :-) it kind of
makes sense i guess, since maybe the host needs supervisory powers
over the guests? could be some merit for real separation in the
future (not only malevolent root host user, but say an attacker/script
that manages to break thru container?), though how possible i dont
know. i wouldnt expect the root user to be prevented from killing/etc
the container, but maybe only prevented from snooping, eg. the
container looks like a black box that he may only resource control or
kill completely. either way, what we have is just fine for my (and
likely many other's) uses.
anyways, thanks for all the answers and all the work on
namespacing/cgroups ... very useful constructs for a wide array of
problems.
--
C Anthony
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2011-05-27 20:18 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-21 23:39 [GIT PULL] Namespace file descriptors for 2.6.40 Eric W. Biederman
2011-05-21 23:39 ` Eric W. Biederman
2011-05-21 23:42 ` Linus Torvalds
2011-05-22 0:33 ` Eric W. Biederman
[not found] ` <m1boyvpo9r.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-05-22 7:13 ` James Bottomley
2011-05-22 7:13 ` James Bottomley
2011-05-22 8:42 ` Ingo Molnar
2011-05-24 7:03 ` Eric W. Biederman
2011-05-24 7:16 ` Ingo Molnar
2011-05-25 0:34 ` Valdis.Kletnieks
2011-05-25 8:25 ` Ingo Molnar
2011-05-25 8:35 ` Geert Uytterhoeven
2011-05-25 12:47 ` Ingo Molnar
2011-05-25 13:00 ` Geert Uytterhoeven
2011-05-25 13:17 ` Ingo Molnar
2011-05-25 15:22 ` Geert Uytterhoeven
2011-05-24 7:26 ` James Bottomley
2011-05-24 8:11 ` Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2011-05-23 21:05 Eric W. Biederman
2011-05-23 21:05 ` Eric W. Biederman
2011-05-25 21:05 ` C Anthony Risinger
2011-05-25 21:38 ` Serge E. Hallyn
2011-05-25 21:55 ` C Anthony Risinger
2011-05-25 22:11 ` Michał Mirosław
2011-05-25 23:40 ` Eric W. Biederman
2011-05-27 20:18 ` C Anthony Risinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.