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=1796161333; b=hxPGzB0rCGBk/w5Bh0LVodxqF9Z1z4aZ9aEqxLadaMmKZOvYrIyfQpv7kAR9uONylisu ntEeUwye6mHlMc7VUC2x/YKIdDXgWbCQuY6GjVoPiJnWqcFYiFal8q2SrqQdgYV5628B/ yBD8HLs3W0gdXQUz+jWneAf2ZVM1/XtwC57ZqdkLdxP6U94Km79cqHDVxQi0M2T4JCxD7 sFH7mkvdjCHkR4NKDiT5LQ948vEtnbGMuH4rTFntzftEOb18++hLxBz8jpdpo61WkVOkh scVEA6Mk9hE+tpM82GDQpqKPqzuzAdbZT5BlHSXU1QXNBV3MpMzGpvIdH6XAdimzgdw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796161333; 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=CVQgJE1MHEu3kVD/eexQMBpNXwsyf9wXSB/kr2Q6fsQ=; b=kHayViwWYFYhYfPIE6ewWZGrcKhq/kYYFauaytsUGiPgFebgef/psUIp+FJlDPwuQCYK LE+0JnfZKrkIRXo2k6q0H85e/xAHRj8XBFL+oDMvAnI6nstVpMDT4BLHHKWhTL7bn5iey z7QvArqnWfrhKgDg1tcdWXZwsQG1BRq5ik8UtSFFhPBgmxtlnRmn/dAEUZg4z6C0nm4tw P2EutcisO9RBndJLl+EvSDKM34I0Nm88Mg6urwaojgCKqXB12O7cGGSqVKNZmYkt9q9Uu TWDHyiOJGnWTcayO1wEOP7L3lsnqXBQtgx13yp2BAN34a3TWp50lwxsEAsnbAPHI/cw== 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=nR47h+B2; 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 8C4BC606A320 for ; Tue, 1 Dec 2026 21:42:13 +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=nR47h+B2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51D321F00897; Tue, 1 Dec 2026 21:42:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796161333; bh=CVQgJE1MHEu3kVD/eexQMBpNXwsyf9wXSB/kr2Q6fsQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=nR47h+B2m8W79BJucd/TIDsvmNniz+M5X1CfPbdy/GED1MolVqbACAwl3spUlI7G3 cRFaPJWzvAKmUrT6dO7DXvBf8GqIq/9yEhx2+a6T2NHQGPwLcVZ8z9oycga+aYUh0q oIqm3Nc7V/+i3vqjv8Ag7oKaAFMZhBWFQjaOk3UNbwf14YzQ8RXs2OzvsppFM1rodL H/KZDT386mKYTSV1fY0foL7lVPYhHqHhIGqmNAMUKGS8Fk1rK1lzdf4CBwpddbKPI9 o4c5J6cCyUuZCINUSc4ADDFAsjENppMXdXLyKyGo6m+tKEqyWzMlTzrzttGxkgyyZj HetNVg5xMKmOQ== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 6D180F40068; Tue, 1 Dec 2026 16:42:11 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Tue, 01 Dec 2026 16:42:11 -0500 X-ME-Sender: X-ME-Proxy-Cause: dmFkZTFWwH4mtrqUWgxTnn0b4zgH4O3W9dTkRY9nk4ABA4JLEFNt+FZAUYZpuInvwNdtWV HelPt4VL4UXQzIq6x6KL0XpkI+1PudvHbYiIE/NakGuVaqq7X6EM44E16z06KvTl16HJ/4 Zzte+t2/wAaonGkMtsjPwWQaOr+CI4l5+CPaM56cOHfZhuWincUBBYJVDhPxIa7sYSOOzH 5rxkEqWtBUaTG/WndWGSt+Vo9KAKE2NJEESoYqSGvHkzJhM0BxY4jP6DIb6AzAjemP3DTX 83niAFeBUFoAGBz5Ql/kqmT8EUYG+bxNHB0IR7J7zpsUkfV2qGOJQM8H8wkmjtmnFUdqL3 xqu0i6mhrL5oLSRcGUy0S06IjDfZlxs+n5s3TsAxHYkJi5+LOHn0EgEL8Zyr38Q84j3RB/ KN5tKMG04DRt+BF2zdTTudP7vAyFAv2iAkjKXBBE4NoQHWtDQN3FYKTqFpzeht8pH/xxIH yYna01dou38oM9qJSPGDx2OO6/poLq5SD6mAF2m1kcxFt2559Rsw6PSShDkcMiyreeRWw8 AaBFGcdNIvF263FRu6aJOdKU0+U5fVDCSQDeOrR74wF3PhxPQoFx+r5J2EtToKks37zkRo ydGk+blv8vDTY4Y7IUHILMexIsUvBhIvbuyFdC+uy4ZlzmQ5DuEZsGVIOYPg X-ME-Proxy: Feedback-ID: ieff94742:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 3C8B270006A; Tue, 1 Dec 2026 16:42:11 -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: Ag4FU-lxcIVg Date: Tue, 01 Dec 2026 13:41:51 -0800 From: "Andy Lutomirski" To: "Peter Zijlstra (Intel)" , "Valentin Schneider" Cc: "Steven Rostedt" , "Dave Hansen" , "Mathieu Desnoyers" , "Linux Kernel Mailing List" , linux-mm@kvack.org, "the arch/x86 maintainers" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , "H. Peter Anvin" , "Arnaldo Carvalho de Melo" , "Josh Poimboeuf" , "Paolo Bonzini" , "Arnd Bergmann" , "Frederic Weisbecker" , "Paul E. McKenney" , "Jason Baron" , "Ard Biesheuvel" , "Sami Tolvanen" , "David S. Miller" , "Neeraj Upadhyay" , "Joel Fernandes" , "Josh Triplett" , "Boqun Feng" , "Uladzislau Rezki" , "Mel Gorman" , "Andrew Morton" , "Masahiro Yamada" , "Han Shen" , "Rik van Riel" , "Jann Horn" , "Dan Carpenter" , "Oleg Nesterov" , "Juri Lelli" , "Clark Williams" , "Tomas Glozar" , "Yair Podemsky" , "Marcelo Tosatti" , "Daniel Wagner" , "Petr Tesarik" , "Shrikanth Hegde" , "Dan Beimborn" , "Pak Hung Vincent Chiu" Message-Id: In-Reply-To: <7b67ffed-23da-474b-ab62-f9b87fb61a15@app.fastmail.com> References: <20261130124446.72136a89@gandalf.local.home> <75c1f916-5696-4ac2-8c47-5d44fa567e98@intel.com> <20261130135027.364e6272@gandalf.local.home> <85c2ea19-a274-4a64-b8bb-b30ba3b7ef55@intel.com> <20261130141551.48e2a4a2@gandalf.local.home> <08791bec-73d8-497b-8bd9-4787d5325421@intel.com> <20261130152239.154d8f0f@gandalf.local.home> <20261201125524.GO2668804@noisy.programming.kicks-ass.net> <7b67ffed-23da-474b-ab62-f9b87fb61a15@app.fastmail.com> Subject: Re: [PATCH v10 00/10] x86: Quiesce text_poke() IPIs Content-Type: text/plain Content-Transfer-Encoding: 7bit On Tue, Dec 1, 2026, at 1:28 PM, Andy Lutomirski wrote: > On Tue, Dec 1, 2026, at 4:55 AM, Peter Zijlstra wrote: >> On Tue, Dec 01, 2026 at 12:10:26PM +0100, Valentin Schneider wrote: >> >>> The real problem is those (kernel) TLB flushes. I found no way to >>> check/validate when/where exactly vmalloc accesses can happen in the kernel >>> entry, so the only sane approach was to have the catch-up sequence (TLB >>> flush) happen exactly when any vmalloc becomes possible: at the kPTI CR3 >>> switch. >> >> Right, so the task stacks are vmalloc. So since you didn't qualify what >> vmalloc accesses are problematic, it is pretty much the very first thing >> you touch. > > I spent like thirty seconds contemplating exactly how nasty it would be > to try to implement all this cleanly without touching the vmapped stack. > > And then I decided this was a nonissue. Consider how we actually reach > the enter-the-kernel code: we start in the kernel *on the task stack*, > then we run the exit-the-kernel code, then we maybe go to userspace and > come back, then we run the enter-the-kernel code. > > There had better not be anything in the kernel that changes the task > stack mapping and relies on an IPI that runs in the interim! If there > was, it would surely crash us just as crashily if we were just > executing normal kernel code, expecially with IRQs off :) Let me say this more clearly: no one unmaps the task stack while the task is still running. > > IOW, the task stack is just about the only vmapped thing that we *can* > rely on to be coherent wrt the TLB.