Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1960727ybh; Fri, 13 Mar 2020 10:24:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv5Kj46DFAxn2rA2CfzVI7qvW4NzAHuIIwiz8f17NqHzSLpo6ZRVQYvA7j6hs9rC922OzMw X-Received: by 2002:a05:6830:19ce:: with SMTP id p14mr10182265otp.362.1584120243116; Fri, 13 Mar 2020 10:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584120243; cv=none; d=google.com; s=arc-20160816; b=KASlvkzfaUeB/f6LO7VAnBTmDMQ4M6K3hsFVJZbqNdJpvWokWFjY13xulzGIBZ+hpY sY9ka8/Y02oc1bniDZJsRvH8lmMigOaWXgd+PecDM0u8u54JKthgXg6p7kYpklyKTikC OtmKT+gn+16SnkbQ+YRAAqN/DJ1VQanb5czfln+FXZa8BrYswVO65U1eYc8a7St6jbOH BkDDgU/GrGS4wIph+ECPEb/0AxTUIOqyLM6wbRzUfS4VcqzE1+PHvKDyphLLElw1N7Q6 FDuBfuSmTJZrtbAHV5LobIKqnyuFdRmI+EYruKe6PIhXcSRjEDN08r1s5QzPA6CtdqCT fhYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Ih+nG2Kiw8hT76L/vmQQGrhSjnKlvJyhcVO353Dkwk8=; b=DL4dV69TvdEftydSDGdImkv/RUeIZ98HiLI74UNVyJUWcfG+7i7NTRNTqd+ypRv7XG 8tujWWYkVnRxUPP+3nIAmmsdEYXghDWW0Xvuh2uhwZ+6ZhZfEBRKopXtRAxbEYZuw1YU giTFn4O+wDVz+IADaVvG6ClUvRVV5aL+zpEoasQzw3ODpXhPX0xEh4Kc+NVUYFOwMgiW ZzK0XgR4sm/a5xZ93HU1LsuNnEkV0xaqrcgWWJOYeSwOZaxXsSbriJC8U8YuJ3YNDNga wpz8js2CLe9IHsV8brBPPIHuSQ9TcJZirbX4EPV6gRvOteAXoLW9SNOehz1/s3NS35AB 6MCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=fft2c0p2; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si2944993otn.141.2020.03.13.10.23.48; Fri, 13 Mar 2020 10:24:03 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=fft2c0p2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726808AbgCMRXF (ORCPT + 99 others); Fri, 13 Mar 2020 13:23:05 -0400 Received: from merlin.infradead.org ([205.233.59.134]:37162 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726461AbgCMRXF (ORCPT ); Fri, 13 Mar 2020 13:23:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Ih+nG2Kiw8hT76L/vmQQGrhSjnKlvJyhcVO353Dkwk8=; b=fft2c0p2/PiiLEOjg+q4csveQL HdaNCQ88a2DRCpddJW8217lXe47Gfz+RkrPHQugjHG3TVz0d4vz+sM3aKc8awh1GCAQwGlk8X22LA m9FfoGi5uZS93fR0QSHP2U+LY/QtoRnOhB9HigJRqe6fr3tEYZy9AcjTZQbQ6DCWfBNc5aC8H4nDQ fNt/yFAz4fNRI7frO5my3/LGKd8YsB6PKORs67HHxn8xNXZf3RIQR1nBNePiki2jKc54jLiUYZNvX +8YG0VjC8c5iuQfox+VykKymQkHB6S+NsN7iXfAynzFou3dymyYIEWNRxeaJZOfbVOfYVqt20fY1k +oRnEkmw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCo1U-0002dd-AZ; Fri, 13 Mar 2020 17:23:00 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id DC47A305F2E; Fri, 13 Mar 2020 18:22:57 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A18A92BE08CBC; Fri, 13 Mar 2020 18:22:57 +0100 (CET) Date: Fri, 13 Mar 2020 18:22:57 +0100 From: Peter Zijlstra To: Brian Gerst Cc: Thomas Gleixner , Josh Poimboeuf , Linux Kernel Mailing List , the arch/x86 maintainers Subject: Re: [RFC][PATCH 04/16] objtool: Annotate identity_mapped() Message-ID: <20200313172257.GC12521@hirez.programming.kicks-ass.net> References: <20200312134107.700205216@infradead.org> <20200312135041.641079164@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 13, 2020 at 12:46:05PM -0400, Brian Gerst wrote: > 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. Indeed. Objtool would be happy with that. And it seems I can still kexec a kernel too. Thanks!