From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796089768; b=APbeImPkX0VrJ0rbBnDCMR4vzK9VcLEQGF9uJHHh2pbMkhchAEyp+9nCLtRkU/lZMK6l blVhvapNDpKD//YJyJ0teb6Jqz1Hgk5H4Xwchq/ISCNbR9tuZTNAuFQRQbtChktJDWoNQ yZEsUgJSh6rhD/28ecKgrfn1j6aGoxlrPzjsGA1ubq/ZidiW9qNF0eHkiOTlqFMy3CctU 1CRHQ1b9+9u0In8CQHg0QeP270KwUD0WoDC091VdhgRow+KttlUd+YM5fw9mgu9g43/7O XHOGSGvuhf3SgioHB8OKHO5hpJBrmGcBSty5BChJXeUh51WV4eHJmPkNGsAYiC+/FQg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796089768; h=Received:DKIM-Signature:Received:Received:X-ME-Sender: X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID:Received:X-Mailer: MIME-Version:X-ThreadId:Date:From:To:Cc:Message-Id:In-Reply-To: References:Subject:Content-Type:Content-Transfer-Encoding; bh=OSxMnabbHLFQ3Bz/KsSDTmdFUxVL4lG8ObU8rPyzwho=; b=mzOUls8TMA6OF014VMjqEv80FnBqbOaGYZ0lYS16kOM6qtSPAQKrAeUC2lwkEHSmM3Ye OaxAsBcw8CiE5tZBv3um+7mf4vxhMn6+Pbl3mm4Rxrj55uPBMPC3O1PqdvK1HYAiSXWfe 4i6OiBEtzOVK6XxKFO2S0F7IPyuUlSyWYj9dQqCubTeybd3xM6lF6pFHLJ2Q92Q89Jg69 O9euZtUD0Ig+wj5yarxCJ62enlr00hIZF3+i5a6zpUyOjyONClFHtGPzA/eb9oRnz196U ACaFWtc0PRAR74OkbpndTPuO6VIj8a8VtCNYaIpH4YVc1lWjwGXYvDQ1WUQ/NF3k1ig== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mZx+Pge+; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6A7D606A31A for ; Tue, 1 Dec 2026 01:49:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mZx+Pge+ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 250531F00898 for ; Tue, 1 Dec 2026 01:49:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796089768; bh=OSxMnabbHLFQ3Bz/KsSDTmdFUxVL4lG8ObU8rPyzwho=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=mZx+Pge+KoUPDKV2w6aNI9zXtGx1BZw1Bm4Ple/2YOriG5/OxK4bOqPpJPX6u4igl HTHkmdC3CD8IWUCnHtRxEOr1K22Jvpjvf+yK+riEiIZpGI05YfWDT2TOXgWiZp+2N4 IMJ3lEqhHbFnzPfnnTXAXz3yTrgKJ/Vc8frcBsWvolQ+SuORVKji5PlOrrW2wnbEvK lU8LnSIzKS64yrkhxkV3SbI3Hm9DZo/pGgQXbNhGT8s/TjqOto/RVL7tbH0w94Ge9w 60+lBbMCiYlf3QUvDdO1lFv/5oMJzbyuwmZPjiNKCZCOFh3RaODn17dG+MEe9q8RYM qR6lwaCDbz/KQ== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 341C7F40066; Mon, 30 Nov 2026 20:49:27 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Mon, 30 Nov 2026 20:49:27 -0500 X-ME-Sender: X-ME-Proxy-Cause: dmFkZTFFCW8/2ggklujMArOfeg9o/e93i/r1rk3cYgQExTxKJJcjSQOdmibF/aSjwzvPt2 VHzBocnnW/uNQBfaeqLQCAz4Y4v9CcU7F4QekfmiKxdpS9C1czpeAS7cfXbSIucLZ+9HIq GMOQk4nG2KEiLXjyuce5Ziw1gwtKSyMfM8yLyWhDYA3DJaCtotLtMafnpn72I0MVIl8GZZ MLi0NOFaEy81ddpt60LgPKrvmTJTiOl2fphSFMTQ5396wq1I7Irjn1jclt6YZz75LnjBPf ADJNjfQM9vLLx6IE7kTUcXOhuXMgCUnQY8LrjmPVJWQTAbt7HklvMUAiDypGAx/j1jJtnu ENtLKCAQCijRHocBxpxq58SIMd1Z8XUefxgjRsciGP8Mrj2YFAQNELtYu4GjbP5PRXlWDK cFnhhLpCF4oR4eW+GkQT3XuEAa4ZHrMs8xesU/c0RchrkrtJXfhdcGE4j0OlRWdD1emwlm VIB3fe71GCWl+sGBySs+0iaj5jjFZqNHQsMiFgfi/oUyjN1lif/jYCerjEtUAlWSTKPop8 Rd0dcY/0E88wW/LURddbHNOsarN0d3jBe7XB7UTlayDGQrSgIzFHbSEypfRnsbRn2NyjYe 2ltlEbURCl4WC3G31+DGJW8HVbJ49xLku+DSWwcJw83/MNY8D/Y6lepMrXeg X-ME-Proxy: Feedback-ID: ieff94742:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 09028700065; Mon, 30 Nov 2026 20:49:27 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-ThreadId: AisSLPdYCdlo Date: Mon, 30 Nov 2026 17:49:06 -0800 From: "Andy Lutomirski" To: "Alexei Starovoitov" , "Kumar Kartikeya Dwivedi" , bpf@vger.kernel.org Cc: "Puranjay Mohan" , "Andrii Nakryiko" , "Daniel Borkmann" , "Eduard Zingerman" , "Emil Tsalapatis" , "Ihor Solodrai" , "Dave Hansen" , "Peter Zijlstra (Intel)" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , kkd@meta.com, kernel-team@meta.com, "the arch/x86 maintainers" , "Linux Kernel Mailing List" Message-Id: <1ba7d551-32e1-4020-b898-502cd9ab8fb7@app.fastmail.com> In-Reply-To: References: <20261009024925.3169077-1-memxor@gmail.com> <20261009024925.3169077-2-memxor@gmail.com> <5f46d1c1-fdce-4f3b-9d56-675a822b2d65@app.fastmail.com> <03275761-8de2-41be-92fd-8e3012a87eeb@app.fastmail.com> Subject: Re: [PATCH bpf-next v1 1/3] x86/mm: Resolve BPF exception fixups for user address faults under SMAP Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, Nov 27, 2026, at 5:55 PM, Alexei Starovoitov wrote: > On Sat Nov 28, 2026 at 1:48 AM UTC, Kumar Kartikeya Dwivedi wrote: >> On Fri Nov 27, 2026 at 1:18 AM CET, Alexei Starovoitov wrote: >>> On Thu, Nov 26, 2026 at 09:30 AM Andy Lutomirski wrote: >>>> Okay. So maybe there should be a nice patch set to *fix* it. >>> >>> [[...] >>> >>> The main point that it's orgonal to this patchset. >>> >> >> I was wondering whether one concrete improvement could be to emit BTF type tags >> for __iomem annotations in the kernel, then reject accesses on BTF pointers >> formed using such walks in the verifier, so such programs would fail to load. >> >> I think in practice, at least for BPF users, this will close the issue. > > That's a great idea. Much better than Andy's 1-3 options. Alexei, I've genuinely tried to engage with this patchset in good faith. If you believe that the BPF verifier can statically verify that a BPF program doing a PROBE_MEM access is referencing a valid (or maybe only mildly stale) kernel address, then I encourage you and Kumar to drop all of the x86 patches you keep sending, remove all the code that BPF emits to avoid tripping over SMAP, and be completely confident that the kernel will never OOPS or otherwise malfunction as a result. If you don't believe that, for example if you think a program might do x = a->b->c where the *a cannot be proven to still be alive and intact at the time that a->b is read, then I don't think that __iomem will save you, and maybe you should not believe anything in the previous paragraph, and maybe you should rethink this. --Andy