Skip to content

Commit c956807

Browse files
KAGA-KOKOgregkh
authored andcommitted
x86/init: Initialize signal frame size late
commit 54d9a91 upstream No point in doing this during really early boot. Move it to an early initcall so that it is set up before possible user mode helpers are started during device initialization. Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Sneddon <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b083788 commit c956807

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

arch/x86/include/asm/sigframe.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,4 @@ struct rt_sigframe_x32 {
8585

8686
#endif /* CONFIG_X86_64 */
8787

88-
void __init init_sigframe_size(void);
89-
9088
#endif /* _ASM_X86_SIGFRAME_H */

arch/x86/kernel/cpu/common.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
#include <asm/cpu_device_id.h>
6464
#include <asm/uv/uv.h>
6565
#include <asm/set_memory.h>
66-
#include <asm/sigframe.h>
6766
#include <asm/traps.h>
6867
#include <asm/sev.h>
6968

@@ -1578,8 +1577,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
15781577

15791578
fpu__init_system(c);
15801579

1581-
init_sigframe_size();
1582-
15831580
#ifdef CONFIG_X86_32
15841581
/*
15851582
* Regardless of whether PCID is enumerated, the SDM says

arch/x86/kernel/signal.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ SYSCALL_DEFINE0(rt_sigreturn)
724724
static unsigned long __ro_after_init max_frame_size;
725725
static unsigned int __ro_after_init fpu_default_state_size;
726726

727-
void __init init_sigframe_size(void)
727+
static int __init init_sigframe_size(void)
728728
{
729729
fpu_default_state_size = fpu__get_fpstate_size();
730730

@@ -736,7 +736,9 @@ void __init init_sigframe_size(void)
736736
max_frame_size = round_up(max_frame_size, FRAME_ALIGNMENT);
737737

738738
pr_info("max sigframe size: %lu\n", max_frame_size);
739+
return 0;
739740
}
741+
early_initcall(init_sigframe_size);
740742

741743
unsigned long get_sigframe_size(void)
742744
{

0 commit comments

Comments
 (0)