From patchwork Thu Nov 30 21:16:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 172125 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp690691vqy; Thu, 30 Nov 2023 13:16:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGDd7tMK4xTMGZyZ5tn6okl8JRTWf1HitTURdaTqUKTiQ2e1RXe0T5s0kG0E9DdszDOkK8 X-Received: by 2002:a17:90b:3910:b0:286:64d:ad7 with SMTP id ob16-20020a17090b391000b00286064d0ad7mr9069441pjb.4.1701379004084; Thu, 30 Nov 2023 13:16:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701379004; cv=none; d=google.com; s=arc-20160816; b=wMpE0nO6J6D68JSEeKxsA2fcpMtkIG8F1Xd5k5g2lk3DBIitrNoB0KsiM7vLXhkdqm 2gEAe26A08+yPPXrEhiHVvLMGoqYD9L1MKKAS7uVZMvCgs1p8i9IcCWsUYNRtE+YNmdn 8CjaGYMx2J7f9u+QsAFsD9ugFxQ8ejXfFsb7bwHRWtw4w0Eetn7VbhGjOPWjo/qsvPEy iCBF7FcC7w0lD0L1BKLsPCK3JncxHo37A+yshbLOrUX76wS9Ru1W7yVg+74a4tpM5u7+ dW6+VTNstsl5IfOQ8MOkUbpdO/PrlqSY2SJd5mV/TXwRH8qxww/eWjKUM1G+KZqbJkeX essg== 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=oQJ87u2AnKlqVOtzAOTWmogwTb6/DRmjMhXviCOIGf4=; fh=gwf7YWr5zskV84mjstP+rTV3GFVAkI6/8IDTcKl3k+Q=; b=lJwQFh8R7d+0ycy2EeXIQ0Vyg5FeHJsw+b4XvzKhxpc8Ih8JrG1Wus1vYJbJ7NsDwI M3nTChCo99Hu66oIXc/WvdwpT47OL1hwBUxXooA6iyitP+kd4sMklI9eeRRUBVgcwDff aL+1dppLvNEpSLgNUQA+/VIuZMFxK3cUjrwXQMD0IR4crI4E1Omy1Dki9Uef6HJCpwDH RT/5Xn0FwstthZgrROg3jCD4qGK6mpXjvm3mDyqpZ60PAiPJoXjgU+IckOvDLdcxLeCH ar1O10kSshf0GDuyhlIisybMJAKeVtOyRZn7zGXA7nIuiPXLPey3weZ22y63FJMO/44l TGtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="OVNu9j/P"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y12-20020a17090a86cc00b00283a54ed475si4337401pjv.110.2023.11.30.13.16.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 13:16:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="OVNu9j/P"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0E1B080CF507; Thu, 30 Nov 2023 13:16:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376902AbjK3VQd (ORCPT + 99 others); Thu, 30 Nov 2023 16:16:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376848AbjK3VQ1 (ORCPT ); Thu, 30 Nov 2023 16:16:27 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D90C170F; Thu, 30 Nov 2023 13:16:33 -0800 (PST) Date: Thu, 30 Nov 2023 21:16:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701378991; 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=oQJ87u2AnKlqVOtzAOTWmogwTb6/DRmjMhXviCOIGf4=; b=OVNu9j/PxfLbmXGVHiwSRKtA0P/+R+JBCCj9e+BiM0nluM1n5+pfmBGnMN2QQEPnXL9QSL nqsIWySC2jBFcd4Xnwu6gWHgggBNVBHiq1z3nAhyVbriaib2LVdp1wXwXqBcn/MOsucGqd JsGi7D4Ah0dpiSTdD4LNZXGOPKCaCCqYM9dxRer5FzF5uyg82csnVOGzkKopIDp01FZb0N L7d/UgjbWZmmGdLdSaxu4DsOVB8xqaXOnf7GXybJEZRyfeJ1KJMVokap7iQpK0iDWW8+iH ammv57S0ftJv8Ogdy5LYJuAqDJKSHAySRx3qxsfQrm5zp8dfzOEKuWm8TvUpdA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701378991; 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=oQJ87u2AnKlqVOtzAOTWmogwTb6/DRmjMhXviCOIGf4=; b=1UQkAye5UH+q/QRprzMGtNKw+JHLJDW3NJ6oYws0BD2wJ9HaxYpHUpBQSDvv79tpTWfRVI F/5nE/PAZvKoOiBQ== From: "tip-bot2 for Ingo Molnar" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/percpu] x86/callthunks: Mark apply_relocation() as __init_or_module Cc: Ingo Molnar , Uros Bizjak , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231105213731.1878100-3-ubizjak@gmail.com> References: <20231105213731.1878100-3-ubizjak@gmail.com> MIME-Version: 1.0 Message-ID: <170137899106.398.14613676631297252898.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 30 Nov 2023 13:16:43 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784025190714975285 X-GMAIL-MSGID: 1784025190714975285 The following commit has been merged into the x86/percpu branch of tip: Commit-ID: 6724ba89e0b03667d56616614f55e1f772d38fdb Gitweb: https://git.kernel.org/tip/6724ba89e0b03667d56616614f55e1f772d38fdb Author: Ingo Molnar AuthorDate: Thu, 30 Nov 2023 20:15:51 +01:00 Committer: Ingo Molnar CommitterDate: Thu, 30 Nov 2023 20:15:51 +01:00 x86/callthunks: Mark apply_relocation() as __init_or_module Do it like the rest of the methods using it. Signed-off-by: Ingo Molnar Cc: Uros Bizjak Link: https://lore.kernel.org/r/20231105213731.1878100-3-ubizjak@gmail.com --- arch/x86/include/asm/text-patching.h | 2 +- arch/x86/kernel/alternative.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/text-patching.h b/arch/x86/include/asm/text-patching.h index ba8d900..fb338f0 100644 --- a/arch/x86/include/asm/text-patching.h +++ b/arch/x86/include/asm/text-patching.h @@ -18,7 +18,7 @@ static inline void apply_paravirt(struct paravirt_patch_site *start, #define __parainstructions_end NULL #endif -void apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len); +extern void apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len); /* * Currently, the max observed size in the kernel code is diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index aa86415..5052371 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -325,7 +325,7 @@ bool need_reloc(unsigned long offset, u8 *src, size_t src_len) return (target < src || target > src + src_len); } -void apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len) +void __init_or_module apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len) { int prev, target = 0;