From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=90.155.92.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796129756; b=nG6LPlkn6W50SvCKb5NaYfiKPTZysRkAMqTAfRaUhiAl9kMuAMZ7/Mt/Tt36euNzBAVi mRjo4Zk2lPA6fWJ4LbAgncmYTCN67m7elkRx0jCwb7DUtcHar/isumnu5bW8oDApMh64p xPgtcpZD0XB5GB2hdYh5fYm96p3o8oQhSPhIAF9bBW9OPJsXMmrXX4/L3GqpyWduNTPoN F2RidTucuKpEPFnEecf766P/lQYFpjb5HrRrBxQj8KBAEeDTNd07kZhNbqdbS4+H08KRJ NyRj6jiR/WSHzjRvdJkPo/vAW4BCdHwk26RNdQUCO2LOlt+UotjZAstzzrJXbtM7XSQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796129756; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=2uFexxFi/asT4f1aL0PQ18EbfONoE0XvGb10gxMvhd4=; b=xSPXqKhPtYv0G4jcctTnGEHRr78vJORxmu+8MIABhWbjDQB5wt7HeBbADEh7NLH4hFqX E+1MG82k1QU0wcz4lrwQqG3jULD2RCFDboXX/eXACFg5t22e0XnFjGdxnk+BcmtWR1HEd 7BzD9E2IO/NT+ltQOcdbPGCd0OTSEXbVj/ops4AcSmNH5N0Adswa5aOX6kdn6kQBljAI7 E0wJ656JEi5KflKaA0t624VCR4CZR1qwCuEZVmlTJcUO5qIutnBMgzn8ysiLlAeisZrlX u+LoNG9RSvSxnDfSOrocwCWCXz88piAvV9jmqK7raZInCbKK6FdZDMKF2P22Qfttz6g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=f+rwAk78; arc=none smtp.remote-ip=90.155.92.199 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D76D606A31A for ; Tue, 1 Dec 2026 12:55:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2D76D606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=f+rwAk78 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2uFexxFi/asT4f1aL0PQ18EbfONoE0XvGb10gxMvhd4=; b=f+rwAk78155YuBFK1ds79If6R3 DzGPtGdvyRWXMMiswGt35Z2yiOLbYOtAUhxCDvNv9m1hPNZl4z24e03WB5fJsYslytlFSUpKtEZqC Xf64ioePsLKnTzttM2w1SZ1WcJzWi57FhPmC38auWJL+IDQV2V3EV98QAUcdjiD8YjvJwwPAVHMEs 2oBrdGqOw2VnXfMH5VAtDT/1+PhF1DPBbBS1OamGHnvLx5AZs5WfujZwPjZMnn44uPUJMuGxKoNtT mEXrmKiOToEpXctWyuH6LMtdP5hhu3dSWklyNZv0XGdNT6xkbgKs4J18g4yyA8ewCl5cx2vL0dTm3 SoXGwT9A==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYNOJ-0000000B2ER-1BR4; Tue, 01 Dec 2026 12:55:28 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id B05E6300359; Tue, 01 Dec 2026 13:55:24 +0100 (CET) Date: Tue, 1 Dec 2026 13:55:24 +0100 From: Peter Zijlstra To: Valentin Schneider Cc: Steven Rostedt , Dave Hansen , Mathieu Desnoyers , linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , 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 Subject: Re: [PATCH v10 00/10] x86: Quiesce text_poke() IPIs Message-ID: <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> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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. On 'legacy' IDT systems we do that trampoline stack thing due to PTI; however: > All of that ugly ASM code is to pretty much reproduce context_tracking but > at CR3-switch level. If we can somehow validate/confirm that we can live > with stale vmalloc entries down to where ct_kernel_enter_state() happens, > then I could have this all be tied back to context_tracking() which was so > much cleaner. Unfortunately from what I understood from Dave regarding what > the CPU is allowed to cache behind our backs, it's really not that > straightforward, nor maybe even possible. all of that ugly CR3 ASM code is totally unused on FRED and as such none of this will work with FRED on. Realistically we will likely live if you do it from the normal context tracking code (you done that, it worked), but yes, tricky.