Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3621279ybk; Tue, 19 May 2020 09:01:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNYBwMYRavpP9cxmndR3nq/9wXFcd/vppwink8UP/RPhfDpuokJflL/JISjFkyFEIi6iMd X-Received: by 2002:a05:6402:1a21:: with SMTP id be1mr17760711edb.211.1589904092319; Tue, 19 May 2020 09:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589904092; cv=none; d=google.com; s=arc-20160816; b=j/v8dTRjZDJ6m9n6f6FBdlHDZireaBcbkGZV7gly+btqwu2RJqAtXBwRqi1k4Z/4iB b2ui08XBlksqouHCyTzi4T1k6WpbhUfridlQbHabSYIlX1QwdokCCStoAEQr4vSpZhTk hVv6TEMQ8VbiM3JvbG6U/43WPf8iRM/nCJD7CZDNodOb1Pti9kcV7TVHw7FQwz+xiljc CwXYaedfkq8Bzm4h1tYMJbxY0f7vlAdJ7vX2lRd2oNw1x0ATO2xURntW5dd8bkpHFW9v pp4n7iMF44bBRFQgy1apXUS2ZClmiSRXzlj448i1TWgrgc9WfIYypmxa0ArM0HKst9Gl pXuA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=tTkkkLXvat2WWEItubKTjQ334RharZTntB+ctrFhAS4=; b=fsi6SY/7XweMRx1CvRUXQq7gJDO7M84mBCHlZjBmv6bftcYP7a0eOiCnCZAWMyoXZE ndm9ddHZJFscVy5UyAmVeEY/8ZKDFr7fMTlCqcth0it+Pz6ZC7yT/GpAPGywrZGZOnIT j97geM0LdH3rmz5NtpT79m5+Ra+I4bEgYsP0ySIpICjv3FBEFgpKGGOl9si2CiAymMIu K0YsFnLrJlOSdh6IfOdgF7IizWm//ZMgqpgIzUfUUGgHZFtwpU4VxHRrYmvabfdbq3Li R+D26bM2FpnFVFe3RPKLav9Oibi8LKtHqHWWnXyY9VhhpEfzTboVwVlZEtFSzSc8eEuG x6cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=L3hadNUN; 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 cn24si7657034edb.340.2020.05.19.09.00.49; Tue, 19 May 2020 09:01:32 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=L3hadNUN; 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 S1729205AbgESP5J (ORCPT + 99 others); Tue, 19 May 2020 11:57:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729124AbgESP5J (ORCPT ); Tue, 19 May 2020 11:57:09 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62F8DC08C5C0 for ; Tue, 19 May 2020 08:57:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Sender:Reply-To:Cc:Content-ID:Content-Description; bh=tTkkkLXvat2WWEItubKTjQ334RharZTntB+ctrFhAS4=; b=L3hadNUN5fAZvUhSyfc2xxUrJN CpVVr0Wfeb4WYagBAbi5Wld7S4mR1lnbVLZWbyNgXzLCQaAPGAyQW3VNBAXs0meRuxX4H5SEYUHEh z/87RZi+MpzeHMze+uTxoglfzotJh1oLer67FSFQJntHbphsGjVQPj/G5VRgD2GjNHjEJyMMiIscO jjtEy5cJJEcO4UDQLMVS82o5zPJaIsyTWjv2VyMAT+saNxo2ie+iP+/GONxHWqadRr+p79p9+M1ru ajfzqvdqvu3AIdY77YhjQW/5g/W0VzOyuTIPOg2ZWrvbM5yWe/NyKTufL0CQYmOSNzsAbAqGNze+L NKLxJf2w==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jb4c5-00063H-1v; Tue, 19 May 2020 15:57:05 +0000 Subject: Re: Difference in values of addresses in System.map and /proc/kallsyms To: Ajay Garg , linux-kernel@vger.kernel.org References: From: Randy Dunlap Message-ID: <86ca00b0-576d-9cfe-8841-29df8d773f22@infradead.org> Date: Tue, 19 May 2020 08:57:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi-- On 6/22/19 8:28 AM, Ajay Garg wrote: > Hi All. > > My system is > > ajay@latitude-3480:~$ uname -a > Linux latitude-3480 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar > 14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux > > > When I see the address for a symbol, say linux_banner, in > /boot/System.map-4.13.0-38-generic, it shows > ffffffff81e00120 R linux_banner That's a static (build-time) address. > > However, when I see it in /proc/kallsyms, it shows > ffffffffa7000120 R linux_banner > That's where it actually was loaded to at boot time. > > Also, I note that /proc/kallsyms addresses vary upon reboots, so I am > a little confused as to what the entries in /proc/kallsyms really > mean. You forgot to provide the kernel config file. Possibly it has this config item: CONFIG_RANDOMIZE_BASE=y You can read the help text for that config option in arch/x86/Kconfig. > So, will be grateful for some pointers from the experts :) > > > Thanks and Regards, > Ajay If this doesn't explain what you are seeing, then I don't know. Maybe someone else can help. -- ~Randy