On 2026-06-14 17:19, H. Peter Anvin wrote: > > OK, so v7.1 was released with this sizable performance regression. That > begs the question how to deal with it. > > One option that might be reasonable for -stable is to simply add back 16 > bytes of NOPs into the assembly file. However, that is obviously not a > long term fix. > Okay, here is a hack that actually generates the proper alignment, and it DOES in fact fix the performance regression. 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. This is not meant to be a final patch; this should go in a header file and be cleaned up etc, but I wanted to confirm that it does, in fact, fix the regression and that the alignment of x64_sys_call is the root cause of the problem. PeterZ: at some point you and I talked about the following: - Should x64_sys_call() be noinstr? - If so, any reason we can't inline it into do_syscall_64()? - 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? -hpa