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=1796160529; b=zYI3AOKbE9G0OvPDnlmx9/95a4G2Y7943R93HybrwebyuCTLmFfTALjR1sI5SNNxepyn 82iBWI5khNJt4crV1QfZCs48EVnSsVndwjR+xFjKp4M/miPi0YuyPCTIhzpA7ve4atJL7 9/KNO2VF2jcszpRuhKVxl4QFYqeAaKdo9bPDIx00o/OFoJOeNQjQdGrVo6tJ3A3AJBkuY ZDY71ulFSCtp7hPbPVIFL/+OHgCQ15MtYMQOVHP+QIobIJnarTlPaGoKogpOSW+RfQHN8 LX5No/yHOh76+fJJfHtoK7mPVI8apLv++KFo2CRkqIAX3KkKFiNQML89fSTbO4OzQEQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796160529; 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=/JR0tyZZKakxq2qojJkXszabcBRdz7XL4ubl9kpYu8s=; b=ARzoHxMe09GK5kV+CgszoNbI8ms5yUQMSNmccTCbNv/O7ze4oUAiK6N3Qh57D/VrTxyj 6lhkfhuWpfLpFEXoMPN2mTbSejS8qT25tf83aL8DKul3COuOKm7ESwANWHguBgIl5k8hs XhPNqNKYVUFVw98ojwaO/D+7shdOz3jInl9q2YUOvVDJMER/VPyysmpv6R/GUarlHilBm WTo9dc3PTiSNhZ5biXK4S9fNwwZygRPEhXzAALcQ2BLMAxkaF3s8uvbLeZTmaMPIzzR21 6q5LPAFkcueCF417qB0L/e1D/iBVVwKTNU2Qy19RNkZoOhoTlk9Tz6wXJDSvMzOGkrA== 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=HM45i1Pt; 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 B24FA606A32A for ; Tue, 1 Dec 2026 21:28:49 +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=HM45i1Pt Received: by smtp.kernel.org (Postfix) with ESMTPSA id A66281F00897; Tue, 1 Dec 2026 21:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796160529; bh=/JR0tyZZKakxq2qojJkXszabcBRdz7XL4ubl9kpYu8s=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=HM45i1PtLiCVNBLXYqxvtDgsLXiZVzkyf03N3IJUME3vmvjRe98vnBSk/I4JuW+pg bXjySw8u9BTpQW7xLmytQfbXSeKQtpemlMjqgDz2Nw8I8+VaeGH6h6wRZ3VTjJI8Z1 g4RtBHEondDHh848oEA1304q1/bzhY+C8jknPuIV5DzWOsiZUye/6Ce78uQYS2TOmE 8oipFis5ReMR24aFNsUHNSx8nrgZqyl+D4jE2643N89SyMo64aqv2WidLSRppcwivm nUmrVR0k5fgVdPjcEUP9hVO07rPtZSDOmrznRQlPVm7JapToHdwEz3jpxM75LN0uC+ prmaajGlO+Ezg== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id AB279F40066; Tue, 1 Dec 2026 16:28:46 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Tue, 01 Dec 2026 16:28:46 -0500 X-ME-Sender: X-ME-Proxy-Cause: dmFkZTE8NcsxQPry36TOwx2KLE4dFabtSwboOfYq8g/xb3XFPzaFRq4yduahgeTzM8D7na hebospxGN4YrGrEF7I22h0lzWi8ulMWqqFC+Qyej0VV939bmycnUh1YJb+BRzkyfv6iLcx X+p3/2NL6UNWQvNxWuhMOH8xQlGD+sS+bMBBxeXhRa2Wj+dYTHw6pmieBuVHqn634YzMiJ JwBnC3rxLFt043OA+WDSut5AH0Q03bQqBcjDT9JKEf52tfuki27ZEOC/yyXLiYh/gdqew4 y4tPX5bGgD5leEpK6UOsrgr1W9Xqkia6ypMWtP8a5AS+EDEWA3b+hKAtYkQcANnDDLiVqV N1gW1mQH26EMw2VaTkNaLXAk7qVgxiqh/SGvanXgwjgs9HtzWXfYY5V9M41yrskKlv0Zpz XfjvA/fdKwx9RN8IsoTNjk9F+rgHYvCrdLf7EosrPrRUZr9dgMFvNKghxSN6xXFoB2c+i/ Y/tmAQU0Bn1xGcusg0YONxDi+SwX+xB3vAp0YvCK97FmAil1m/T4R24iqLonP5kDfPxqJT p6Pu5C/I03E9/tWtAcPYrwtwi7YCyA1TO9MZ/Y9slNVDihzMcrORQSis6NT9UvEC5QdbSn t6/3aMR+QvaWu/CG9naQFAhgjISZ/MaSQoxA2sGhwmMKcFgwFfXM5USH49Lw X-ME-Proxy: Feedback-ID: ieff94742:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 7826E700065; Tue, 1 Dec 2026 16:28:46 -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:28:25 -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: <7b67ffed-23da-474b-ab62-f9b87fb61a15@app.fastmail.com> In-Reply-To: <20261201125524.GO2668804@noisy.programming.kicks-ass.net> 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> 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 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 :) IOW, the task stack is just about the only vmapped thing that we *can* rely on to be coherent wrt the TLB.