Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1980578pxb; Fri, 5 Mar 2021 04:41:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzmh1Lpp12eK9fhn+hvMXzAVvIwgxKvD46C4I9DPL/kwyWA8gpJK3LHfzOgOJDOOAzbcXE X-Received: by 2002:a17:906:add7:: with SMTP id lb23mr2024795ejb.273.1614948098591; Fri, 05 Mar 2021 04:41:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614948098; cv=none; d=google.com; s=arc-20160816; b=sCXQnF43XpAbZgXYR6tw6N+0JSddTEerldbuc7ou5mCBu2k+m5qloX4DeGoMHTDDDW F9U2mB0BoPrO+CKKO8MDhjey4ggH7WLIJfF+2bED28aHyz/NGm6Sthzw5OQxEml3nblG 6ofJnrDG+yq5lW9jpHqXWADiGdo7+U4/4QVZmqiraSfXZxzgl2m1gSTclxeD26qhBcTc /DQj2DTet+tcy6Wq/fjm6TsOhWeasOD2mTzHRIkRX8s8KJcHnG9FHnw70P+196uf+asD qR7Gm2eSRE55j6JX/8z1zNAeCbyODOH+z94Wq6lY4bwk3ZijctJanZWEfp3++cyI7JjX KdlA== 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=3R3mCGWt+jz3iGWmAnI9cfr/dwA40s405f6mhnWK7mI=; b=UXklFhwp2tYCDDYyFmmB7HpFdhZWF+euedZ8TcIp9STt0/ql+WQVOVMuDQuUu3tfMA 1wy/NW6PI5VG71RgglUrfSRhS31tAv11vwBTqzpa78aZFm0+gu7cEfsyjBSYskx1XNXE jyfJCLv3jp9gQzptyzzM7WHMS0DjNZoxMHXCpKz2KEgTi7hUvNmG1HzY8DUWs5DUwO6c j20UBDbmJF7cXvQc+Ag9oQI9M7289NzLaacQ7PyriFTD4lS9yRMUpPHw7VgNGZ9+ByFa jSl6VaH7CB7Tav9q8IY58yGhY8q4uA2gDQz+3vgp/8ft2XYopfYrLDj+ZcoBE4Hp88lR uLAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vyIzvZiZ; 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 b22si1263064ejj.279.2021.03.05.04.41.15; Fri, 05 Mar 2021 04:41:38 -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=vyIzvZiZ; 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 S232692AbhCEMiS (ORCPT + 99 others); Fri, 5 Mar 2021 07:38:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:50294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233120AbhCEMhS (ORCPT ); Fri, 5 Mar 2021 07:37:18 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 65CF665004; Fri, 5 Mar 2021 12:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614947838; bh=J2D7/x4m0IBsynDiFzOuCySCWoKqTn+QiixGa+F0MUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vyIzvZiZ3ahqTLAJwIb1CgUwt1+8lUAYEiv7MhaYXApJj7DgMv10OgYD7tzUyeN53 289julw0MTmkfE+5vo7OATNqYy5VfwaDx+9TtkOdxtzevmBbRenJFOciB64NVhkaaI xGlxqn8ldaNNQEle4URq5KbZhFpoEJXvhcM9BZZ0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Frank van der Linden , Shaoying Xu , Will Deacon Subject: [PATCH 4.19 05/52] arm64 module: set plt* section addresses to 0x0 Date: Fri, 5 Mar 2021 13:21:36 +0100 Message-Id: <20210305120853.927081823@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305120853.659441428@linuxfoundation.org> References: <20210305120853.659441428@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: Shaoying Xu commit f5c6d0fcf90ce07ee0d686d465b19b247ebd5ed7 upstream. These plt* and .text.ftrace_trampoline sections specified for arm64 have non-zero addressses. Non-zero section addresses in a relocatable ELF would confuse GDB when it tries to compute the section offsets and it ends up printing wrong symbol addresses. Therefore, set them to zero, which mirrors the change in commit 5d8591bc0fba ("module: set ksymtab/kcrctab* section addresses to 0x0"). Reported-by: Frank van der Linden Signed-off-by: Shaoying Xu Cc: Link: https://lore.kernel.org/r/20210216183234.GA23876@amazon.com Signed-off-by: Will Deacon [shaoyi@amazon.com: made same changes in arch/arm64/kernel/module.lds for 5.4] Signed-off-by: Shaoying Xu Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/asm/module.lds.h was renamed from arch/arm64/kernel/module.lds by commit 596b0474d3d9 ("kbuild: preprocess module linker script") since v5.10. Therefore, made same changes in arch/arm64/kernel/module.lds for 5.4. arch/arm64/kernel/module.lds | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/arm64/kernel/module.lds +++ b/arch/arm64/kernel/module.lds @@ -1,5 +1,5 @@ SECTIONS { - .plt (NOLOAD) : { BYTE(0) } - .init.plt (NOLOAD) : { BYTE(0) } - .text.ftrace_trampoline (NOLOAD) : { BYTE(0) } + .plt 0 (NOLOAD) : { BYTE(0) } + .init.plt 0 (NOLOAD) : { BYTE(0) } + .text.ftrace_trampoline 0 (NOLOAD) : { BYTE(0) } }