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 AEE2027281D for ; Tue, 16 Jun 2026 07:38:47 +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=1781595529; cv=none; b=aF9Gko5/jA23vT9QZdfYhB5FfJCVFcoIBHPBMp2ugwpDHgoa0CWXjxBANNU8X8sHU1Ts50ax+gZh6SR9qDEdfGms0fx3JrSZmhozSKiukZZMHfLRNLAaGLNBxzaYs8fOrRHGcn9S/yaU9G//SFrEQxwRwUhCeJsXI2hE6QQgQqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781595529; c=relaxed/simple; bh=seEAvzElmFGBeyhy4A5wlslAXEcfYnS/GXzhSI26jLI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HLazG4gtVqKMPsgbcQ5EJ8nN20P0REDdWBgHxXsV3Vn7l6euObEFS87HkT1Ilefn9rEm8u51GEYbseVqU7sjg19k0YiqPbt2LpcvXPh+SkcJgv+3qp0oGJM+UKzcdMZjM6Ftwm4n2vLFkKMe5YIb5E092Z8VZWu3XErPqXfslL8= 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=m7APgW1l; 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="m7APgW1l" 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=oD5DjZYY+l+B7EoRWIVcurSiI6RV/MPDqeTbThAVDHw=; b=m7APgW1lJ21nzB36Tt+Vxku8+B yRooQAZi5PkAvuoY4VANcDJx9mNizJZJAWlmBrNsaFVDzfCBUhTXrrb7lWj4bSIGFZrfuF/yAVl8A W/QxdPJiSGMzXKp2rU3htXvN1kQbMkEfSeyhYqzX+EUCLhF5onsDbTJ1Sv501iiKY+x0IOqaYASqr BxHrscyq6EYGKKM1FmZXW4L0Jc1YSlQrx0WyvM1F6ce5cy6AmnktWqW6MByYu4DmNyHlj9AWouGg7 WB9bADtCfWoNPZIY9XkPb+SRm5ydUWDFi9GnnXeIP7kz0qsPvzfF8EbdlNrbd/WBx4RACZiYsS3v5 1laBWPzg==; 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 1wZONe-0000000AKks-0TrA; Tue, 16 Jun 2026 07:38:42 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id F08493002D8; Tue, 16 Jun 2026 09:38:41 +0200 (CEST) Date: Tue, 16 Jun 2026 09:38:41 +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: <20260616073841.GO48970@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> 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: <01ac45a8-b558-4d4d-9f8f-e7a4e725d5d2@zytor.com> On Sun, Jun 14, 2026 at 07:07:50PM -0700, H. Peter Anvin wrote: > PeterZ: at some point you and I talked about the following: > > - Should x64_sys_call() be noinstr? I still think it should be, yes. But I also think it wants __noendbr, there is no sane reason you should ever be allowed to do an indirect call to this. Realistically, objtool will seal this function (scribble the ENDBR), but really, it just shouldn't be there to begin with. > - If so, any reason we can't inline it into do_syscall_64()? Code gen, GCC makes a mess out of things if you do that. x64_sys_call() now ends up being a giant pile of tail-calls. If you inline it into do_syscall_x64() that goes out the window. > - Since we no longer use the sys_call_table[] as a jump table, > do we actually need array_index_nospec()? in do_syscall_x64|32? It would mean unconditionally disabling jump-tables -- at least for this TU, but possibly for the whole thing (mixed compiler flags and LTO is a pain you don't need IIRC).