From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B820E81DE9 for ; Fri, 6 Oct 2023 12:07:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9A7006B02D0; Fri, 6 Oct 2023 08:07:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 957A86B02D1; Fri, 6 Oct 2023 08:07:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F8426B02D2; Fri, 6 Oct 2023 08:07:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 6DAD76B02D0 for ; Fri, 6 Oct 2023 08:07:34 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3151AC05A7 for ; Fri, 6 Oct 2023 12:07:34 +0000 (UTC) X-FDA: 81314912028.12.BEFD0AE Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf08.hostedemail.com (Postfix) with ESMTP id BA7BC16002B for ; Fri, 6 Oct 2023 12:07:31 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="U/7YIGI5"; spf=pass (imf08.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696594051; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mo9zpx89HxvD+wCjQVsipj/wDUSBSLOEMGb8AiuZqs8=; b=VSFfxaW0ft1ykWYatpTyUHieVaZB7yvbJYydFOssMv39gRLKtyNNbN6JdtphjXqRxNGtfH NH37LSNoz7uXjg3itr9C/nwdqfSP41in8cqK+luAFy5uI/egrfxA3GAcu4vyeitjY3MZ5L PfVpHDQgAAwQqVK9ye6VySKjkOd0Img= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696594051; a=rsa-sha256; cv=none; b=fjqOQBloWeTe1HZ8+9Cvi1KWTkyzy4mg1Tb1FJdfK3zG8Xt0zwqT6QaTSCValdSbuD/b0h zcE9Asijvqb26ZVc3WM8ySxTGxZfyKSYpVYGab5n7G9VeI39lzxdlXsOdeBokvWTp0Y0k2 79txjUfxbx98DpQig8tiME5N68wzKq8= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="U/7YIGI5"; spf=pass (imf08.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696594051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mo9zpx89HxvD+wCjQVsipj/wDUSBSLOEMGb8AiuZqs8=; b=U/7YIGI5cauXYWhUjntXLoF8JMosNBmQ1oTEILQn6vD34/9uzxIVez6y7MeV2xTkMIW5Df VCGbyjLtxtCh0YGBssS8OZRvgV7G7hiE6cOpZjpoWak9SwkiOOzmZXKdl8oMCYXOkhlz17 X4ZAWCnVFmtWJ08hR4UQEJqaCNsOgOA= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-468-1j_6Hq0xNS6CbN6YC1VJLg-1; Fri, 06 Oct 2023 08:07:20 -0400 X-MC-Unique: 1j_6Hq0xNS6CbN6YC1VJLg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-40570ccc497so15097365e9.3 for ; Fri, 06 Oct 2023 05:07:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696594039; x=1697198839; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mo9zpx89HxvD+wCjQVsipj/wDUSBSLOEMGb8AiuZqs8=; b=Q8zaAMmIYHFpnGthy8eMLWWnbjVd2WngrQcx8aXtdPqQs+qoSlL8EuC1FyYu97N9yS SwVkX+a0fh3TUw6DsUCW3VKNpVlUp5d8YmnaKm5vul8DKihlLglsHjy2j3arwI6KhRSE 8JW69CA+RBte+DirVdm5rO4AMR+MLNNCuXEDW1/6wiDldxOQcoJZLRX1nv/DYya+gagF 3zgoKqbxKxtTlpTKXGQWVTWcAWu8FWn/7j0aH9pKwRMwcxCJ6SVIqFZx3MOsJJlXaqPC kluFFm89RG2vdFx2Co5Rr2RwQzIs/oUIS4AIwT6obgzAxJjIPKfyIGg09VLqriMU0FXb 5Pfg== X-Gm-Message-State: AOJu0YyMvOMMHQS7k/L816rlDbItxh0NoV4a6wFgS6c27DI8Epxwo3Jz GjiSZAI3neJSZZcfGOKEYPOgg7fcPbYM1pyyWj0IOsoarcUyp5tGYT5lW+BKOrUlrD9i6ppl41a OPHIWoziCfLE= X-Received: by 2002:a5d:60d1:0:b0:321:7052:6406 with SMTP id x17-20020a5d60d1000000b0032170526406mr7192669wrt.12.1696594038578; Fri, 06 Oct 2023 05:07:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpduvGP/C6QnolRK8aHspaHKLXehNdqORMvSI32y4q5yebiSCRs3O9GH2N+lutkWDhTkxXzA== X-Received: by 2002:a5d:60d1:0:b0:321:7052:6406 with SMTP id x17-20020a5d60d1000000b0032170526406mr7192641wrt.12.1696594038066; Fri, 06 Oct 2023 05:07:18 -0700 (PDT) Received: from ?IPV6:2003:cb:c715:ee00:4e24:cf8e:3de0:8819? (p200300cbc715ee004e24cf8e3de08819.dip0.t-ipconnect.de. [2003:cb:c715:ee00:4e24:cf8e:3de0:8819]) by smtp.gmail.com with ESMTPSA id j14-20020adff54e000000b003233a31a467sm1516389wrp.34.2023.10.06.05.07.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Oct 2023 05:07:17 -0700 (PDT) Message-ID: Date: Fri, 6 Oct 2023 14:07:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [RFC PATCH 0/2] Introduce a way to expose the interpreted file with binfmt_misc To: "Guilherme G. Piccoli" , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org, kernel-dev@igalia.com, kernel@gpiccoli.net, keescook@chromium.org, ebiederm@xmission.com, 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, sonicadvance1@gmail.com, joshua@froggi.es References: <20230907204256.3700336-1-gpiccoli@igalia.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230907204256.3700336-1-gpiccoli@igalia.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: BA7BC16002B X-Rspam-User: X-Rsp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 8HycDCwff1kK+bl6T632DP8MyEpryjGzGNnH39JKJaxW1sDuhW1MJSId4SkjVSJtN6Dgf7qiR26W0CZI9RbV6JcjYVZ2UmfUbshhBLsYuJovCKWF8IH0PebyXRF9GEBVUct4Ve6gxDzZk65gGKZ5VDVGgV0r7QJG+i4gZCBbaR6RzWKB3Yz57xkkpIyZKUDVmHBaGPsxRFVGJIKIY93qY1MYxItxeTiX04WqagUez7Wg26B0dTnQiChTaAYmf/lw/Bz+oG3jZ2tVq5Y1rGVzrwB3qNCUW30/2jYkodVtwLlh7E93/YC4FKZZBNcip1aRUR27sGF4CuhsRxMOAtwph3EgTlqxqvCKMHkVE/hCp6Q//wFI/bZaS1gfZunk79rsP5GNqF8jwGP4jrYMLHiGanVDb8sfUgvlEXa1/WA/K//4VGo6Dxi8UL8uy7QIqgkKu95wr+Kxb1Q3Itxw5G7XY9nr4Pqu/EaD56SvcJLBlKCXlnMl/6XNIhJi7pQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000465, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 07.09.23 22:24, Guilherme G. Piccoli wrote: > Currently the kernel provides a symlink to the executable binary, in the > form of procfs file exe_file (/proc/self/exe_file for example). But what > happens in interpreted scenarios (like binfmt_misc) is that such link > always points to the *interpreter*. For cases of Linux binary emulators, > like FEX [0] for example, it's then necessary to somehow mask that and > emulate the true binary path. I'm absolutely no expert on that, but I'm wondering if, instead of modifying exe_file and adding an interpreter file, you'd want to leave exe_file alone and instead provide an easier way to obtain the interpreted file. Can you maybe describe why modifying exe_file is desired (about which consumers are we worrying? ) and what exactly FEX does to handle that (how does it mask that?). So a bit more background on the challenges without this change would be appreciated. -- Cheers, David / dhildenb