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 DB04B34EEEE for ; Fri, 5 Dec 2025 15:10:57 +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=1764947475; cv=none; b=poFq/wK9MQYUrIDv/Kx/TmxEaH7RQYr9Z7K77F0snlK8cyUIqgJ0LL6aGNlyaJ+e4/lF7lZIh8UAmDXQbplPOtBL3vi6/cEnkmoB/WtZC1gyxXmwp7MM9SQogM57rDCbiUSmvnnUtyLjK83uXbI6AEvKVUPcvUoG8ZQfgrdzkGQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764947475; c=relaxed/simple; bh=AIPCcXf+o+xg20C+PMgkrUW4CSayeKDvvzl2I3RRZkM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r5Jw/arfRqQdzcoxZTprLthBv2U/5v+/Mdy2JGk/VeVSzdV8H3Gwvnz8qaTZOHNmGioy9aWBOUxRYhCdh4Fn1G+LqVgYIKIq2c+qSDWSy/TxhBjbOSyrDGmcbLIuwE+nTM874z/TGouKORKx0Z9DYSioOqegMUnUUJQrzAR9S+I= 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=eTGIgsqp; 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="eTGIgsqp" 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=kF4kJF38VQCEKHUojQ727k+o8KNj6uSy/2dzqTKN5jo=; b=eTGIgsqpX5ocP1izfqVWJSmFpu aLR1oHUWr5Ycj7Otyo+cH0MPorAhKElQbsInV5wEaaYJcGwIpU9mls8BXtWTYLfcgWzNktZ9J29bT ik0TaymoaHOW+vvP6175APNXXrpGLoLlJOLk7KogyxJ/9x0OQk9nWkolfMwEIPoYuQEBkmKuFHO+T cDb9NkigFStj8GhAl6REd1qN5euLBTJ1y8pItQkSjYgpIKIT0yEtyEhvJdntGPsaZkY6lppsAGxBN ccGOAYSZKR4isI5Ara8M4e6zH+SQ4fFIbYhWn81TnGdf+7QqoBHVFFu0nTZCyhtmY4gfO4DZmTA2C WfTrAC0w==; Received: from 2001-1c00-8d85-5700-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:5700:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vRWas-00000006EOI-1SLy; Fri, 05 Dec 2025 14:15:34 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id DE5153002E5; Fri, 05 Dec 2025 16:10:51 +0100 (CET) Date: Fri, 5 Dec 2025 16:10:51 +0100 From: Peter Zijlstra To: Eric Dumazet Cc: Thomas Gleixner , Andy Lutomirski , linux-kernel , Eric Dumazet Subject: Re: [PATCH] entry: always inline local_irq_{enable,disable}_exit_to_user() Message-ID: <20251205151051.GB2528459@noisy.programming.kicks-ass.net> References: <20251204153127.1321824-1-edumazet@google.com> <20251205105123.GS2528459@noisy.programming.kicks-ass.net> <20251205124513.GZ2528459@noisy.programming.kicks-ass.net> 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: On Fri, Dec 05, 2025 at 05:03:33AM -0800, Eric Dumazet wrote: > > Earlier Zen with RET mitigation? ;-) > > This was AMD Rome "AMD EPYC 7B12 64-Core Processor", > bu also AMDTurin "AMD EPYC 9B45 128-Core Processor" to a certain extent. > > When you say RET mitigation, this is the five int3 after retq, right ? Nope, that one is SLS, AMD has BTB type confusion on return prediction (the AMD RetBleed) and patches all the RET sites with jumps to retbleed_return_thunk(), or one of the srso*return_thunk() thingies. All are somewhat expensive. So while normally CALL+RET is well optimized and hardly noticeable, the moment your uarch needs one of these return thunks, you're going to notice them.