Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1925891ybh; Fri, 13 Mar 2020 09:47:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvNVJtFqZ8XMsNDgno+0XwqLog08BNnfRhwIDV8KsD7J2OqGP/rtnUZBmK+Fag9nq+kEWqO X-Received: by 2002:a9d:2c44:: with SMTP id f62mr12247716otb.7.1584118040123; Fri, 13 Mar 2020 09:47:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584118040; cv=none; d=google.com; s=arc-20160816; b=VtDKJDz4MOSu4bXlUxBEgR4dT8+ytdbnGfqM/u375OeTO4L58Gjuem400AqUIavoV1 BhtXZl13fjU/z9Vag5PWZGzVbWwv8+4K3njt0p0+3+nCxnGzD8eHAeTFNSMEksC+q1AJ 3SP17k1/qEVY4K9koREMiX6Cepkx9MZVjiqzGXskzQ27hTXf7WLnHVzU/xOn6CDkKbnX nJZG97mMugruwy99bu7mAFs+ZOOh1kCLEKI4ivf4+ipnJ6YjKH31oA6iqkVv80GSOX1k PWCofin+R62daGvKLLS7rudS45S3DFR19aIMzn8GjbtCRL5vohPqfVodvURXbJK3rnZX xejQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vLfO+OW4oRiObD1mcWwejLJW0KZ7ehp7OtU4EnfKGnY=; b=qpJrY+Tk4q8aWmt1WHCI9yNqKOSQ/IV06ZfwxOcGMcz3VnuFJX2KL0MbYVL6tnHeQR weBiLdNrUS0/TnHKC9E3gVVX2enDQNmVnwxDSwwmtTbGMi8PtKh1jmyJQrW7aRy8U4Ko 47L006PFxYVVxqr7ZMrFeudsN2vDovR3Y3YTOHgaL8IvAbaxAgh6mWmgC/1FTMNqs+i4 55rkV9AJAQnLo3HINL/oz3JTxYhEnXJB6sbQOe0Ur5usRfrDzNu+qKu0hLo2PN2LKzTW 2jipVnSMibDtyAZxB7WQz3tVw8wf7YTs3c3LCfC5rUp+ycjTlHN6wcDlxbBCdgK+5ixp 9FSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K2dbZzf0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si3028738oih.95.2020.03.13.09.47.07; Fri, 13 Mar 2020 09:47:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K2dbZzf0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727002AbgCMQqR (ORCPT + 99 others); Fri, 13 Mar 2020 12:46:17 -0400 Received: from mail-il1-f195.google.com ([209.85.166.195]:46497 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbgCMQqR (ORCPT ); Fri, 13 Mar 2020 12:46:17 -0400 Received: by mail-il1-f195.google.com with SMTP id e8so9502350ilc.13 for ; Fri, 13 Mar 2020 09:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vLfO+OW4oRiObD1mcWwejLJW0KZ7ehp7OtU4EnfKGnY=; b=K2dbZzf0Nn8BHIO22kvM9U0yfYXu2gWzb0d+PzeEv0ZsYACUferpfjoQysiSoLipXP O6kLUYk1bfULHeyZXR7uRfYuAw5kiNGKuTYcbrklHzW+UDxegCDKW/x+ibmhmp4D3diU yCMrZ81OoBxyoatFMa6cfN4CiTS/cOrb8S5qBN/Cr9wHuJs2S+NxbT+KK/UdOmby1Jg4 6/T2C1i2Gjs0/OLYJdKpkb/SoHRbMU1MY/9xGK9HkUPVQG/AdODm5piTppHYZbeNXyTP u9mXEifEdVt2qwn4bBbkXhpx6xMMcwvUea9MatKGuTP5jBDugt9EbneoL1k2mRuSr5rG M2hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vLfO+OW4oRiObD1mcWwejLJW0KZ7ehp7OtU4EnfKGnY=; b=UL/Zu4xKm0KxG7szpa3yjKFVI0WXoRRpidIF5hHfLY2s1BkW6NiJ1nQZEKbfWilJQL mtGW9zfT913GuZpHlnj1AVCT57B++SGhPvlRjX8aHlp5Otz7Yw66cj4svu31MJdlQhJU uMW8KwVVEhloYDhTT5hrR0i2a/3zf32fPHgy83a76CoFurtWuCBZ9H3DxDFKByD3BdW9 x/tTI63vu00GrzLtfXMxF1j68Ive+08l+XJ016KoWLb6I3kQs5bbfzI6rQDHh461PHaS ySsgH5QNS8txl41Jvtv5ud8u/E2NMmQ6qZ88Z2OKO6jGtmEU869hb4cI5VSzO9PdKPV1 G/Og== X-Gm-Message-State: ANhLgQ0JIpsTfz2MkN+gFur5hJS9/A+WT4fP36R65JWXTAmgYZYGlvsp OhYWtJ94epv9GBjs3RDgpBCctUx6ubOY9bqC1w== X-Received: by 2002:a92:dad0:: with SMTP id o16mr13665643ilq.27.1584117976392; Fri, 13 Mar 2020 09:46:16 -0700 (PDT) MIME-Version: 1.0 References: <20200312134107.700205216@infradead.org> <20200312135041.641079164@infradead.org> In-Reply-To: <20200312135041.641079164@infradead.org> From: Brian Gerst Date: Fri, 13 Mar 2020 12:46:05 -0400 Message-ID: Subject: Re: [RFC][PATCH 04/16] objtool: Annotate identity_mapped() To: Peter Zijlstra Cc: Thomas Gleixner , Josh Poimboeuf , Linux Kernel Mailing List , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 12, 2020 at 9:53 AM Peter Zijlstra wrote: > > Normally identity_mapped is not visible to objtool, due to: > > arch/x86/kernel/Makefile:OBJECT_FILES_NON_STANDARD_relocate_kernel_$(BITS).o := y > > However, when we want to run objtool on vmlinux.o there is no hiding > it. Without the annotation we'll get complaints about the: > call 1f 1: popq %r8 subq $(1b - relocate_kernel), %r8 It looks to me that this code is simply trying to get the virtual address of relocate_kernel using the old 32-bit method of PIC address calculation. On 64-bit can be done with leaq relocate_kernel(%rip), %r8. -- Brian Gerst