From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83846303CAE for ; Fri, 27 Mar 2026 15:21:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774624885; cv=none; b=rZixeJ/cXgU55tiAbBBmbegrg+vo9SAHP8TsYqZnI6AmmcFEGKK8IK/iF4Ygaleft3DYpF8LhlmE27SXaFXF99VzIVptBOdVUXSBwtn8XCNUlIu2sdYSGG22O0ylz1Fj5v0wqNsIhHbufL71F83EVl+pFdxAUWowYngQmFK1Bxo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774624885; c=relaxed/simple; bh=lsmDtjM7gTwYSJreQZSUmvt0p659qBhBqgno8Wbv1Nk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OetQ67Pz5XhRHBFPrPCFhf97DnDew4ZT3tT3345hbBW07/ZHpvoUGVlgSjZg1Wak0m0aLIGOpNGjihn6GgHWWirdga0PMScll+6wrA1KsCOaFt6SLHmBYojNwzB9ArcGtVmLwfY8ZvMZzRGserdFKpFpsmtrqJ3TtYeVNpPjxOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Gq4wHa14; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Gq4wHa14" 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=Y6iKBJ4e92e4+lKloWp06dyGtolagm3MlQTEZBj9umI=; b=Gq4wHa14dJPD/yJX11ZxxXPZR8 Ia3nTksoXk/MfLaGI4PofuF3Xf+QE+gfrTc40k089Eu1iKkRKz6wILbatNzqkiLjLmxw7mg7AcdJK MU9RkPR0LkVeSQ0NIbmhMYPuXnHfNYAo1nvflQ1/EVgZzOX5q+WwzGSeg+iWRtuvCXk1dtoZCDGxd 6RUaEqxfQ4mp6AAa/QHLI6lKZ2yaKTcWY6PAE0FVNNBConaFnTaDy+OpmDk6Yskt57UWfoR7vZ+vf RRb5m1YRQ+6eO99XgTNKHPb/ooHrxuH2g8/ZuohczZztXIqq87r5x5FwJ9l7BKeSjCwZgCq0XKJs4 V4M4roQA==; 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.98.2 #2 (Red Hat Linux)) id 1w68zW-0000000Agut-25fn; Fri, 27 Mar 2026 15:20:54 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id EB6BC300E56; Fri, 27 Mar 2026 16:20:52 +0100 (CET) Date: Fri, 27 Mar 2026 16:20:52 +0100 From: Peter Zijlstra To: K Prateek Nayak Cc: John Stultz , LKML , Joel Fernandes , Qais Yousef , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Steven Rostedt , Ben Segall , Zimuzo Ezeozue , Mel Gorman , Will Deacon , Waiman Long , Boqun Feng , "Paul E. McKenney" , Metin Kaya , Xuewen Yan , Thomas Gleixner , Daniel Lezcano , Suleiman Souhlal , kuyo chang , hupu , kernel-team@android.com Subject: Re: [PATCH v26 00/10] Simple Donor Migration for Proxy Execution Message-ID: <20260327152052.GJ3738010@noisy.programming.kicks-ass.net> References: <20260324191337.1841376-1-jstultz@google.com> <36e96f87-a682-436e-aefc-13e2e5810019@amd.com> <20260327114844.GQ2872@noisy.programming.kicks-ass.net> <33e60181-1809-44e1-bc4c-8ac7f79d49d6@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33e60181-1809-44e1-bc4c-8ac7f79d49d6@amd.com> On Fri, Mar 27, 2026 at 07:03:19PM +0530, K Prateek Nayak wrote: > So John originally had that and then I saw Dan's comment in > cleanup.h that reads: > > Lastly, given that the benefit of cleanup helpers is removal of > "goto", and that the "goto" statement can jump between scopes, the > expectation is that usage of "goto" and cleanup helpers is never > mixed in the same function. I.e. for a given routine, convert all > resources that need a "goto" cleanup to scope-based cleanup, or > convert none of them. > > which can either be interpreted as "Don't do it unless you know what > you are doing" or "There is at least one compiler that will get a > goto + cleanup guard wrong" and to err on side of caution, I > suggested we do break + enums. > > If there are no concerns, then the suggested diff is indeed much > better. IIRC the concern was doing partial error handling conversions and getting it hopelessly wrong. And while some GCC's generate wrong code when you goto into a guard, all clangs ever will error on that, so any such code should not survive the robots. And then there was an issue with computed gotos and asm_goto, but I the former are exceedingly rare (and again, clang will error IIRC) and the latter we upped the minimum clang version for. Anyway, there is nothing inherently wrong with using goto to exit a scope and it works well.