[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb176852-2912-1813-bcca-a7d1fe34f270@igalia.com>
Date: Mon, 13 Nov 2023 16:17:11 -0300
From: "Guilherme G. Piccoli" <gpiccoli@...lia.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>,
sonicadvance1@...il.com
Cc: Kees Cook <keescook@...omium.org>,
David Hildenbrand <david@...hat.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, kernel-dev@...lia.com, kernel@...ccoli.net,
oleg@...hat.com, yzaikin@...gle.com, mcgrof@...nel.org,
akpm@...ux-foundation.org, brauner@...nel.org,
viro@...iv.linux.org.uk, willy@...radead.org, dave@...olabs.net,
joshua@...ggi.es
Subject: Re: [RFC PATCH 0/2] Introduce a way to expose the interpreted file
with binfmt_misc
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
Powered by blists - more mailing lists