All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>, sonicadvance1@gmail.com
Cc: Kees Cook <keescook@chromium.org>,
	David Hildenbrand <david@redhat.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, kernel-dev@igalia.com, kernel@gpiccoli.net,
	oleg@redhat.com, yzaikin@google.com, mcgrof@kernel.org,
	akpm@linux-foundation.org, brauner@kernel.org,
	viro@zeniv.linux.org.uk, willy@infradead.org, dave@stgolabs.net,
	joshua@froggi.es
Subject: Re: [RFC PATCH 0/2] Introduce a way to expose the interpreted file with binfmt_misc
Date: Mon, 13 Nov 2023 16:17:11 -0300	[thread overview]
Message-ID: <eb176852-2912-1813-bcca-a7d1fe34f270@igalia.com> (raw)
In-Reply-To: <871qctwlpx.fsf@email.froward.int.ebiederm.org>

On 13/11/2023 15:29, Eric W. Biederman wrote:
> [...]
> Currently there is a mechanism in the kernel for changing
> /proc/self/exe.  Would that be reasonable to use in this case?
> 
> It came from the checkpoint/restart work, but given that it is already
> implemented it seems like the path of least resistance to get your
> binfmt_misc that wants to look like binfmt_elf to use that mechanism.
> 
> Eric
> 

Thanks Eric! I'm curious on how that would work: we'd change the symlink
of the emulator? So, the *emulated* software, when reading that, would
see the correct symlink?

Also, just to fully clarify: are you suggesting we hook the new
binfmt_misc flag proposed here to the internal kernel way of changing
the proc/self/exe symlink, or are you suggesting we use the prctl() tune
from the emulator, like the userspace changing its own symlink?

One of the biggest concerns I have with this kind of approach is that
changing the symlink actually...changes it - the binary mapping itself,
I mean.
Whereas my way was a "fake" change, just expose one thing for the
emulated app, but changes nothing else...

Cheers,


Guilherme

      parent reply	other threads:[~2023-11-13 19:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 20:24 [RFC PATCH 0/2] Introduce a way to expose the interpreted file with binfmt_misc Guilherme G. Piccoli
2023-09-07 20:24 ` [RFC PATCH 1/2] binfmt_misc, fork, proc: Introduce flag to expose the interpreted binary in procfs Guilherme G. Piccoli
2023-10-10  4:31   ` kernel test robot
2023-09-07 20:24 ` [RFC PATCH 2/2] fork, procfs: Introduce /proc/self/interpreter symlink Guilherme G. Piccoli
2023-10-10  5:38   ` kernel test robot
2023-10-06  7:51 ` [RFC PATCH 0/2] Introduce a way to expose the interpreted file with binfmt_misc Guilherme G. Piccoli
2023-10-06 12:07 ` David Hildenbrand
2023-10-09 17:37   ` Kees Cook
2023-10-11 23:53     ` Ryan Houdek
2023-11-13 17:33     ` Guilherme G. Piccoli
2023-11-13 18:29       ` Eric W. Biederman
2023-11-13 19:16         ` David Hildenbrand
2023-11-14 16:11           ` Eric W. Biederman
2023-11-14 16:14             ` David Hildenbrand
2023-11-13 19:17         ` Guilherme G. Piccoli [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=eb176852-2912-1813-bcca-a7d1fe34f270@igalia.com \
    --to=gpiccoli@igalia.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=dave@stgolabs.net \
    --cc=david@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=joshua@froggi.es \
    --cc=keescook@chromium.org \
    --cc=kernel-dev@igalia.com \
    --cc=kernel@gpiccoli.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=oleg@redhat.com \
    --cc=sonicadvance1@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    --cc=yzaikin@google.com \
    /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 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.