From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by sourceware.org (Postfix) with ESMTPS id D596D385802A for ; Fri, 26 Feb 2021 21:08:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D596D385802A Received: by mail-yb1-xb2a.google.com with SMTP id f4so10231348ybk.11 for ; Fri, 26 Feb 2021 13:08:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0pFrhzCFtXjLxyPDSBfro4G7VnJH9Tst9GfPbwaNtpY=; b=VJA3rLRrbuFzvFqT+ZvoBamX0waev3DV5RuoZrwHIQPp1nFiZ+Wr9LHmGBIpJLOTfV DTsQhVOQYsb57nXekMUW0dVGy50NSWnqkutAcmliXVImmZvlJAmYSBT9zOufH2sfX26d d1NQQo4LgG0k6EJ2a0hDtiE0ERvdG5CAHLItS4ZEj0f98HA0yymTK+D0pNS6etM38iIm rXCuGnD3e4WqBIjbqsO2CN3ZDpgqJJAT2zAxle2w1SiwqSTF71b7NSEthUpy2NbSqUAS 93Sbx23f+hsThAwFo9fAgos2dAz+7ImL0kmb4W1e4IuIfovL++QuLzBXnFJZyLxXb74V WCIQ== X-Gm-Message-State: AOAM532jIJsypr6Ox32Qe9eS0aCZTJnw8ljA7jsk3kR/f5QETxOn2xrQ 786ZXNFMhrAfrA1gHRgCw/RuQA/3xRk1qzGMPMULUSZDhFil+w== X-Google-Smtp-Source: ABdhPJwPJR/IRalE+by251ywgxrxnX6VCP/B70wkRCUFnrUZOclzX0cDghWjHAKzv84LJt2orjEYwlo8Z8WOXdxLDzE= X-Received: by 2002:a25:2ac3:: with SMTP id q186mr7540474ybq.213.1614373696490; Fri, 26 Feb 2021 13:08:16 -0800 (PST) MIME-Version: 1.0 References: <89538393-2014-85c6-2350-9f02847318a4@gmail.com> <878s7ar5tj.fsf@igel.home> In-Reply-To: <878s7ar5tj.fsf@igel.home> From: Tyson Whitehead Date: Fri, 26 Feb 2021 16:08:05 -0500 Message-ID: Subject: Re: Running via gives a different executable To: Andreas Schwab Cc: Tyson Whitehead via Libc-alpha X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 21:08:27 -0000 >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 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." >