public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: IGT development <igt-dev@lists.freedesktop.org>,
	Emil Velikov <emil.velikov@collabora.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] lib/core_auth: mount namespace magic to make the test work everywhere
Date: Thu, 14 Feb 2019 16:32:16 +0100	[thread overview]
Message-ID: <20190214153216.GF2665@phenom.ffwll.local> (raw)
In-Reply-To: <155014718255.14276.18353975601759997811@skylake-alporthouse-com>

On Thu, Feb 14, 2019 at 12:26:22PM +0000, Chris Wilson wrote:
> Quoting Daniel Vetter (2019-02-13 18:33:09)
> > +       /* create a card node matching master which (only) we can access as
> > +        * non-root */
> > +       do_or_die(fstat(master, &statbuf));
> > +       do_or_die(unshare(CLONE_NEWNS));
> > +       igt_system("mount --make-rprivate /");
> > +       igt_system("mount -t tmpfs none /dev/dri");
> 
> man mount(2)? I'm optimistic that translates to MS_PRIVATE.
> 
> Changing the propagation type of an existing mount
> 
>        If mountflags includes one of MS_SHARED, MS_PRIVATE, MS_SLAVE, or
>        MS_UNBINDABLE (all available since Linux 2.6.15), then the
>        propagation type of an existing mount is changed.  If more than one
>        of these flags is specified, an error results.
> 
>        The only flags that can be used with changing the propagation type
>        are MS_REC and MS_SILENT.
> 
> Seems like it should be just that :)

Yeah I unlazied and changed my cmdline hackery to proper syscalls in v2.
Took me a while to figure out that cmdline unshare does additional stuff
when you want a new namespace. And mount(2) is not the most intuitive
thing ever, but luckily mouting tmpfs is easy.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      reply	other threads:[~2019-02-14 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13 18:33 [igt-dev] [PATCH i-g-t] lib/core_auth: mount namespace magic to make the test work everywhere Daniel Vetter
2019-02-13 20:36 ` Daniel Vetter
2019-02-14 13:52   ` Emil Velikov via igt-dev
2019-02-15  9:51   ` Chris Wilson
2019-02-15 10:16     ` Daniel Vetter
2019-02-14  9:35 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/core_auth: mount namespace magic to make the test work everywhere (rev2) Patchwork
2019-02-14 12:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-14 12:26 ` [igt-dev] [PATCH i-g-t] lib/core_auth: mount namespace magic to make the test work everywhere Chris Wilson
2019-02-14 15:32   ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190214153216.GF2665@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=emil.velikov@collabora.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox