[PATCH v4 1/2] nsfs: Add an ioctl() to return the namespace type

2017-01-24 Thread Michael Kerrisk (man-pages)
that refers to a user namespace, returns the namespace type (one of the CLONE_NEW* constants). Signed-off-by: Michael Kerrisk <mtk-manpa...@gmail.com> --- fs/nsfs.c | 2 ++ include/uapi/linux/nsfs.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/fs/nsfs.c b/fs/nsfs.c

[PATCH v4 1/2] nsfs: Add an ioctl() to return the namespace type

2017-01-24 Thread Michael Kerrisk (man-pages)
that refers to a user namespace, returns the namespace type (one of the CLONE_NEW* constants). Signed-off-by: Michael Kerrisk --- fs/nsfs.c | 2 ++ include/uapi/linux/nsfs.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/fs/nsfs.c b/fs/nsfs.c index 8c9fb29..5d53476 100644

[PATCH v4 0/2] Add further ioctl() operations for namespace discovery

2017-01-24 Thread Michael Kerrisk (man-pages)
an example program that makes use of the new ioctl() operations. 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* ns_capable.c (C) 2016 Michael Kerrisk, <mtk.manpa...@gmail.com> Licensed under the GNU General Public License v2 or later. Test whether a p

[PATCH v4 0/2] Add further ioctl() operations for namespace discovery

2017-01-24 Thread Michael Kerrisk (man-pages)
an example program that makes use of the new ioctl() operations. 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* ns_capable.c (C) 2016 Michael Kerrisk, Licensed under the GNU General Public License v2 or later. Test whether a process (identified by PID) might

Re: [PATCH v2 0/2] Add further ioctl() operations for namespace discovery

2017-01-24 Thread Michael Kerrisk (man-pages)
Hello Eric, On 01/25/2017 11:41 AM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes: > >> Hi Eric, >> >> Do you have any input for this small patch set? I've still to tweak a >> comment as suggested

Re: [PATCH v2 0/2] Add further ioctl() operations for namespace discovery

2017-01-24 Thread Michael Kerrisk (man-pages)
Hello Eric, On 01/25/2017 11:41 AM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > >> Hi Eric, >> >> Do you have any input for this small patch set? I've still to tweak a >> comment as suggested by Trevor King, but otherwise I

Re: [PATCH v2 0/2] Add further ioctl() operations for namespace discovery

2017-01-24 Thread Michael Kerrisk (man-pages)
Hi Eric, Do you have any input for this small patch set? I've still to tweak a comment as suggested by Trevor King, but otherwise I'd like to know if this is good to go for the next merge window. Cheers, Michael On 23 December 2016 at 22:54, Michael Kerrisk (man-pages) <mtk.manpa...@gmail.

Re: [PATCH v2 0/2] Add further ioctl() operations for namespace discovery

2017-01-24 Thread Michael Kerrisk (man-pages)
Hi Eric, Do you have any input for this small patch set? I've still to tweak a comment as suggested by Trevor King, but otherwise I'd like to know if this is good to go for the next merge window. Cheers, Michael On 23 December 2016 at 22:54, Michael Kerrisk (man-pages) wrote: > I would l

Re: [PATCH v3 2/2] nsfs: Add an ioctl() to return owner UID of a userns

2017-01-18 Thread Michael Kerrisk (man-pages)
On 17 January 2017 at 14:19, W. Trevor King <wk...@tremily.us> wrote: > On Tue, Jan 17, 2017 at 02:03:29PM +1300, Michael Kerrisk (man-pages) wrote: >> + case NS_GET_OWNER_UID: >> + if (ns->ops->type != CLONE_NEWUSER) >> +

Re: [PATCH v3 2/2] nsfs: Add an ioctl() to return owner UID of a userns

2017-01-18 Thread Michael Kerrisk (man-pages)
On 17 January 2017 at 14:19, W. Trevor King wrote: > On Tue, Jan 17, 2017 at 02:03:29PM +1300, Michael Kerrisk (man-pages) wrote: >> + case NS_GET_OWNER_UID: >> + if (ns->ops->type != CLONE_NEWUSER) >> + return -EINVAL; >> +

Re: writev error codes

2017-01-18 Thread Michael Kerrisk (man-pages)
Furthermore, preadv(), preadv2(), pwritev(), and pwritev2() can also fail for the same reasons as lseek(2). And in the write(2) page, we have: EFAULT buf is outside your accessible address space. Does this not cover the case you describe? Cheers, Michael -- Michael K

Re: writev error codes

2017-01-18 Thread Michael Kerrisk (man-pages)
e, preadv(), preadv2(), pwritev(), and pwritev2() can also fail for the same reasons as lseek(2). And in the write(2) page, we have: EFAULT buf is outside your accessible address space. Does this not cover the case you describe? Cheers, Michael -- Michael Kerrisk Linux man-p

[PATCH v3 2/2] nsfs: Add an ioctl() to return owner UID of a userns

2017-01-16 Thread Michael Kerrisk (man-pages)
) UID of the creator of the user namespace referred to by the specified file descriptor. If the supplied file descriptor does not refer to a user namespace, the operation fails with the error EINVAL. Acked-by: Andrey Vagin <ava...@openvz.org> Signed-off-by: Michael Kerrisk <mtk-manpa...@

[PATCH v3 2/2] nsfs: Add an ioctl() to return owner UID of a userns

2017-01-16 Thread Michael Kerrisk (man-pages)
) UID of the creator of the user namespace referred to by the specified file descriptor. If the supplied file descriptor does not refer to a user namespace, the operation fails with the error EINVAL. Acked-by: Andrey Vagin Signed-off-by: Michael Kerrisk --- Open questions: Should the type

[PATCH v3 1/2] nsfs: Add an ioctl() to return the namespace type

2017-01-16 Thread Michael Kerrisk (man-pages)
that refers to a user namespace, returns the namespace type (one of the CLONE_NEW* constants). Signed-off-by: Michael Kerrisk <mtk-manpa...@gmail.com> --- fs/nsfs.c | 2 ++ include/uapi/linux/nsfs.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/fs/nsfs.c b/fs/nsfs.c

[PATCH v3 1/2] nsfs: Add an ioctl() to return the namespace type

2017-01-16 Thread Michael Kerrisk (man-pages)
that refers to a user namespace, returns the namespace type (one of the CLONE_NEW* constants). Signed-off-by: Michael Kerrisk --- fs/nsfs.c | 2 ++ include/uapi/linux/nsfs.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/fs/nsfs.c b/fs/nsfs.c index 8c9fb29..5d53476 100644

[PATCH v3 0/2] Add further ioctl() operations for namespace discovery

2017-01-16 Thread Michael Kerrisk (man-pages)
an example program that makes use of the new ioctl() operations. 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* ns_capable.c (C) 2016 Michael Kerrisk, <mtk.manpa...@gmail.com> Licensed under the GNU General Public License v2 or later. Test whether a p

[PATCH v3 0/2] Add further ioctl() operations for namespace discovery

2017-01-16 Thread Michael Kerrisk (man-pages)
an example program that makes use of the new ioctl() operations. 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* ns_capable.c (C) 2016 Michael Kerrisk, Licensed under the GNU General Public License v2 or later. Test whether a process (identified by PID) might

Re: [PATCH v2 2/2] nsfs: Add an ioctl() to return owner UID of a userns

2017-01-05 Thread Michael Kerrisk (man-pages)
Hello Andrei, On 24 December 2016 at 14:16, Andrei Vagin <ava...@virtuozzo.com> wrote: > On Fri, Dec 23, 2016 at 10:54:53AM +0100, Michael Kerrisk (man-pages) wrote: >> I'd like to write code that discovers the user namespace hierarchy on >> a running system, and also shows

Re: [PATCH v2 2/2] nsfs: Add an ioctl() to return owner UID of a userns

2017-01-05 Thread Michael Kerrisk (man-pages)
Hello Andrei, On 24 December 2016 at 14:16, Andrei Vagin wrote: > On Fri, Dec 23, 2016 at 10:54:53AM +0100, Michael Kerrisk (man-pages) wrote: >> I'd like to write code that discovers the user namespace hierarchy on >> a running system, and also shows who owns the various

[PATCH v2 1/2] nsfs: Add an ioctl() to return the namespace type

2016-12-23 Thread Michael Kerrisk (man-pages)
that refers to a user namespace, returns the namespace type (one of the CLONE_NEW* constants). Signed-off-by: Michael Kerrisk <mtk-manpa...@gmail.com> --- fs/nsfs.c | 2 ++ include/uapi/linux/nsfs.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/fs/nsfs.c b/fs/nsfs.c

[PATCH v2 1/2] nsfs: Add an ioctl() to return the namespace type

2016-12-23 Thread Michael Kerrisk (man-pages)
that refers to a user namespace, returns the namespace type (one of the CLONE_NEW* constants). Signed-off-by: Michael Kerrisk --- fs/nsfs.c | 2 ++ include/uapi/linux/nsfs.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/fs/nsfs.c b/fs/nsfs.c index 8718af8..9f24b47 100644

[PATCH v2 0/2] Add further ioctl() operations for namespace discovery

2016-12-23 Thread Michael Kerrisk (man-pages)
an example program that makes use of the new ioctl() operations. 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* ns_capable.c (C) 2016 Michael Kerrisk, <mtk.manpa...@gmail.com> Licensed under the GNU General Public License v2 or later. Test whether a p

[PATCH v2 2/2] nsfs: Add an ioctl() to return owner UID of a userns

2016-12-23 Thread Michael Kerrisk (man-pages)
) UID of the creator of the user namespace referred to by the specified file descriptor. If the supplied file descriptor does not refer to a user namespace, the operation fails with the error EINVAL. Signed-off-by: Michael Kerrisk <mtk-manpa...@gmail.com> --- V2 changes: * Renamed ioctl(

[PATCH v2 0/2] Add further ioctl() operations for namespace discovery

2016-12-23 Thread Michael Kerrisk (man-pages)
an example program that makes use of the new ioctl() operations. 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* ns_capable.c (C) 2016 Michael Kerrisk, Licensed under the GNU General Public License v2 or later. Test whether a process (identified by PID) might

[PATCH v2 2/2] nsfs: Add an ioctl() to return owner UID of a userns

2016-12-23 Thread Michael Kerrisk (man-pages)
) UID of the creator of the user namespace referred to by the specified file descriptor. If the supplied file descriptor does not refer to a user namespace, the operation fails with the error EINVAL. Signed-off-by: Michael Kerrisk --- V2 changes: * Renamed ioctl() from NS_CREATOR_UID

Re: [PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-21 Thread Michael Kerrisk (man-pages)
Hi Eric, On 12/22/2016 01:27 AM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes: > >> Hi Eric, >> >> On 12/21/2016 01:17 AM, Eric W. Biederman wrote: >>> "Michael Kerrisk (man-pages)" <mtk.ma

Re: [PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-21 Thread Michael Kerrisk (man-pages)
Hi Eric, On 12/22/2016 01:27 AM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > >> Hi Eric, >> >> On 12/21/2016 01:17 AM, Eric W. Biederman wrote: >>> "Michael Kerrisk (man-pages)" writes: >>> >>&

Re: [PATCH 2/2] nsfs: Add an ioctl() to return creator UID of a userns

2016-12-21 Thread Michael Kerrisk (man-pages)
Hi Andrei, On 12/21/2016 04:13 AM, Andrei Vagin wrote: > On Mon, Dec 19, 2016 at 03:38:35PM +0100, Michael Kerrisk (man-pages) wrote: >> # Some open questions about this patch below. >> # >> One of the rules regarding capabilities is: >> >> A process that

Re: [PATCH 2/2] nsfs: Add an ioctl() to return creator UID of a userns

2016-12-21 Thread Michael Kerrisk (man-pages)
Hi Andrei, On 12/21/2016 04:13 AM, Andrei Vagin wrote: > On Mon, Dec 19, 2016 at 03:38:35PM +0100, Michael Kerrisk (man-pages) wrote: >> # Some open questions about this patch below. >> # >> One of the rules regarding capabilities is: >> >> A process that

Re: [PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-21 Thread Michael Kerrisk (man-pages)
Hi Eric, On 12/21/2016 01:17 AM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes: > >> Hi Eric, >> >> On 12/20/2016 09:22 PM, Eric W. Biederman wrote: >>> "Michael Kerrisk (man-pages)" <mtk.ma

Re: [PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-21 Thread Michael Kerrisk (man-pages)
Hi Eric, On 12/21/2016 01:17 AM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > >> Hi Eric, >> >> On 12/20/2016 09:22 PM, Eric W. Biederman wrote: >>> "Michael Kerrisk (man-pages)" writes: >>> >>>

Re: [PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-20 Thread Michael Kerrisk (man-pages)
Hi Eric, On 12/20/2016 09:22 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes: > >> Hello Eric, >> >> On 12/19/2016 11:53 PM, Eric W. Biederman wrote: >>> "Michael Kerrisk (man-pages)" <mtk

Re: [PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-20 Thread Michael Kerrisk (man-pages)
Hi Eric, On 12/20/2016 09:22 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > >> Hello Eric, >> >> On 12/19/2016 11:53 PM, Eric W. Biederman wrote: >>> "Michael Kerrisk (man-pages)" writes: >>> >>>&

Re: [PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-20 Thread Michael Kerrisk (man-pages)
Hello Eric, On 12/19/2016 11:53 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes: > >> Eric, >> >> The code proposed in this patch series is pretty small. Is there any >> chance we could make the 4.10 m

Re: [PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-20 Thread Michael Kerrisk (man-pages)
Hello Eric, On 12/19/2016 11:53 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > >> Eric, >> >> The code proposed in this patch series is pretty small. Is there any >> chance we could make the 4.10 merge window, if the changes seem

[PATCH 2/2] nsfs: Add an ioctl() to return creator UID of a userns

2016-12-19 Thread Michael Kerrisk (man-pages)
. If the supplied file descriptor does not refer to a user namespace, the operation fails with the error EINVAL. Signed-off-by: Michael Kerrisk <mtk-manpa...@gmail.com> --- fs/nsfs.c | 6 ++ include/uapi/linux/nsfs.h | 8 +--- 2 files changed, 11 insertions(+), 3 del

[PATCH 2/2] nsfs: Add an ioctl() to return creator UID of a userns

2016-12-19 Thread Michael Kerrisk (man-pages)
. If the supplied file descriptor does not refer to a user namespace, the operation fails with the error EINVAL. Signed-off-by: Michael Kerrisk --- fs/nsfs.c | 6 ++ include/uapi/linux/nsfs.h | 8 +--- 2 files changed, 11 insertions(+), 3 deletions(-) Open questions: * Would

[PATCH 1/2] nsfs: Add an ioctl() to return the namespace type

2016-12-19 Thread Michael Kerrisk (man-pages)
ace, I get the parent user namespace of Y, which is not what I want). This patch therefore adds a new ioctl(), NS_GET_NSTYPE, which, given a file descriptor that refers to a user namespace, returns the namespace type (one of the CLONE_NEW* constants). Signed-off-by: Michael Kerrisk <mtk-manpa

[PATCH 1/2] nsfs: Add an ioctl() to return the namespace type

2016-12-19 Thread Michael Kerrisk (man-pages)
ace, I get the parent user namespace of Y, which is not what I want). This patch therefore adds a new ioctl(), NS_GET_NSTYPE, which, given a file descriptor that refers to a user namespace, returns the namespace type (one of the CLONE_NEW* constants). Signed-off-by: Michael Kerrisk ---

[PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-19 Thread Michael Kerrisk (man-pages)
. Here's an example program that makes use of the new ioctl() operations. 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* ns_capable.c (C) 2016 Michael Kerrisk, <mtk.manpa...@gmail.com> Licensed under the GNU General Public License v2 or later. */ #d

[PATCH 0/2] Add further ioctl() operations for namespace discovery

2016-12-19 Thread Michael Kerrisk (man-pages)
. Here's an example program that makes use of the new ioctl() operations. 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* ns_capable.c (C) 2016 Michael Kerrisk, Licensed under the GNU General Public License v2 or later. */ #define _GNU_SOURCE #include #include

Re: RFC: capabilities(7): notes for kernel developers

2016-12-17 Thread Michael Kerrisk (man-pages)
On 12/16/2016 09:10 PM, Serge E. Hallyn wrote: > Quoting Michael Kerrisk (man-pages) (mtk.manpa...@gmail.com): >> On 12/16/2016 01:44 AM, Casey Schaufler wrote: >>> On 12/15/2016 4:31 PM, John Stultz wrote: >>>> On Thu, Dec 15, 2016 at 12:40 PM, Casey Schaufler >&

Re: RFC: capabilities(7): notes for kernel developers

2016-12-17 Thread Michael Kerrisk (man-pages)
On 12/16/2016 09:10 PM, Serge E. Hallyn wrote: > Quoting Michael Kerrisk (man-pages) (mtk.manpa...@gmail.com): >> On 12/16/2016 01:44 AM, Casey Schaufler wrote: >>> On 12/15/2016 4:31 PM, John Stultz wrote: >>>> On Thu, Dec 15, 2016 at 12:40 PM, Casey Schaufler >&

Re: Revised request_key(2) man page for review

2016-12-17 Thread Michael Kerrisk (man-pages)
Hello David, On 12/15/2016 11:10 AM, David Howells wrote: > Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > >>>│Is 'keyring' allowed to be 0? Reading the source, it │ >>>│appears so. In this case, by default, the

Re: Revised request_key(2) man page for review

2016-12-17 Thread Michael Kerrisk (man-pages)
Hello David, On 12/15/2016 11:10 AM, David Howells wrote: > Michael Kerrisk (man-pages) wrote: > >>>│Is 'keyring' allowed to be 0? Reading the source, it │ >>>│appears so. In this case, by default, the key is │ >>>│assign

Re: Document accounting of FDs passed over UNIX domain sockets

2016-12-17 Thread Michael Kerrisk (man-pages)
Hi Willy, On 12/17/2016 08:04 AM, Willy Tarreau wrote: > Hi Michael, > > On Fri, Dec 16, 2016 at 12:08:33PM +0100, Michael Kerrisk (man-pages) wrote: >> Hello Willy, >> >> Your commit 712f4aad406bb1 ("unix: properly account for FDs passed over >> un

Re: Document accounting of FDs passed over UNIX domain sockets

2016-12-17 Thread Michael Kerrisk (man-pages)
Hi Willy, On 12/17/2016 08:04 AM, Willy Tarreau wrote: > Hi Michael, > > On Fri, Dec 16, 2016 at 12:08:33PM +0100, Michael Kerrisk (man-pages) wrote: >> Hello Willy, >> >> Your commit 712f4aad406bb1 ("unix: properly account for FDs passed over >> un

Re: RFC: capabilities(7): notes for kernel developers

2016-12-16 Thread Michael Kerrisk (man-pages)
On 12/15/2016 09:40 PM, Casey Schaufler wrote: > On 12/15/2016 11:41 AM, Michael Kerrisk (man-pages) wrote: >> Hello Casey, >> >> On 12/15/2016 05:29 PM, Casey Schaufler wrote: >>> On 12/15/2016 3:40 AM, Michael Kerrisk (man-pages) wrote: [...] >>>

Re: RFC: capabilities(7): notes for kernel developers

2016-12-16 Thread Michael Kerrisk (man-pages)
On 12/15/2016 09:40 PM, Casey Schaufler wrote: > On 12/15/2016 11:41 AM, Michael Kerrisk (man-pages) wrote: >> Hello Casey, >> >> On 12/15/2016 05:29 PM, Casey Schaufler wrote: >>> On 12/15/2016 3:40 AM, Michael Kerrisk (man-pages) wrote: [...] >>>

Re: RFC: capabilities(7): notes for kernel developers

2016-12-16 Thread Michael Kerrisk (man-pages)
On 12/16/2016 01:44 AM, Casey Schaufler wrote: > On 12/15/2016 4:31 PM, John Stultz wrote: >> On Thu, Dec 15, 2016 at 12:40 PM, Casey Schaufler >> <ca...@schaufler-ca.com> wrote: >>> On 12/15/2016 11:41 AM, Michael Kerrisk (man-pages) wrote: >>>> On

Re: RFC: capabilities(7): notes for kernel developers

2016-12-16 Thread Michael Kerrisk (man-pages)
On 12/16/2016 01:44 AM, Casey Schaufler wrote: > On 12/15/2016 4:31 PM, John Stultz wrote: >> On Thu, Dec 15, 2016 at 12:40 PM, Casey Schaufler >> wrote: >>> On 12/15/2016 11:41 AM, Michael Kerrisk (man-pages) wrote: >>>> On 12/15/2016 05:29 PM, Casey Schaufl

Document accounting of FDs passed over UNIX domain sockets

2016-12-16 Thread Michael Kerrisk (man-pages)
the RLIMIT_NOFILE resource limit. -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/

Document accounting of FDs passed over UNIX domain sockets

2016-12-16 Thread Michael Kerrisk (man-pages)
the RLIMIT_NOFILE resource limit. -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/

Re: RFC: capabilities(7): notes for kernel developers

2016-12-15 Thread Michael Kerrisk (man-pages)
Hello Casey, On 12/15/2016 05:29 PM, Casey Schaufler wrote: > On 12/15/2016 3:40 AM, Michael Kerrisk (man-pages) wrote: >> Hello all, >> >> Because the topic every now then comes up "which capability >> should I associate with the new feature that I'm adding to &

Re: RFC: capabilities(7): notes for kernel developers

2016-12-15 Thread Michael Kerrisk (man-pages)
Hello Casey, On 12/15/2016 05:29 PM, Casey Schaufler wrote: > On 12/15/2016 3:40 AM, Michael Kerrisk (man-pages) wrote: >> Hello all, >> >> Because the topic every now then comes up "which capability >> should I associate with the new feature that I'm adding to &

RFC: capabilities(7): notes for kernel developers

2016-12-15 Thread Michael Kerrisk (man-pages)
use" capability. Thus, for example, the addition of the highly specific CAP_WAKE_ALARM was probably a mistake. Instead, try to identify and name your new capability as a broader silo into which other related future use cases might fit. -- Michael

RFC: capabilities(7): notes for kernel developers

2016-12-15 Thread Michael Kerrisk (man-pages)
use" capability. Thus, for example, the addition of the highly specific CAP_WAKE_ALARM was probably a mistake. Instead, try to identify and name your new capability as a broader silo into which other related future use cases might fit. -- Michael

Re: Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-15 Thread Michael Kerrisk (man-pages)
On 12/15/2016 01:46 AM, Andrei Vagin wrote: > On Sun, Dec 11, 2016 at 12:54:56PM +0100, Michael Kerrisk (man-pages) wrote: >> [was: [PATCH 0/4 v3] Add an interface to discover relationships >> between namespaces] >> >> Hello Andrei >> >> See below for my att

Re: Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-15 Thread Michael Kerrisk (man-pages)
On 12/15/2016 01:46 AM, Andrei Vagin wrote: > On Sun, Dec 11, 2016 at 12:54:56PM +0100, Michael Kerrisk (man-pages) wrote: >> [was: [PATCH 0/4 v3] Add an interface to discover relationships >> between namespaces] >> >> Hello Andrei >> >> See below for my att

Re: Revised request_key(2) man page for review

2016-12-14 Thread Michael Kerrisk (man-pages)
Hi David, Might you also have a chance to take a look at this page? Cheers, Michael On 4 November 2016 at 16:45, Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > Hi David (and anyone else with an interest to review) > > Triggered by Eugene Syromyatnikov

Re: Revised request_key(2) man page for review

2016-12-14 Thread Michael Kerrisk (man-pages)
Hi David, Might you also have a chance to take a look at this page? Cheers, Michael On 4 November 2016 at 16:45, Michael Kerrisk (man-pages) wrote: > Hi David (and anyone else with an interest to review) > > Triggered by Eugene Syromyatnikov's recent input for the keyctl(2) > ma

Re: Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-14 Thread Michael Kerrisk (man-pages)
On 12/12/2016 07:18 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes: > >> On 12/11/2016 11:30 PM, Eric W. Biederman wrote: >>> "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes: >&

Re: Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-14 Thread Michael Kerrisk (man-pages)
On 12/12/2016 07:18 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > >> On 12/11/2016 11:30 PM, Eric W. Biederman wrote: >>> "Michael Kerrisk (man-pages)" writes: >>> >>>> [was: [PATCH 0/4 v3] Add an interface

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
On 12/13/2016 03:20 PM, David Howells wrote: > Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > >> The payload data may be stored in a tmpfs filesystem, >> rather than in kernel memory, if the data size exceeds the &

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
On 12/13/2016 03:20 PM, David Howells wrote: > Michael Kerrisk (man-pages) wrote: > >> The payload data may be stored in a tmpfs filesystem, >> rather than in kernel memory, if the data size exceeds the >> over

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
On 12/13/2016 02:38 PM, David Howells wrote: > Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > >> So, I've updated this piece a couple of times since the draft that you >> reviewed, and by now it reads: >> >>"big_key" (si

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
On 12/13/2016 02:38 PM, David Howells wrote: > Michael Kerrisk (man-pages) wrote: > >> So, I've updated this piece a couple of times since the draft that you >> reviewed, and by now it reads: >> >>"big_key" (since Linux 3.13) >>

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hi David, On 12/13/2016 02:31 PM, David Howells wrote: > Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > >> I use/Linux man-pages uses the "Oxford comma" convention. > > "... an optional comma ..." ;-) > > There's also: >

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hi David, On 12/13/2016 02:31 PM, David Howells wrote: > Michael Kerrisk (man-pages) wrote: > >> I use/Linux man-pages uses the "Oxford comma" convention. > > "... an optional comma ..." ;-) > > There's also: > > ... LSM secur

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hello David, Amended a piece here after Eugene's note about encrypted keys. On 13 December 2016 at 13:43, Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > Hi David, > > On 12/13/2016 12:35 PM, David Howells wrote: >> Michael Kerrisk <m...@man7.org> wr

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hello David, Amended a piece here after Eugene's note about encrypted keys. On 13 December 2016 at 13:43, Michael Kerrisk (man-pages) wrote: > Hi David, > > On 12/13/2016 12:35 PM, David Howells wrote: >> Michael Kerrisk wrote: >> >>>

Re: Revised add_key(2) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hi Eugene, On 13 December 2016 at 13:06, Eugene Syromyatnikov <evg...@gmail.com> wrote: > On Tue, Dec 13, 2016 at 11:49 AM, Michael Kerrisk (man-pages) > <mtk.manpa...@gmail.com> wrote: >> On 13 December 2016 at 12:37, David Howells <dhowe...@redhat.com> wrote:

Re: Revised add_key(2) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hi Eugene, On 13 December 2016 at 13:06, Eugene Syromyatnikov wrote: > On Tue, Dec 13, 2016 at 11:49 AM, Michael Kerrisk (man-pages) > wrote: >> On 13 December 2016 at 12:37, David Howells wrote: >>> Michael Kerrisk (man-pages) wrote: >>> >>

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hi David, On 12/13/2016 12:35 PM, David Howells wrote: > Michael Kerrisk <m...@man7.org> wrote: > >>The Linux key-management facility is primarily a way for driv‐ >>ers to retain or cache security data, authentication keys, >>e

Re: Revised keyrings(7) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hi David, On 12/13/2016 12:35 PM, David Howells wrote: > Michael Kerrisk wrote: > >>The Linux key-management facility is primarily a way for driv‐ >>ers to retain or cache security data, authentication keys, >>encryption keys, and

Re: Revised add_key(2) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
On 13 December 2016 at 12:37, David Howells <dhowe...@redhat.com> wrote: > Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > >> > "stored encrypted in swap space". >> >> Fixed. > > Since 4.8, that is. Which commit was that? I c

Re: Revised add_key(2) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
On 13 December 2016 at 12:37, David Howells wrote: > Michael Kerrisk (man-pages) wrote: > >> > "stored encrypted in swap space". >> >> Fixed. > > Since 4.8, that is. Which commit was that? I could not find it? -- Michael Kerrisk Linux man-pages main

Re: Revised add_key(2) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hello David Thanks for the review! On 12/13/2016 11:58 AM, David Howells wrote: > Michael Kerrisk (man-pages) <mtk.manpa...@gmail.com> wrote: > >>The destination keyring serial number may be that of a valid >>keyring for which the caller has wri

Re: Revised add_key(2) man page for review

2016-12-13 Thread Michael Kerrisk (man-pages)
Hello David Thanks for the review! On 12/13/2016 11:58 AM, David Howells wrote: > Michael Kerrisk (man-pages) wrote: > >>The destination keyring serial number may be that of a valid >>keyring for which the caller has write permission, or it ma

Re: [PATCH v5] cgroup: Add new capability to allow a process to migrate other tasks between cgroups

2016-12-13 Thread Michael Kerrisk (man-pages)
mp;& > !uid_eq(cred->euid, tcred->uid) && > - !uid_eq(cred->euid, tcred->suid)) > + !uid_eq(cred->euid, tcred->suid) && > + !ns_capable(tcred->user_ns, CAP_CGROUP_MIGRATE)) > ret = -EACCES; > > if (!ret && cgroup_on_dfl(dst_cgrp)) { > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-api" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/

Re: [PATCH v5] cgroup: Add new capability to allow a process to migrate other tasks between cgroups

2016-12-13 Thread Michael Kerrisk (man-pages)
ed->suid) && > + !ns_capable(tcred->user_ns, CAP_CGROUP_MIGRATE)) > ret = -EACCES; > > if (!ret && cgroup_on_dfl(dst_cgrp)) { > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-api" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/

Re: Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-12 Thread Michael Kerrisk (man-pages)
On 12/11/2016 11:30 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes: > >> [was: [PATCH 0/4 v3] Add an interface to discover relationships >> between namespaces] > > One small comment below. > >

Re: Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-12 Thread Michael Kerrisk (man-pages)
On 12/11/2016 11:30 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > >> [was: [PATCH 0/4 v3] Add an interface to discover relationships >> between namespaces] > > One small comment below. > >> >>Introspecting names

man-pages-4.09 is released

2016-12-12 Thread Michael Kerrisk (man-pages)
in this release that may be of interest to readers on LKML is shown below. Cheers, Michael Changes in man-pages-4.09 New and rewritten pages --- pkey_alloc.2 Dave Hansen [Michael Kerrisk] New page documenting pkey_alloc(2

man-pages-4.09 is released

2016-12-12 Thread Michael Kerrisk (man-pages)
in this release that may be of interest to readers on LKML is shown below. Cheers, Michael Changes in man-pages-4.09 New and rewritten pages --- pkey_alloc.2 Dave Hansen [Michael Kerrisk] New page documenting pkey_alloc(2

Re: Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-11 Thread Michael Kerrisk (man-pages)
[Fixing Serge's address in my original CC] On 12/11/2016 11:30 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes: > >> [was: [PATCH 0/4 v3] Add an interface to discover relationships >> between namesp

Re: Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-11 Thread Michael Kerrisk (man-pages)
[Fixing Serge's address in my original CC] On 12/11/2016 11:30 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > >> [was: [PATCH 0/4 v3] Add an interface to discover relationships >> between namespaces] > > One small comment below. &

Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-11 Thread Michael Kerrisk (man-pages)
perror("ioctl-NS_GET_PARENT"); exit(EXIT_FAILURE); } if (fstat(parent_fd, ) == -1) { perror("fstat-parentns"); exit(EXIT_FAILURE); } printf("Inode number of parent namespace is: %ld\n", (long) sb.st_ino); close(parent_fd); } exit(EXIT_SUCCESS); } -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/

Documenting the ioctl interfaces to discover relationships between namespaces

2016-12-11 Thread Michael Kerrisk (man-pages)
quot;); exit(EXIT_FAILURE); } if (fstat(parent_fd, ) == -1) { perror("fstat-parentns"); exit(EXIT_FAILURE); } printf("Inode number of parent namespace is: %ld\n", (long) sb.st_ino); close(parent_fd); } exit(EXIT_SUCCESS); } -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/

RFC [v2]: documenting autogroup, group scheduling, and interactions with nice

2016-11-29 Thread Michael Kerrisk (man-pages)
ferent terminal windows, each of whose jobs are tied to different autogroups), modifying the nice value of the process in one of the sessions has no effect in terms of the scheduler's decisions relative to the process in the other session. -- Michael Kerrisk Lin

RFC [v2]: documenting autogroup, group scheduling, and interactions with nice

2016-11-29 Thread Michael Kerrisk (man-pages)
ferent terminal windows, each of whose jobs are tied to different autogroups), modifying the nice value of the process in one of the sessions has no effect in terms of the scheduler's decisions relative to the process in the other session. -- Michael Kerrisk Lin

Re: RFC: documentation of the autogroup feature [v2]

2016-11-29 Thread Michael Kerrisk (man-pages)
Hi Peter, On 29 November 2016 at 12:46, Peter Zijlstra <pet...@infradead.org> wrote: > On Tue, Nov 29, 2016 at 08:43:33AM +0100, Michael Kerrisk (man-pages) wrote: >> > >> > In any case, for the case of autogroup, the behaviour has always been, >

Re: RFC: documentation of the autogroup feature [v2]

2016-11-29 Thread Michael Kerrisk (man-pages)
Hi Peter, On 29 November 2016 at 12:46, Peter Zijlstra wrote: > On Tue, Nov 29, 2016 at 08:43:33AM +0100, Michael Kerrisk (man-pages) wrote: >> > >> > In any case, for the case of autogroup, the behaviour has always been, >> > autogroups came quite late. >> &g

Re: RFC: documentation of the autogroup feature

2016-11-29 Thread Michael Kerrisk (man-pages)
[Resending because of bounces from the lists. (Somehow my mailer messed up the MIME labeling)] Hi Mike, On 11/28/2016 02:46 AM, Mike Galbraith wrote: > On Sun, 2016-11-27 at 22:13 +0100, Michael Kerrisk (man-pages) wrote: > >> Here's my attempt to define the roo

Re: RFC: documentation of the autogroup feature

2016-11-29 Thread Michael Kerrisk (man-pages)
[Resending because of bounces from the lists. (Somehow my mailer messed up the MIME labeling)] Hi Mike, On 11/28/2016 02:46 AM, Mike Galbraith wrote: > On Sun, 2016-11-27 at 22:13 +0100, Michael Kerrisk (man-pages) wrote: > >> Here's my attempt to define the roo

Re: RFC: documentation of the autogroup feature [v2]

2016-11-28 Thread Michael Kerrisk (man-pages)
Hi Peter, On 11/25/2016 10:49 PM, Peter Zijlstra wrote: > On Fri, Nov 25, 2016 at 09:54:05PM +0100, Michael Kerrisk (man-pages) wrote: >> So, part of what I was struggling with was what you meant by cfs-cgroup. >> Do you mean the CFS bandwidth control features added in Linux 3.2?

Re: RFC: documentation of the autogroup feature [v2]

2016-11-28 Thread Michael Kerrisk (man-pages)
Hi Peter, On 11/25/2016 10:49 PM, Peter Zijlstra wrote: > On Fri, Nov 25, 2016 at 09:54:05PM +0100, Michael Kerrisk (man-pages) wrote: >> So, part of what I was struggling with was what you meant by cfs-cgroup. >> Do you mean the CFS bandwidth control features added in Linux 3.2?

Re: RFC: documentation of the autogroup feature

2016-11-27 Thread Michael Kerrisk (man-pages)
Hi Mike, On 11/23/2016 04:33 PM, Mike Galbraith wrote: > On Wed, 2016-11-23 at 14:54 +0100, Michael Kerrisk (man-pages) wrote: >> Hi Mike, [...] >> Actually, can you define for me what the root task group is, and >> why it exists? That may be worth some words in this m

Re: RFC: documentation of the autogroup feature

2016-11-27 Thread Michael Kerrisk (man-pages)
Hi Mike, On 11/23/2016 04:33 PM, Mike Galbraith wrote: > On Wed, 2016-11-23 at 14:54 +0100, Michael Kerrisk (man-pages) wrote: >> Hi Mike, [...] >> Actually, can you define for me what the root task group is, and >> why it exists? That may be worth some words in this m

<    2   3   4   5   6   7   8   9   10   11   >