all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Unprivileged /gnu/store with PRoot
Date: Thu, 08 Jun 2017 17:29:05 +0200	[thread overview]
Message-ID: <87tw3qebwe.fsf@elephly.net> (raw)
In-Reply-To: <87d1beoyvi.fsf@gnu.org>


Ludovic Courtès <ludovic.courtes@inria.fr> writes:

> One way to work around the problem is to use PRoot, a ptrace(2)-based
> tool to virtualize the file system².  With the ‘proot-static’ package I
> just pushed, one can run, say, hwloc, on such a hostile machine by
> sending locally-created packs as well as ‘proot’:
>
>   scp $(guix build proot-static)/bin/proot hostile:
>   scp $(guix pack hwloc -S /bin=bin) hostile:hwloc.tgz
>
> and then on the hostile machine:
>
>   mkdir ~/.local
>   cd ~/.local
>   tar xf ~/hwloc.tgz
>   cd
>   ./proot -b .local:/ /bin/lstopo
>
> where “proot -b .local:/” essentially “bind-mounts” ~/.local to /.
>
> Pretty cool no?  :-)

That *is* very cool indeed!

> PRoot adds overhead since it has to intercept every syscall.  However,
> for a mostly computational process, it should not be much of a problem.

Can this be simplified?  We really only need that user-space bind-mount
feature, nothing else.  PRoot does more than that IIUC.  Can we preload
a little library that provides “open” and implementations of other file
access procedures, and simply (I know…) changes any access of “/gnu”
with the new target directory?

I suspect this is doomed to fail because of the way shebangs work and
because we cannot interpose internal glibc calls, though.  Ultimately,
ptrace really is what we want on Linux and sadly it’s just slow.

More power to the Hurd on HPC!

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

  parent reply	other threads:[~2017-06-08 15:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 15:53 Unprivileged /gnu/store with PRoot Ludovic Courtès
2017-05-12 16:20 ` Alex Sassmannshausen
2017-05-12 21:28 ` Hartmut Goebel
2017-05-13  5:38 ` Unprivileged /gnu/store with PRoot - or relocate Pjotr Prins
2017-05-13 14:12   ` Ludovic Courtès
2017-05-13  7:04 ` Unprivileged /gnu/store with PRoot Maxim Cournoyer
2017-05-13 14:02   ` Ludovic Courtès
2017-06-08 15:29 ` Ricardo Wurmus [this message]
2017-06-09  8:09   ` Ludovic Courtès
2017-07-16 12:35 ` Pjotr Prins
2017-07-16 12:51   ` Pjotr Prins
2017-07-16 16:09     ` Pjotr Prins

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=87tw3qebwe.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    --cc=ludovic.courtes@inria.fr \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

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.