public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Tyson Whitehead <twhitehead@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Tyson Whitehead via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: Running via <ld.so> gives a different executable
Date: Fri, 26 Feb 2021 16:08:05 -0500	[thread overview]
Message-ID: <CAJbx2R6P8CCROZvpBK1m3J2TppQK7UpW8gVEH7S2quYMHD=TRg@mail.gmail.com> (raw)
In-Reply-To: <878s7ar5tj.fsf@igel.home>

From the prctrl man page, it sounded like

prctl(PR_SET_MM_EXE_FILE, ...)

would let you do this once for Linux 3.5-4.9 and multiple times for 4.10+.
Am I correct in understanding you are saying that the system execve call
uses this one-time opportunity?

Thanks!  -Tyson

On Fri, 26 Feb 2021 at 14:23, Andreas Schwab <schwab@linux-m68k.org> wrote:

> This cannot be fixed in user-space.  The kernel always uses the first
> argument of the execve syscall as the exe link, and it cannot be changed
> afterwards.
>
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
> "And now for something completely different."
>

  reply	other threads:[~2021-02-26 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 18:21 Tyson Whitehead
2021-02-26 19:23 ` Andreas Schwab
2021-02-26 21:08   ` Tyson Whitehead [this message]
2021-02-26 21:23     ` Andreas Schwab
2021-02-26 21:53       ` Tyson Whitehead

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='CAJbx2R6P8CCROZvpBK1m3J2TppQK7UpW8gVEH7S2quYMHD=TRg@mail.gmail.com' \
    --to=twhitehead@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).