Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp499454rdh; Tue, 19 Dec 2023 05:33:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhNp2pM2w8okqY7GSLDEixQD/u+es8yFk0oPzRudYDwsWMrwKPH94leEqVNXRvGf6xfQ4d X-Received: by 2002:a05:6358:3107:b0:172:c988:a499 with SMTP id c7-20020a056358310700b00172c988a499mr5676499rwe.38.1702992834278; Tue, 19 Dec 2023 05:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702992834; cv=none; d=google.com; s=arc-20160816; b=0AOlwAYdZUpfS6rTMtu36QFjD7pVsAFIib8Lwmr66gyyy+uu//xCOl3UnBNNIt0Bld LnwYdjaW4MKtnuBmncwHsicYRvuRWv4KwCFVPGDn+gjstL5wrXULRMiyEeWYDYGaPh++ qYQBLoFsOrB0CgeSC9o6jFooEsvq/IMbsm2r50mf56UiouSHZUpdRTIXCZg4t4e1ceS1 1jTphEWVFP41zsE96vqpqSxG+Z3ie0HERkJ3MH6XFXH41t33/BE/cGI1UHZC/Ot+x4TK ByI8y8D6crQNfXDeOEhZ1PztoP+2lgRDRNE/bNAZEtALSxf5ZP3Rh8jrCrCHlZnyGNmy rztw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=wZu7+f4jqN8y26ObwbxjE93jUOV36LfTZnAHKob9k4E=; fh=AZhCD2S5chFgkdItrI9KwCizjrKL5oiXQGsiN+LO5oE=; b=ri1sHje7sG+CFa91N4sZcZd+9+PRNTrhUMowL+pmgvKnwMxz1I+DcU2nf81Rgp4B/7 CnsuK8zSeS7zWBzwHlPpATF1lrpj/pvTQVvdTnOodS3xOmEk0QpJ954qfiAvuXGCvcw8 +RAxILzntzevAi/5anaOKV3crhxIUl5vM/D50I1RAcznHiDDHa/Lk+5uCsij4u4JXx8O ddUupXlxTbNl29mzaKaVdRCquB1oO5UnVuBdqj702F1ErBuJVA1K4TA5pwCoq4mxvT38 jhms2mkUeNt35rLJRVUpdP82s9+yUSV9wbx6YSU6IXJbPziAaamVoig6sDvpuDV9sHGO RRPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="imOW/Kw1"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-5263-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j7-20020a654287000000b005c1b2e37aeasi19774062pgp.384.2023.12.19.05.33.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 05:33:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5263-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="imOW/Kw1"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-5263-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id ED94DB21F2B for ; Tue, 19 Dec 2023 13:33:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6EFD19477; Tue, 19 Dec 2023 13:33:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="imOW/Kw1"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Yh1ORP8r" X-Original-To: linux-kernel@vger.kernel.org Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 866621945A; Tue, 19 Dec 2023 13:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Tue, 19 Dec 2023 13:33:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702992819; 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=wZu7+f4jqN8y26ObwbxjE93jUOV36LfTZnAHKob9k4E=; b=imOW/Kw1Cwl4ft0SmPPotxwsLhzNtOJYRjZA6zXjpcqzXHoys1seC77an5JxyBoR2yXahc bVGh6jcLXJI3JmwloAyAHp6eqqt9TST6km1Ow4MrXNI2EIP9Bz4HcRqZUdOCjz790hHCtC 6hjdulJNDmjUZloDSgp01skI6GuuFfj0ErzDa8q5B6rJx1PysLfJ76NhumvYuf/X8p4UHR Aj6G6qC+B6s8Ts6E4ekadE3Emg6CAeG64s4/wY0+TdTQ3YTMIFCPuErHsQtW7C3I63Doru 9YYmTzPkvlQB0a/H+GkM7fRmN3S3YTnXJH6/M5QznVDEcI9BLUBD92Cn2iOAzg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702992819; 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=wZu7+f4jqN8y26ObwbxjE93jUOV36LfTZnAHKob9k4E=; b=Yh1ORP8rnd+BcBQzUcb0Rf5akvwDcI9uEr6uHBLzPWCSrKbDtQ8Z5B0Ka3vD7M9OSBKbfl UbilJhA2v4m5yJDg== From: "tip-bot2 for Arnd Bergmann" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/percpu] x86/alternatives: Move apply_relocation() out of init section Cc: Arnd Bergmann , Ingo Molnar , Uros Bizjak , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231204072856.1033621-1-arnd@kernel.org> References: <20231204072856.1033621-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170299281805.398.14125432177983046398.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/percpu branch of tip: Commit-ID: 86ed430cf5296ca97a66f1f37e30b7dfe47cd36f Gitweb: https://git.kernel.org/tip/86ed430cf5296ca97a66f1f37e30b7dfe47cd36f Author: Arnd Bergmann AuthorDate: Mon, 04 Dec 2023 08:28:41 +01:00 Committer: Ingo Molnar CommitterDate: Tue, 19 Dec 2023 14:21:49 +01:00 x86/alternatives: Move apply_relocation() out of init section This function is now called from a few places that are no __init_or_module, resulting a link time warning: WARNING: modpost: vmlinux: section mismatch in reference: patch_dest+0x8a (section: .text) -> apply_relocation (section: .init.text) Remove the annotation here. [ mingo: Also sync up add_nop() with these changes. ] Fixes: 17bce3b2ae2d ("x86/callthunks: Handle %rip-relative relocations in call thunk template") Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Cc: Uros Bizjak Link: https://lore.kernel.org/r/20231204072856.1033621-1-arnd@kernel.org --- arch/x86/kernel/alternative.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 5052371..1781e02 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -44,7 +44,7 @@ EXPORT_SYMBOL_GPL(alternatives_patched); #define DA_ENDBR 0x08 #define DA_SMP 0x10 -static unsigned int __initdata_or_module debug_alternative; +static unsigned int debug_alternative; static int __init debug_alt(char *str) { @@ -132,7 +132,7 @@ const unsigned char * const x86_nops[ASM_NOP_MAX+1] = * each single-byte NOPs). If @len to fill out is > ASM_NOP_MAX, pad with INT3 and * *jump* over instead of executing long and daft NOPs. */ -static void __init_or_module add_nop(u8 *instr, unsigned int len) +static void add_nop(u8 *instr, unsigned int len) { u8 *target = instr + len; @@ -206,7 +206,7 @@ static int skip_nops(u8 *instr, int offset, int len) * Optimize a sequence of NOPs, possibly preceded by an unconditional jump * to the end of the NOP sequence into a single NOP. */ -static bool __init_or_module +static bool __optimize_nops(u8 *instr, size_t len, struct insn *insn, int *next, int *prev, int *target) { int i = *next - insn->length; @@ -325,7 +325,7 @@ bool need_reloc(unsigned long offset, u8 *src, size_t src_len) return (target < src || target > src + src_len); } -void __init_or_module apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len) +void apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len) { int prev, target = 0;