Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3790118ybk; Tue, 19 May 2020 13:01:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKrLWwobUgN0yXi+GCmmkcELay7MSv5qWhD/2Rb+oig6DWeHlrorLeePpI3ehMhUl2JvZv X-Received: by 2002:a05:6402:1447:: with SMTP id d7mr481414edx.367.1589918512145; Tue, 19 May 2020 13:01:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589918512; cv=none; d=google.com; s=arc-20160816; b=lydVevkJqoARbXJiBExbyOEsf+JEAPkBHlRxPfQwdKRAFjdhKhtIg/fd0sTcBtWTgo 0hScsG0YMqbD08XxqI+q83C+5mc0Wmt0HcCUOaOy9Of+bo4/Qw5YgG1n+wFwckA7ED70 2U0MM8C0oBWLqVJwCfuLyl7UJXfGUr+5Dbvc73F6RBr0PCVBnSH2wJBdFVGCV601v27M 9Ys5zIdtVHXmFOJBgUI/c07Tbi1IVy0atwCXT55dhnLUVcEqSkxlo1JWYwXvEfipd573 yhx5u7VMCgfCHqcvpoSvb05arryrv9i3sUclmNhwDIAy0CG9fGt5sNtWwLfKexnS0+a+ stcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=UJ8Th9UHTtJkaeWShhBDAobNYhNxU5pclLOCX9aHHjw=; b=N3RlacuGk2DLTlBPw1ek+N5ZFExKyU8osQeHiFH603EmXC17VSCXQ9Uz1zm2O/plS3 28ME4xznqtkqyIpZ/8iCjhFbL1CrS9wYFfN+X8+eFVmU7vO5MXbgJLkJLwT8WVnSzziA JzmfbD0STSoZ9ezAWmVZwPDlWDiNmLviAWzkT4snCgH+liJfjjhrzir/I7ToqCAaL/WS 5FWd+DiMmJ8LVuJDyJ21kU6WD/6hxHJayVcmRQvqyGkPXSeXEKQSzpDFgu/pZM3wCilj 0vy3AITJTi0TGRsLJMn30OsbF14F7DxV6mA8/GsnOOyXatAdh3C8sf3HTO2bEa9Y1glh Zm0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw24si513611ejb.145.2020.05.19.13.01.20; Tue, 19 May 2020 13:01:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728469AbgEST7Z (ORCPT + 99 others); Tue, 19 May 2020 15:59:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728331AbgEST7C (ORCPT ); Tue, 19 May 2020 15:59:02 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEA2BC08C5C0; Tue, 19 May 2020 12:59:02 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jb8O9-0000AA-Rm; Tue, 19 May 2020 21:58:58 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id CA77C1C0178; Tue, 19 May 2020 21:58:43 +0200 (CEST) Date: Tue, 19 May 2020 19:58:43 -0000 From: "tip-bot2 for Thomas Gleixner" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/entry] x86/entry/32: Move non entry code into .text section Cc: Thomas Gleixner , Alexandre Chartre , Peter Zijlstra , x86 , LKML In-Reply-To: <20200505134340.320164650@linutronix.de> References: <20200505134340.320164650@linutronix.de> MIME-Version: 1.0 Message-ID: <158991832371.17951.6250394079949069799.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/entry branch of tip: Commit-ID: cd809a7a917164820bdb20a7d41f3d1ce98ddc83 Gitweb: https://git.kernel.org/tip/cd809a7a917164820bdb20a7d41f3d1ce98ddc83 Author: Thomas Gleixner AuthorDate: Wed, 25 Mar 2020 19:47:40 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 19 May 2020 16:03:49 +02:00 x86/entry/32: Move non entry code into .text section All ASM code which is not part of the entry functionality can move out into the .text section. No reason to keep it in the non-instrumentable entry section. Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Chartre Acked-by: Peter Zijlstra Link: https://lkml.kernel.org/r/20200505134340.320164650@linutronix.de --- arch/x86/entry/entry_32.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index a5eed84..bf0082b 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -730,6 +730,7 @@ * %eax: prev task * %edx: next task */ +.pushsection .text, "ax" SYM_CODE_START(__switch_to_asm) /* * Save callee-saved registers @@ -776,6 +777,7 @@ SYM_CODE_START(__switch_to_asm) jmp __switch_to SYM_CODE_END(__switch_to_asm) +.popsection /* * The unwinder expects the last frame on the stack to always be at the same @@ -784,6 +786,7 @@ SYM_CODE_END(__switch_to_asm) * asmlinkage function so its argument has to be pushed on the stack. This * wrapper creates a proper "end of stack" frame header before the call. */ +.pushsection .text, "ax" SYM_FUNC_START(schedule_tail_wrapper) FRAME_BEGIN @@ -794,6 +797,8 @@ SYM_FUNC_START(schedule_tail_wrapper) FRAME_END ret SYM_FUNC_END(schedule_tail_wrapper) +.popsection + /* * A newly forked process directly context switches into this address. * @@ -801,6 +806,7 @@ SYM_FUNC_END(schedule_tail_wrapper) * ebx: kernel thread func (NULL for user thread) * edi: kernel thread arg */ +.pushsection .text, "ax" SYM_CODE_START(ret_from_fork) call schedule_tail_wrapper @@ -825,6 +831,7 @@ SYM_CODE_START(ret_from_fork) movl $0, PT_EAX(%esp) jmp 2b SYM_CODE_END(ret_from_fork) +.popsection /* * Return to user mode is not as complex as all this looks, @@ -1691,6 +1698,7 @@ SYM_CODE_START(general_protection) jmp common_exception SYM_CODE_END(general_protection) +.pushsection .text, "ax" SYM_CODE_START(rewind_stack_do_exit) /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp @@ -1701,3 +1709,4 @@ SYM_CODE_START(rewind_stack_do_exit) call do_exit 1: jmp 1b SYM_CODE_END(rewind_stack_do_exit) +.popsection