Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 54d9a91

Browse files
committed
x86/init: Initialize signal frame size late
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]
1 parent 439e175 commit 54d9a91

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
@@ -64,7 +64,6 @@
6464
#include <asm/cpu_device_id.h>
6565
#include <asm/uv/uv.h>
6666
#include <asm/set_memory.h>
67-
#include <asm/sigframe.h>
6867
#include <asm/traps.h>
6968
#include <asm/sev.h>
7069

@@ -1607,8 +1606,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
16071606

16081607
fpu__init_system(c);
16091608

1610-
init_sigframe_size();
1611-
16121609
#ifdef CONFIG_X86_32
16131610
/*
16141611
* 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
@@ -182,7 +182,7 @@ get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t frame_size,
182182
static unsigned long __ro_after_init max_frame_size;
183183
static unsigned int __ro_after_init fpu_default_state_size;
184184

185-
void __init init_sigframe_size(void)
185+
static int __init init_sigframe_size(void)
186186
{
187187
fpu_default_state_size = fpu__get_fpstate_size();
188188

@@ -194,7 +194,9 @@ void __init init_sigframe_size(void)
194194
max_frame_size = round_up(max_frame_size, FRAME_ALIGNMENT);
195195

196196
pr_info("max sigframe size: %lu\n", max_frame_size);
197+
return 0;
197198
}
199+
early_initcall(init_sigframe_size);
198200

199201
unsigned long get_sigframe_size(void)
200202
{

0 commit comments

Comments
 (0)