Re: [PATCH] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-24 Thread Christian Brauner
On Sun, Jun 23, 2019 at 02:32:30PM +0300, Dmitry V. Levin wrote: > On Sat, Jun 22, 2019 at 12:13:39AM +0200, Christian Brauner wrote: > [...] > > Out of curiosity: what makes the new flag different than say > > CLONE_NEWCGROUP or any new clone flag that got introduced? > > CLONE_NEWCGROUP too

Re: [PATCH] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-23 Thread Dmitry V. Levin
On Sat, Jun 22, 2019 at 12:13:39AM +0200, Christian Brauner wrote: [...] > Out of curiosity: what makes the new flag different than say > CLONE_NEWCGROUP or any new clone flag that got introduced? > CLONE_NEWCGROUP too would not be detectable apart from the method I gave > you above; same for

Re: [PATCH] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-21 Thread Christian Brauner
On Fri, Jun 21, 2019 at 08:06:14PM +0300, Dmitry V. Levin wrote: > On Thu, Jun 20, 2019 at 01:10:37PM +0200, Christian Brauner wrote: > > On Thu, Jun 20, 2019 at 02:00:37PM +0300, Dmitry V. Levin wrote: > > > Cc'ed more people as the issue is not just with the example but > > > with the interface

Re: [PATCH] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-21 Thread Dmitry V. Levin
On Thu, Jun 20, 2019 at 01:10:37PM +0200, Christian Brauner wrote: > On Thu, Jun 20, 2019 at 02:00:37PM +0300, Dmitry V. Levin wrote: > > Cc'ed more people as the issue is not just with the example but > > with the interface itself. > > > > On Thu, Jun 20, 2019 at 12:31:06PM +0200, Christian

Re: [PATCH] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-20 Thread Christian Brauner
On Thu, Jun 20, 2019 at 02:00:37PM +0300, Dmitry V. Levin wrote: > Cc'ed more people as the issue is not just with the example but > with the interface itself. > > On Thu, Jun 20, 2019 at 12:31:06PM +0200, Christian Brauner wrote: > > On Thu, Jun 20, 2019 at 06:11:44AM +0300, Dmitry V. Levin

Re: [PATCH] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-20 Thread Dmitry V. Levin
Cc'ed more people as the issue is not just with the example but with the interface itself. On Thu, Jun 20, 2019 at 12:31:06PM +0200, Christian Brauner wrote: > On Thu, Jun 20, 2019 at 06:11:44AM +0300, Dmitry V. Levin wrote: > > Initialize pidfd to an invalid descriptor, to fail gracefully on > >

Re: [PATCH] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-20 Thread Christian Brauner
On Thu, Jun 20, 2019 at 06:11:44AM +0300, Dmitry V. Levin wrote: > Initialize pidfd to an invalid descriptor, to fail gracefully on > those kernels that do not implement CLONE_PIDFD and leave pidfd > unchanged. > > Signed-off-by: Dmitry V. Levin > --- > samples/pidfd/pidfd-metadata.c | 8

[PATCH] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-19 Thread Dmitry V. Levin
Initialize pidfd to an invalid descriptor, to fail gracefully on those kernels that do not implement CLONE_PIDFD and leave pidfd unchanged. Signed-off-by: Dmitry V. Levin --- samples/pidfd/pidfd-metadata.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git