* [PATCH] x86/entry: Add __init to ia32_emulation_override_cmdline()
@ 2024-12-10 15:16 Vitaly Kuznetsov
2024-12-11 15:03 ` Nikolay Borisov
2025-01-08 16:05 ` Vitaly Kuznetsov
0 siblings, 2 replies; 6+ messages in thread
From: Vitaly Kuznetsov @ 2024-12-10 15:16 UTC (permalink / raw)
To: Andy Lutomirski, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen
Cc: x86, H. Peter Anvin, Nikolay Borisov, Michael Petlan,
linux-kernel
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.
Fixes: a11e097504ac ("x86: Make IA32_EMULATION boot time configurable")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
arch/x86/entry/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
index 94941c5a10ac..51efd2da4d7f 100644
--- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c
@@ -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);
}
--
2.47.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/entry: Add __init to ia32_emulation_override_cmdline()
2024-12-10 15:16 [PATCH] x86/entry: Add __init to ia32_emulation_override_cmdline() Vitaly Kuznetsov
@ 2024-12-11 15:03 ` Nikolay Borisov
2024-12-11 15:58 ` Vitaly Kuznetsov
2025-01-08 16:05 ` Vitaly Kuznetsov
1 sibling, 1 reply; 6+ messages in thread
From: Nikolay Borisov @ 2024-12-11 15:03 UTC (permalink / raw)
To: Vitaly Kuznetsov, Andy Lutomirski, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen
Cc: x86, H. Peter Anvin, Michael Petlan, linux-kernel
On 10.12.24 г. 17:16 ч., Vitaly Kuznetsov wrote:
> 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.
>
> Fixes: a11e097504ac ("x86: Make IA32_EMULATION boot time configurable")
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
nit: Does it really warrant a Fix tag, it's not a bug per-se, just frees
up some memory?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/entry: Add __init to ia32_emulation_override_cmdline()
2024-12-11 15:03 ` Nikolay Borisov
@ 2024-12-11 15:58 ` Vitaly Kuznetsov
0 siblings, 0 replies; 6+ messages in thread
From: Vitaly Kuznetsov @ 2024-12-11 15:58 UTC (permalink / raw)
To: Nikolay Borisov, Andy Lutomirski, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen
Cc: x86, H. Peter Anvin, Michael Petlan, linux-kernel
Nikolay Borisov <nik.borisov@suse.com> writes:
> On 10.12.24 г. 17:16 ч., Vitaly Kuznetsov wrote:
>> 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.
>>
>> Fixes: a11e097504ac ("x86: Make IA32_EMULATION boot time configurable")
>> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
>
> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
>
Thanks!
> 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.
--
Vitaly
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/entry: Add __init to ia32_emulation_override_cmdline()
2024-12-10 15:16 [PATCH] x86/entry: Add __init to ia32_emulation_override_cmdline() Vitaly Kuznetsov
2024-12-11 15:03 ` Nikolay Borisov
@ 2025-01-08 16:05 ` Vitaly Kuznetsov
2025-01-08 17:00 ` Dave Hansen
1 sibling, 1 reply; 6+ messages in thread
From: Vitaly Kuznetsov @ 2025-01-08 16:05 UTC (permalink / raw)
To: Andy Lutomirski, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen
Cc: x86, H. Peter Anvin, Nikolay Borisov, Michael Petlan,
linux-kernel
Vitaly Kuznetsov <vkuznets@redhat.com> writes:
> 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.
>
> Fixes: a11e097504ac ("x86: Make IA32_EMULATION boot time configurable")
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
> arch/x86/entry/common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
> index 94941c5a10ac..51efd2da4d7f 100644
> --- a/arch/x86/entry/common.c
> +++ b/arch/x86/entry/common.c
> @@ -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)
--
Vitaly
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/entry: Add __init to ia32_emulation_override_cmdline()
2025-01-08 16:05 ` Vitaly Kuznetsov
@ 2025-01-08 17:00 ` Dave Hansen
2025-01-08 17:15 ` Vitaly Kuznetsov
0 siblings, 1 reply; 6+ messages in thread
From: Dave Hansen @ 2025-01-08 17:00 UTC (permalink / raw)
To: Vitaly Kuznetsov, Andy Lutomirski, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen
Cc: x86, H. Peter Anvin, Nikolay Borisov, Michael Petlan,
linux-kernel
On 1/8/25 08:05, Vitaly Kuznetsov wrote:
>> -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?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/entry: Add __init to ia32_emulation_override_cmdline()
2025-01-08 17:00 ` Dave Hansen
@ 2025-01-08 17:15 ` Vitaly Kuznetsov
0 siblings, 0 replies; 6+ messages in thread
From: Vitaly Kuznetsov @ 2025-01-08 17:15 UTC (permalink / raw)
To: Dave Hansen
Cc: x86, H. Peter Anvin, Nikolay Borisov, Michael Petlan,
linux-kernel, Andy Lutomirski, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen
Dave Hansen <dave.hansen@intel.com> writes:
> On 1/8/25 08:05, Vitaly Kuznetsov wrote:
>>> -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?
No reason, just checking that it doesn't fall through the cracks. Thanks!
--
Vitaly
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-01-08 17:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 15:16 [PATCH] x86/entry: Add __init to ia32_emulation_override_cmdline() Vitaly Kuznetsov
2024-12-11 15:03 ` Nikolay Borisov
2024-12-11 15:58 ` Vitaly Kuznetsov
2025-01-08 16:05 ` Vitaly Kuznetsov
2025-01-08 17:00 ` Dave Hansen
2025-01-08 17:15 ` Vitaly Kuznetsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox