Re: [PATCH -v2] x86/ia32: State that IA32 emulation is disabled

From: Nikolay Borisov
Date: Fri Dec 08 2023 - 14:28:22 EST




On 8.12.23 г. 21:22 ч., Borislav Petkov wrote:
On Fri, Dec 08, 2023 at 08:42:29PM +0200, Nikolay Borisov wrote:
+static inline bool ia32_enabled_verbose(void)
+{
+ bool enabled = ia32_enabled();
+
+ if (IS_ENABLED(CONFIG_IA32_EMULATION) && !enabled)

nit: But why check config_ia32_emulation explicitly, its state should
already be accounted for in ia32_enabled's value? So this check can simply
be 'if (!enabled)'

+ pr_notice_once("32-bit emulation disabled. You can reenable with ia32_emulation=on\n");
^^^^^^^^^^

If CONFIG_IA32_EMULATION is disabled, is there any 32-bit emulation to
be enabled, at all?


Ah, the !enabled condition will then trigger so it will result in a false print. Fair enough...