x86/entry: Add __init to ia32_emulation_override_cmdline()
Subsystems (2)
PATCH 1/1 x86/entry: Add __init to ia32_emulation_override_cmdline()
ia32_emulation_override_cmdline() is an early_param() arg and these are only needed at boot time. In fact, all other early_param() functions in arch/x86 seem to have '__init' annotation and ia32_emulation_override_cmdline() is the only exception.
--- arch/x86/entry/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/entry/common.c +1 -1
@@ -142,7 +142,7 @@ static __always_inline int syscall_32_enter(struct pt_regs *regs)#ifdef CONFIG_IA32_EMULATION bool __ia32_enabled__ro_after_init = !IS_ENABLED (CONFIG_IA32_EMULATION_DEFAULT_DISABLED ); -static int ia32_emulation_override_cmdline (char *arg) +static int __init ia32_emulation_override_cmdline (char *arg) {return kstrtobool (arg, &__ia32_enabled); }
Signature · 1 line
2.47.0
Quoted 7 lines · Vitaly Kuznetsov
ia32_emulation_override_cmdline()is anearly_param()arg and these are only needed at boot time. In fact, all otherearly_param()functions inarch/x86seem to have '__init' annotation andia32_emulation_override_cmdline()is the only exception.Fixes a11e097504ac ("x86: Make IA32_EMULATION boot time configurable")Signed-off-by Vitaly Kuznetsov <[email protected]>
nit: Does it really warrant a Fix tag, it's not a bug per-se, just frees up some memory?
Quoted 11 lines · Nikolay Borisov
Quoted 7 lines · Vitaly Kuznetsov
ia32_emulation_override_cmdline()is anearly_param()arg and these are only needed at boot time. In fact, all otherearly_param()functions inarch/x86seem to have '__init' annotation andia32_emulation_override_cmdline()is the only exception.Fixes a11e097504ac ("x86: Make IA32_EMULATION boot time configurable")Signed-off-by Vitaly Kuznetsov <[email protected]>Reviewed-by Nikolay Borisov <[email protected]>
Thanks!
Quoted 2 lines
nit: Does it really warrant a Fix tag, it's not a bug per-se, just frees up some memory?
I don't think we have any issues with early_param() functions without __init currently, by 'Fixes:' I meant "this fixes commit ... which was sub-optimal" and to help backporters. I'm absolutely fine with dropping it if that's the consensus.
Signature · 1 line
Vitaly
Quoted 16 lines · Vitaly Kuznetsov
ia32_emulation_override_cmdline()is anearly_param()arg and these are only needed at boot time. In fact, all otherearly_param()functions inarch/x86seem to have '__init' annotation andia32_emulation_override_cmdline()is the only exception.Fixes a11e097504ac ("x86: Make IA32_EMULATION boot time configurable")Signed-off-by Vitaly Kuznetsov <[email protected]>--- arch/x86/entry/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/entry/common.c +0
-0
arch/x86/entry/common.c static __always_inline int syscall_32_enter(struct pt_regs *regs) · line 148
Quoted 8 lines
arch/x86/entry/common.c +1
-1@@ -142,7 +142,7 @@ static __always_inline int syscall_32_enter(struct pt_regs *regs)#ifdef CONFIG_IA32_EMULATION bool __ia32_enabled__ro_after_init = !IS_ENABLED (CONFIG_IA32_EMULATION_DEFAULT_DISABLED ); -static int ia32_emulation_override_cmdline (char *arg) +static int __init ia32_emulation_override_cmdline (char *arg) {return kstrtobool (arg, &__ia32_enabled); }
Post-holidays ping)
Signature · 1 line
Vitaly
Quoted 6 lines · Vitaly Kuznetsov
arch/x86/entry/common.c static __always_inline int syscall_32_enter(struct pt_regs *regs) · line 148
Quoted 5 lines
arch/x86/entry/common.c +1
-1-static int ia32_emulation_override_cmdline (char *arg) +static int __init ia32_emulation_override_cmdline (char *arg) {return kstrtobool (arg, &__ia32_enabled); }Post-holidays ping)
I'll put this in the queue to look at after the next merge window since it looks like pure housekeeping.
Is there any reason to do it with any more urgency?
Quoted 8 lines · Dave Hansen
Quoted 6 lines · Vitaly Kuznetsov
arch/x86/entry/common.c static __always_inline int syscall_32_enter(struct pt_regs *regs) · line 148
Quoted 5 lines
arch/x86/entry/common.c +1
-1-static int ia32_emulation_override_cmdline (char *arg) +static int __init ia32_emulation_override_cmdline (char *arg) {return kstrtobool (arg, &__ia32_enabled); }Post-holidays ping)
Quoted 4 lines
I'll put this in the queue to look at after the next merge window since it looks like pure housekeeping.
Is there any reason to do it with any more urgency?
No reason, just checking that it doesn't fall through the cracks. Thanks!
Signature · 1 line
Vitaly