Merge tag 'x86_misc_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Jan 2024 21:27:43 +0000 (13:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Jan 2024 21:27:43 +0000 (13:27 -0800)
Pull misc x86 updates from Borislav Petkov:

 - Add an informational message which gets issued when IA32 emulation
   has been disabled on the cmdline

 - Clarify in detail how /proc/cpuinfo is used on x86

 - Fix a theoretical overflow in num_digits()

* tag 'x86_misc_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/ia32: State that IA32 emulation is disabled
  Documentation/x86: Document what /proc/cpuinfo is for
  x86/lib: Fix overflow when counting digits

1  2 
arch/x86/include/asm/ia32.h

index 9805629479d968b3c483879bc5ca56a3373d7504,094886a8717eedb1b94b75a04cde89ade706e84a..c7ef6ea2fa993c78864f460dace8ef86ad246b16
@@@ -87,8 -81,16 +86,18 @@@ static inline bool ia32_enabled(void
        return IS_ENABLED(CONFIG_X86_32);
  }
  
 +static inline void ia32_disable(void) {}
 +
  #endif
  
+ static inline bool ia32_enabled_verbose(void)
+ {
+       bool enabled = ia32_enabled();
+       if (IS_ENABLED(CONFIG_IA32_EMULATION) && !enabled)
+               pr_notice_once("32-bit emulation disabled. You can reenable with ia32_emulation=on\n");
+       return enabled;
+ }
  #endif /* _ASM_X86_IA32_H */