From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF0BB2E7F38 for ; Thu, 9 Jul 2026 04:07:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783570080; cv=none; b=Ea03eZKs5U2AxCO1h12j+fFRkuNJE21GUtsgbNHwq+7vhNPMnGaGBQCsvkUOnSzzeCwqLbNzXA31To+4OAxw9jfnz3gaRoXfHnRCYp5YjbgZXo1Zv8zO9pQcpBu7RFWm5zNgR0aGLky1uMdyK/qtj32YJQoI/MoUKhqTieTcVTE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783570080; c=relaxed/simple; bh=Crtfz5KV1Al7PMtvIhrkTgnEZORSLTlbXnKkW2fA9FY=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=gc93/cWTiYYqx2OQpehG5EDcpXDvLO+5UkBLSLnK8vooySHUHXQ/4cXyMx4q2ruRpb3AsoAX2XgyaOJPOiss1OhtOpbezx47bRoFvFiNVvNPa2G10R2rvyO4FPIY76BhAyFb7L2yizohgnbvhHLuDfQxXXRbIVjXvfNQdWh7/Zo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=oy0Ly8sn; arc=none smtp.client-ip=209.85.215.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oy0Ly8sn" Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-c9e607d81fcso831072a12.2 for ; Wed, 08 Jul 2026 21:07:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783570078; x=1784174878; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=HyZ+lDUPV2qqTCzi6+PUCRvlBqToBMfsYAo+J6mLUsA=; b=oy0Ly8sndgAs8L5ihF4YwVqkhMvfxEWnBxhWZAgJHduZnywoeMJos6nSs9oNKk/aOK GgC99jD2Jb0JM8t78/qL7pwBxNjPoqUVIm6zit75VdB34UVVFTnJbNX4Iz2Aq72emlp7 6citr+t1WHpxJe0HHN1dyVrZdMHAC6MO1/8X3FGi16vJ4xF3JZeqxbAbeWjxTI+lwyHg M0ucKnP1OC9FCimv+6Mhz2u2jgz91m6D1Kg45XFamw+jNlaPx2SBkQ2cDcOvYePlWYyJ BJE159/DjZj0hi3vrPKrrw4t6aAwya++YGirFayUyS8OhxpgOy9+qme8QfIFa8EF659Y 3TkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783570078; x=1784174878; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=HyZ+lDUPV2qqTCzi6+PUCRvlBqToBMfsYAo+J6mLUsA=; b=B9OhEtdrfswsMBP1QXn7lzudvvx78//cRacuPW8v49D32srzQkRvKcMcfwDu8Ft/Y9 8i+jgKy3gcc1tXFMdZ1tdFtrOyiWxyyr7VfJ8F3Uer7dhLKvOn7HZzbBRNBR1wCL8bzl 97uYsqg3oGZCEeR3F8rKZy7fx6MfuQmslRf0cyN51axw592WNElKDCa+2q66WTYjXXfG kD9Eb8ft2x3b+p7XKQH/npLebovrL3q9I5+VMyTDXUdKDUN9lDa+9RRNw14YgLPPBzgi vxQxeF3rOeuhUCCvo8CbXxZkxqXddLM7uN4eIzb1BX3EpySlHBfKa8+9cQsyBJfS48ME TlbA== X-Forwarded-Encrypted: i=1; AHgh+Ro2WCnica1XRAGsBBw8QIxWjrCeuhQiQlI5rw4jK+NCLCeVQ4DMqSBICC3yZDmazBrF2a6bEZVCyAlj9R8=@vger.kernel.org X-Gm-Message-State: AOJu0YynMbna6yiQYLlX+YIRBKIazrIakcwBIur5582Me9GHWSdd2qeG EpKXInDue8G8zh2M7qmWehwbK0hlRB8cpeguMc6llPlMjVP2qsIqz3ww X-Gm-Gg: AfdE7cl8bdpZYf7aMoKmrsx6ijtvUjJGoLrukSjebDuyVJ4spp5Ek0Ka94kaTmBslco +I9S9llAtgbJd0NJpDSgnkm7+U2yt6hlb8sQEwzE0EpHCBwDc2u/caFZNRx6ss/6dVNubke2VRQ 4FOIvaoiIxEO6sPy4U/cs00A8MGqUsFeN94+5GKZnp+3GFkl/r4uQ37MHUqCbSwTJF0m5d805+L ibI23YR+lbQJSuYom+O0l+faaNUn9g8GPsm60Z65DSTybvApnVaUsI25dtQOb2zPTifE5moWP3N qfjfo1rO0cqjNucu7mhsCfXAn5HzBYbi2KAXUM7SLZIZgVKyfjwRIBXM4Fwz1bQzhWjNCOhVQO1 z79AHdtZ1UJHg+sohHSpqFdCzQao2PANhfwezxc+sq7tV8rID3U7eTaapTIaRpX85z6cgjjK1a2 DJJCCrSkpTRRj9sw== X-Received: by 2002:a05:6a21:690:b0:3b3:fc6:622d with SMTP id adf61e73a8af0-3c0bcb7e418mr5738391637.38.1783570077959; Wed, 08 Jul 2026 21:07:57 -0700 (PDT) Received: from localhost ([98.35.8.117]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13b65960d88sm22118188c88.6.2026.07.08.21.07.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jul 2026 21:07:57 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 08 Jul 2026 21:07:55 -0700 Message-Id: Cc: "Farid Zakaria" , , , , , , , , , , , , "Gemini" Subject: Re: [RFC PATCH] fs: binfmt_misc: introduce eBPF-based matching and interpreter selection From: "Farid Zakaria" To: "Christian Brauner" X-Mailer: aerc 0.21.0 References: <20260704-kochkunst-hauswand-blass-7226e9443a9f@brauner> <20260704211409.1978485-1-farid.m.zakaria@gmail.com> <20260706-uhren-raubbau-sinnkrise-e40a8337414b@brauner> <20260707-campieren-fingen-himbeeren-e4b682bd8e63@brauner> <20260707-wortreich-kanal-zensor-9386ef4f38f7@brauner> <20260708-welken-dystopie-ertrugen-56a3b5f7ab66@brauner> <20260708-kordel-laben-kopfhaar-1c0dd234aae5@brauner> In-Reply-To: <20260708-kordel-laben-kopfhaar-1c0dd234aae5@brauner> On Wed Jul 8, 2026 at 9:47 AM PDT, Christian Brauner wrote: > On 2026-07-08 11:14 +0200, Christian Brauner wrote: >> On 2026-07-07 15:44 -0700, Farid Zakaria wrote: >> > On Tue Jul 7, 2026 at 12:45 PM PDT, Christian Brauner wrote: >> > > On 2026-07-07 13:34 +0200, Christian Brauner wrote: >> > >> On 2026-07-06 09:47:53-07:00, Farid Zakaria wrote: >> > >> > On Mon, Jul 6, 2026 at 9:01=E2=80=AFAM Christian Brauner wrote: >> > >> >=20 >> > >> > > Ignoring the blatant bpf abuse here I think this is quite worka= ble. So >> > >> > > this can be turned into an actual design and patch imho... >> > >> >=20 >> > >> > Glad to see you think this proposal is in the right direction. >> > >> > Just for my edification, when you say "balatant bpf abuse", you m= ean >> > >> > how it abuses the socket bpf type? >> > >> > If so, do you have any guidance on a new type or should I just ta= ke a >> > >> > stab at it. >> > > >> > > I drafted a POC for you that should be closer to how this should loo= k >> > > like with the bpf people in Cc. I'll let you lead from now on. I jus= t >> > > wanted to help you out and illustrate a more viable direction. Might= be >> > > that the bpf people want it done differentely. Let's see. >> >=20 >> > Cool. I just saw the POC. >> > (I'm trying out aerc to view the patch series. I will also try b4, I'v= e >> > never set it up before) >> > I will rework my qemu demo to use the struct_ops and go through my own >> > testing to see it work. >> >=20 >> > That looks very similar to what I was researching with an LLM. I was >> > just going over the idea of struct_ops bpf (a new concept to me) and >> > using traditional bpftool load, a new bpf program type and kfuncs. >> >=20 >> > You put out a surprising amount of polished code -- thank you. >>=20 >> I would not call this polished and it also lacks any tests... I've not >> given the locking much thought and maybe there's easy wins on the table >> I haven't been considering. >>=20 >> > I would have had to lean on an LLM (heavily) and from the patches I've >> > put up so far they still have quite the gap to cover in terms of polis= h. >>=20 >> This isn't my first bpf ride in both kernel and userspace. >>=20 >> > What does "take it from here" mean in practicality? >>=20 >> Bring it over the finish line so I can merge it into my tree. :) >> If the bpf people have no comments or worries than we're done. If they >> want changes I'd appreciate if you could make them and slap you >> Co-developed-by onto the whole thing as necessary. >>=20 >> Also, please ensure that this works for all the cases you're >> considering. > > I have another cleanup series for binfmt_misc btw. That code is quite > old. There might be a few additional series coming out of this work that > we base the bpf bits on. Sounds good. I just saw the patch series. My plan at the least by the weekend is to: * apply your binfmt_misc cleanup series * I will try b4 with aerc. Here is my config if anyone wants to crib it = [1]. * apply your POC series for the bpf to validate * make any changes if necessary or just add selftests if it works as is [1]: https://github.com/fzakaria/nix-home/blob/aaee67c3a6d035d06a62cb753926= 57563de58f4a/users/fmzakari/aerc.nix=20