From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 35C1A1FA859 for ; Fri, 19 Jun 2026 07:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781855433; cv=none; b=bAPQ2PW3yoypvsRBqanNtZAZKJlS7/97btOKE//4NZRgmEyXbV3fbZJr7VGyzje3pU9Y7vloQkON9gjAflB64PtrrmfwyQ1VN0S0VCp+f5Oqkoe7KGCShYklnjBwwcOwSBuLtTm3FHI/oN+urSGCOYNbHRljTkVW9okRpVvdvwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781855433; c=relaxed/simple; bh=e9+NOEiXTtA5gRqCKWv6nU9M89cfGk1cosb3ocdtKkw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ukaUHnb8abnyIkNDCFHRYMAtOeEd780S2lT0M+/Q5nxU6bqPu7FQz5rp56tr1uH4o4NpiUTb56WkqpNUud1hVtUh64Yji3Mww1exgdjzuvsVNBDDDOiOAM+mcnrGqTBLPWmQVBe23/Qw4nxmzFkH9GR5Wwq/q3mDrKDr++bMDmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=EggjHbgl; arc=none smtp.client-ip=90.155.50.34 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.b="EggjHbgl" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=iGeim2EHZPq4FNJIVE8o3UIoaVj+ewG2OCm23lXjpZ8=; b=EggjHbglm3p1HXc7jaZhYZ6cpr zOESMkwgXQeXDJFaQ473F8DapsV2WZfBtgCUZNy6wwHY3O+TzGArwvfpkEsRWpMGmCpR+nFFip8VD /h9LoMUMs3vKJovmYjBYbMs6CPPdNyFKNfwWi46UuJBYMtYiUaCFM6rvXGnfpJph+rIdj3o1VK7T1 7D8xj0Oy40HuebWmfYyrU1y6+TKM9rZXv2aSy9dA6RrYBLcV+NaaisczljI+e/IyB7JyKcipd9Iv6 kJtY8ZOc373q2C29qnwGdbNmiMyKoytg2gDomDw5gpqatRf1x9yXZzymZiKtLMOsuzA7OgNVpXPzd UZM/j5Gw==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1waTzf-0000000FrwX-1mHj; Fri, 19 Jun 2026 07:50:27 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 43A73300578; Fri, 19 Jun 2026 09:50:27 +0200 (CEST) Date: Fri, 19 Jun 2026 09:50:27 +0200 From: Peter Zijlstra To: "H. Peter Anvin" Cc: tglx@kernel.org, mingo@redhat.com, bp@alien8.de, Nathan Chancellor , Calvin Owens , Dave Hansen , torvalds@linux-foundation.org, x86-ML , LKML Subject: Re: 8aeb879baf12 - significant system call latency regression, bisected Message-ID: <20260619075027.GS49951@noisy.programming.kicks-ass.net> References: <20260613085919.GF42921@noisy.programming.kicks-ass.net> <203E61B7-290F-4F87-860F-B352D0072703@zytor.com> <338ead9a-91f4-4579-9954-e18911fa3f68@zytor.com> <01ac45a8-b558-4d4d-9f8f-e7a4e725d5d2@zytor.com> <20260616075331.GP48970@noisy.programming.kicks-ass.net> <2a4212f2-86ec-4ad9-a1c5-1e3b572fc887@zytor.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: <2a4212f2-86ec-4ad9-a1c5-1e3b572fc887@zytor.com> On Thu, Jun 18, 2026 at 04:05:37PM -0700, H. Peter Anvin wrote: > On 2026-06-16 00:53, Peter Zijlstra wrote: > > On Sun, Jun 14, 2026 at 07:07:50PM -0700, H. Peter Anvin wrote: > > > >> It uses the same hack as the Makefile to deal with function alignment with a > >> prefix: it adds unnecessary NOPs so that the pre-alignment and > >> post-alignment are the same. At the end of the day this really ought to be > >> fixed in gcc. > > > > And clang, but I don't think they can, it wrecks the 'ABI' they have in > > place with the current set of arguments. Which I agree is somewhat > > unfortunate, but it is what it is. > > > > > > This more or less works by accident, in general your align_func() macro > > is horrendously broken when you consider kCFI. By changing the > > patchable_function_entry attribute like this, the kCFI hash ends up at a > > different location and things go side-ways really really fast. > > > > OK, I guess I'm still wondering about this. Is there a difference between the > kCFI hash and the __pfx symbol? > > > The only reason it works here is that this function is never indirectly > > called and so the kCFI ABI violation is immaterial. > Ironically, as you post in your later patch, it is arguably better to have it > always fail if it never should be called that way ;) > > That being said, I have filed a gcc bug report: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125892 For GCC you also need these unmerged patches: https://lore.kernel.org/r/20260618204530.work.910-kees@kernel.org And you seem to have forgotten about llvm/clang.