Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2342345rwd; Fri, 16 Jun 2023 02:37:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4WJFZSFyQEV7n6rGdF2thjSC4a2cXNN38OhXT8/MiKNMY9MRj8DEtbFkF45tDaLwsBd1yT X-Received: by 2002:a17:902:900c:b0:1b1:76c2:296a with SMTP id a12-20020a170902900c00b001b176c2296amr946863plp.60.1686908253832; Fri, 16 Jun 2023 02:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686908253; cv=none; d=google.com; s=arc-20160816; b=H7uz+/lfBKiMDrUBPoaKZi6AFIqwbG/1Y/L9uhGTCrpjL7v96wpRowbi9Ylckwabc/ tlRYNYysvySaWcYWy5RefjMiQg/gHB4fw1XEoSYTwkHyBJi8UxwpK30I1PHFV2lVLsFk JzjJ8cpvemp1rsy6k/e6mcfDV+utlkiTR3venOyUrQZAfuuCAwZyJy+oPJ2Gnkiv9g2P rGCYIX9+58VoK2hiTO9xZUVutEwEguyIpKhvVU3csWtcdvZw+2+bANbnSExfdXsFzbRp ocI0ljPAmKf2sQTSMlXLVDeV1gFRACNT3Xd3fZXwrog5wm/cQbhiH6K0YUM1nPFk96i/ z4Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=n8JjCGMZg2aquHdshBmUxYgzLMNz9foabYDHjHRLCmw=; b=izDqo0AOIn2qDxVvvFZxx7C8FK1hjEOF+OTcEzueMwKZElA3wI7Bp/EAYGPx4HczEo WpJBKubiEgGkqnZmC6HtboF0THhqkEpMDBaFwXgWWjWj/2Spn6TZcZ/jXMagOBkd1NmJ 50pwgRuOGk+hM39/ZFIKeFu3aX6XxATLKKp0N5j8HFn2S7lQ9B8KdPdATv7N9vEZJ2X1 0NBiNH2IRYLZ0xkd2xp5PVe5/dXt9NDIuyf9cXR6IprN1HpqjDe2If/0IwU8Nr3ZFoAi 06d2B9uB//zxlbfUxTcuLvXbAXk5Fb6Ln5/jGI/jsq/3a7vSdvJxHrHOilrtArQ9W/4p OgoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=IWR7Mc5o; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u16-20020a170902e5d000b001afd750102fsi15824020plf.498.2023.06.16.02.37.20; Fri, 16 Jun 2023 02:37:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=IWR7Mc5o; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344206AbjFPJZV (ORCPT + 99 others); Fri, 16 Jun 2023 05:25:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344017AbjFPJYu (ORCPT ); Fri, 16 Jun 2023 05:24:50 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A48B2117; Fri, 16 Jun 2023 02:24:45 -0700 (PDT) Date: Fri, 16 Jun 2023 09:24:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686907483; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n8JjCGMZg2aquHdshBmUxYgzLMNz9foabYDHjHRLCmw=; b=IWR7Mc5o118rmqaS3z1ueZAQl5gq34xv3g/Ux8i5BQSijVLAzU28Il0eeGAnGepLQrrQS0 QX0imLGSoFt1bRnmFkmWae4Xli42yJhIxO645g1IQ9n8Q7s/PzeWQMJWc3IlXBApmWpSjy JueLuMz+C5taWHsu4e9Eg7V6cwfBIvK823vZYlQ+SyF/pUIY3r0OqPolukn1msXOks1cWL 66jT2VkHcc2kJY0/DMYC5AZpcvinBPc25QJFDJ3w9I3aA7I5vCVeF2pgsLjXe7L9++XpTm yhnbksN/Syyb3s9WNI7CsCUKmiJLXS92lqeKEauWlKOrZZL0+gjHvDQtMDYugg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686907483; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n8JjCGMZg2aquHdshBmUxYgzLMNz9foabYDHjHRLCmw=; b=Yn2P/wpO8JAk2MIdUbUdR/CYq4Jle/S8mcqM0mEc5Zej1hTEvrDtSoAbeH2Fjj1RfR4MDT PX0OM1KX5ynYtrBA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/boot] x86/init: Initialize signal frame size late Cc: Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230613224545.727330699@linutronix.de> References: <20230613224545.727330699@linutronix.de> MIME-Version: 1.0 Message-ID: <168690748312.404.1213636159310165530.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/boot branch of tip: Commit-ID: 54d9a91a3d6713d1332e93be13b4eaf0fa54349d Gitweb: https://git.kernel.org/tip/54d9a91a3d6713d1332e93be13b4eaf0fa54349d Author: Thomas Gleixner AuthorDate: Wed, 14 Jun 2023 01:39:42 +02:00 Committer: Thomas Gleixner CommitterDate: Fri, 16 Jun 2023 10:16:00 +02:00 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 Link: https://lore.kernel.org/r/20230613224545.727330699@linutronix.de --- arch/x86/include/asm/sigframe.h | 2 -- arch/x86/kernel/cpu/common.c | 3 --- arch/x86/kernel/signal.c | 4 +++- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/sigframe.h b/arch/x86/include/asm/sigframe.h index 5b1ed65..84eab27 100644 --- a/arch/x86/include/asm/sigframe.h +++ b/arch/x86/include/asm/sigframe.h @@ -85,6 +85,4 @@ struct rt_sigframe_x32 { #endif /* CONFIG_X86_64 */ -void __init init_sigframe_size(void); - #endif /* _ASM_X86_SIGFRAME_H */ diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 5ee8b31..b8a4db1 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -64,7 +64,6 @@ #include #include #include -#include #include #include @@ -1607,8 +1606,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) fpu__init_system(c); - init_sigframe_size(); - #ifdef CONFIG_X86_32 /* * Regardless of whether PCID is enumerated, the SDM says diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 004cb30..cfeec3e 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -182,7 +182,7 @@ get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t frame_size, static unsigned long __ro_after_init max_frame_size; static unsigned int __ro_after_init fpu_default_state_size; -void __init init_sigframe_size(void) +static int __init init_sigframe_size(void) { fpu_default_state_size = fpu__get_fpstate_size(); @@ -194,7 +194,9 @@ void __init init_sigframe_size(void) max_frame_size = round_up(max_frame_size, FRAME_ALIGNMENT); pr_info("max sigframe size: %lu\n", max_frame_size); + return 0; } +early_initcall(init_sigframe_size); unsigned long get_sigframe_size(void) {