diff -up ./arch/x86/kernel/traps.c.endbr32 ./arch/x86/kernel/traps.c --- ./arch/x86/kernel/traps.c.endbr32 2026-05-29 19:54:47.940471519 +0900 +++ ./arch/x86/kernel/traps.c 2026-05-29 20:00:00.379934208 +0900 @@ -826,8 +826,9 @@ static struct { unsigned long fcmov; unsigned long sse; unsigned long sse2; + unsigned long endbr32; } emulated_ops_counter = { - 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0, 0 }; static int emulated_ops_proc_show(struct seq_file *m, void *v) { @@ -848,6 +849,9 @@ static int emulated_ops_proc_show(struct emulated_ops_counter.sse, emulated_ops_counter.sse2); #endif +#ifdef CONFIG_IGNORE_SSP_OPCODE + seq_printf(m, "endbr32: %lu\n", emulated_ops_counter.endbr32); +#endif return 0; } static int emulated_ops_proc_open(struct inode *inode, struct file *file) @@ -874,6 +878,7 @@ static ssize_t emulated_ops_proc_write(s emulated_ops_counter.fcmov = 0; emulated_ops_counter.sse = 0; emulated_ops_counter.sse2 = 0; + emulated_ops_counter.endbr32 = 0; } return count; } @@ -905,14 +910,16 @@ struct { unsigned long cmov; unsigned long sse; unsigned long sse2; + unsigned long endbr32; } emulated_files_list[EMU_OPS_FILES_MAX] = { - { {'\0'}, 0,0,0 }, + { {'\0'}, 0,0,0,0 }, }; enum emulated_op_type { OP_NONE = 0, OP_CMOV, OP_SSE, OP_SSE2, + OP_ENDBR32, }; static int emulated_files_running = 0; /* cmdline: emulated_files=1 to start /proc/emulated_files on boot */ @@ -926,6 +933,7 @@ static void emulated_files_clear(void) emulated_files_list[i].cmov = 0; emulated_files_list[i].sse = 0; emulated_files_list[i].sse2 = 0; + emulated_files_list[i].endbr32 = 0; } } /* @@ -980,6 +988,7 @@ static void __emulated_files_byip(unsign emulated_files_list[i].cmov=0; emulated_files_list[i].sse=0; emulated_files_list[i].sse2=0; + emulated_files_list[i].endbr32=0; break; } if(!strncmp(emulated_files_list[i].buf, p, sizeof(emulated_files_list[i].buf)-1)) { @@ -995,6 +1004,8 @@ static void __emulated_files_byip(unsign emulated_files_list[i].sse++; break; case OP_SSE2: emulated_files_list[i].sse2++; break; + case OP_ENDBR32: + emulated_files_list[i].endbr32++; break; case OP_NONE: ;/*nop*/ default: @@ -1010,17 +1021,33 @@ static void __emulated_files_byip(unsign static int emulated_files_proc_show(struct seq_file *m, void *v) { int i; +#ifdef CONFIG_IGNORE_SSP_OPCODE + seq_printf(m, "%10s %10s %10s %10s %s%s\n", "cmov","sse","sse2","endbr32", "filename", + (!emulated_files_running)?" (stopped; write \"1\" to start)":"" + ); +#else seq_printf(m, "%10s %10s %10s %s%s\n", "cmov","sse","sse2","filename", (!emulated_files_running)?" (stopped; write \"1\" to start)":"" ); +#endif for (i=0;iip = (typeof(regs->ip))(eip + 4); return; }