[PATCH v2 0/7] [PIDNS] Final
Dmitry V. Levin
ldv at altlinux.org
Thu Jul 23 21:43:36 UTC 2020
On Thu, Jul 23, 2020 at 10:40:48PM +0200, Ákos Uzonyi wrote:
> On Wed, 22 Jul 2020 at 21:23, Dmitry V. Levin <ldv at altlinux.org> wrote:
> > On Tue, Jul 21, 2020 at 11:19:18PM +0200, Ákos Uzonyi wrote:
> > > From: Uzonyi Ákos <uzonyi.akos at gmail.com>
> > >
> > > I made the requested changes to my prevoius series.
> > >
> > > I ran a travis build , it seems to be fine, but on x86 all the pidns tests
> > > are failing. According to the error message, ioctl(NS_GET_PARENT) errors
> > > with ENOTTY. I have no idea why it happens, on my x86 system all tests pass.
> > > If you know the reason of it, please tell me.
> > >
> > >  https://travis-ci.org/github/AkosUzonyi/strace/builds/710483396
> > Although this looks odd, it must be something to do with the kernel.
> > Old kernels do not have to support NS_GET_PARENT at all.
> Apparently the kernel versions of the two failing builds are 4.4.0 and
> 5.3.0. The latter should support NS_GET_PARENT, as it was added in
> 4.9. Is it possible that a 5.3.0 kernel does not support
> NS_GET_PARENT, or could it be just some travis bug? I'm asking because
> I'm not sure if I should skip pidns tests by
> "require_min_kernel_version_or_skip", or by testing at runtime whether
> ioctl(NS_GET_PARENT) fails with ENOTTY.
Looks like these nsfs ioctls are not enabled for compat processes.
If I'm reading linux/fs/ioctl.c correctly, .compat_ioctl method must be
defined in linux/fs/nsfs.c:ns_file_operations for this to work.
More information about the Strace-devel