Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3979573pxb; Tue, 25 Jan 2022 00:32:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPFhhL4dWnkaIya4QNM/COxfGZA9i4/nx4U2ot4k2bgWjYm6dAN+Y+70BB6n+uCSb4RE3j X-Received: by 2002:a17:90b:38c9:: with SMTP id nn9mr2288186pjb.219.1643099537593; Tue, 25 Jan 2022 00:32:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643099537; cv=none; d=google.com; s=arc-20160816; b=Ei3BYGEs8oypy2mpgbynyPpMDqCSGEOxUTjBLNvFOeUe5oid0aglu20azYktvixpPE ugc14y6ofuA1P+Q4PsQCPT1W1hK9Us48p3dgb4+gF+GgRxUe7KYZLIskPCGVCT2+v2dQ oOwB4kfZPJVJhlJOGLTuMikhEyNdw98Jl69yp21Rm8gYPEGDSxXUiGbImlktguJo80Ct RXI1oboJfY/1diCBdA3sQfzVLFnX52R81pI9ZxWRYBjbd+MD4leia2hjklta/AJ/S10p uO8qqpivUUnLggydU/CRxQEdSvydMpYVcjEPUdJkuxUXRCFxb1fzVSGGNA5m/bM1sKst barw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OT0J9nUa0R5mof3NfXSILK0sXxLTgD89OJdrBVt3H8U=; b=No1fuP0B8KJh+e8x+4QFfBsALkjbWAJlUlG7TvXVViBBSadm338MK7NBsNbmoKIfcO 6lpW6FqUN9JT4qavZ8iHnfNmgoJoJB4KoN5WiaxLJpsv8kDpSISoaM4V0KiMxHT6kEZt n0qu3KTR8zF5DJ2uTlLWK6JtxXJStFz11iPgKP9icUwo4spf8WvaIKB6mDZmBAufbNdq MBetwaQv0exScrBCIDMGDypNEfGwv+rat7V8m4Vmm0cTyE+fYgu1EBOWTnkr7zGjSmBd msKq0A8Z2VgYzr0KRdwU1/Vglf92bMDnlXN2TKzVXMx3XBIYmNKNU+q7XyITaiwKyqEa ZlXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="MqoJ/xQm"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si18327459pfc.91.2022.01.25.00.32.05; Tue, 25 Jan 2022 00:32:17 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="MqoJ/xQm"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233625AbiAYCn4 (ORCPT + 99 others); Mon, 24 Jan 2022 21:43:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387518AbiAXUgy (ORCPT ); Mon, 24 Jan 2022 15:36:54 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 398A6C038AF5; Mon, 24 Jan 2022 11:50:02 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CEC6760A28; Mon, 24 Jan 2022 19:50:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9462C340E7; Mon, 24 Jan 2022 19:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643053801; bh=7Gn/6wz8LMSKYolBvf8PNaQwMzarikHb90OTHazhURw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MqoJ/xQmo/QPmoh1g4Be8RQ/SiPYLl1U/XkUVvjoMtySUuhZzlPZjlg4qXu3yteb5 A+hbJag3OuslgvnJ9oiko2t+SBRSah8vU09h+hZWXHPET/pV79G/OC9GEP7mJ16Wg6 Pu8fD6boxtq1vpdGyZqDDMJcplVDNjCD98y3hXho= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Deacon , Quentin Perret , Marc Zyngier , Sasha Levin Subject: [PATCH 5.10 139/563] arm64: lib: Annotate {clear, copy}_page() as position-independent Date: Mon, 24 Jan 2022 19:38:24 +0100 Message-Id: <20220124184029.214159326@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184024.407936072@linuxfoundation.org> References: <20220124184024.407936072@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon [ Upstream commit 8d9902055c57548bb342dc3ca78caa21e9643024 ] clear_page() and copy_page() are suitable for use outside of the kernel address space, so annotate them as position-independent code. Signed-off-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-2-qperret@google.com Signed-off-by: Sasha Levin --- arch/arm64/lib/clear_page.S | 4 ++-- arch/arm64/lib/copy_page.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/lib/clear_page.S b/arch/arm64/lib/clear_page.S index 073acbf02a7c8..b84b179edba3a 100644 --- a/arch/arm64/lib/clear_page.S +++ b/arch/arm64/lib/clear_page.S @@ -14,7 +14,7 @@ * Parameters: * x0 - dest */ -SYM_FUNC_START(clear_page) +SYM_FUNC_START_PI(clear_page) mrs x1, dczid_el0 and w1, w1, #0xf mov x2, #4 @@ -25,5 +25,5 @@ SYM_FUNC_START(clear_page) tst x0, #(PAGE_SIZE - 1) b.ne 1b ret -SYM_FUNC_END(clear_page) +SYM_FUNC_END_PI(clear_page) EXPORT_SYMBOL(clear_page) diff --git a/arch/arm64/lib/copy_page.S b/arch/arm64/lib/copy_page.S index e7a793961408d..29144f4cd4492 100644 --- a/arch/arm64/lib/copy_page.S +++ b/arch/arm64/lib/copy_page.S @@ -17,7 +17,7 @@ * x0 - dest * x1 - src */ -SYM_FUNC_START(copy_page) +SYM_FUNC_START_PI(copy_page) alternative_if ARM64_HAS_NO_HW_PREFETCH // Prefetch three cache lines ahead. prfm pldl1strm, [x1, #128] @@ -75,5 +75,5 @@ alternative_else_nop_endif stnp x16, x17, [x0, #112 - 256] ret -SYM_FUNC_END(copy_page) +SYM_FUNC_END_PI(copy_page) EXPORT_SYMBOL(copy_page) -- 2.34.1