Re: [PATCH v2 3/4] x86/entry: Disable IA32 syscall if ia32_disabled is true

From: Nikolay Borisov
Date: Fri Jun 09 2023 - 12:13:46 EST




On 9.06.23 г. 19:03 ч., Nikolay Borisov wrote:


<snip>



@@ -226,6 +226,13 @@ void __init idt_setup_early_traps(void)
  void __init idt_setup_traps(void)
  {
      idt_setup_from_table(idt_table, def_idts, ARRAY_SIZE(def_idts), true);
+
+    if (IS_ENABLED(CONFIG_IA32_EMULATION) && ia32_disabled) {

Ditto.

This actually doesn't fail, because if IA32_EMULATION is n that conditional expands to 'if (0 && ia32_disabled)' which is eliminated by the compiler.

Forget this one, it works because I made ia32_disabled always compiled, hoowever, the problem in syscall_init() remains because now entry_SYSCALL_compat is also compiled in iff CONFIG_IA32_EMULATION is selected.

<snip>