Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp428479ybb; Wed, 25 Mar 2020 02:36:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuWyMGaQbNzYGxBy1c8CuDeiFcGhofOEUTHZfJ6rTDQN4dpIC4PD9+aOvwRSw5NLkZvWr1R X-Received: by 2002:a9d:709a:: with SMTP id l26mr1725476otj.240.1585128987368; Wed, 25 Mar 2020 02:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585128987; cv=none; d=google.com; s=arc-20160816; b=CNJRSVIIVEkX7eHgNmTVaP+SJy/C7heDSCM4ze2N3T/aiMCtm7+Hv1lNY+DV9GxlH9 9t56PN3KNp8WL5RSGRZb3GjMa53p7X+FAHd8TNMbke8E7V5gVZnlXzQuVCqnMfUK4Ko8 HRcpKZ3p1jYKxSBSGjkTtDliiz04M6cQsPQjElF/Wf0XeL0acb/hsnKiEdU3ETsw17YU pj5ZZfBWUALKkUcqumNXNAkKwBPlSW9xrTPyYSISa4yKuYA6S+SHzidaZ6IN2EfbXdbP Hj/SxO0YdQpuUIic1lNtrq2NzqBQoYBfcpEKLCYX/s5t1f9fbMhcNAuC/78ZXmgdXlP2 20rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=6/p7LW02XG6fZE/AfYLyE/bRK0jYCNsbUhf7Fod/HMg=; b=aLMhQLYYQ3FXLli0o6eTVM0cTAd6mPVM01x3D0ibEXX7NvdewneQON+oXoqTj/YTtT JVbWSFOUwlkzuqrfpSAOHA9w2BNgBEqsRBOgYz4eTaTTWXkmBUHoI8n5UuQDoU6NygVT UGF7ggG/5ahfdA0Rb2UFnm7utdRL2tRk5/eFOpCvLyOWLkbL4P1oBcZRFQyrszar34vH zyhBEr2vK2gWS4hQJpeNnOpwDerKc7rNDU7vsc/WMnYgZY0yKclHrxU79jz8YoY5tciV 6Sc8HY1GodcHSe+HUDDrO7zNruZYREtE804KXzr9+JcoFWnjUHmPa8ed2w5HvavDs5l2 g35w== ARC-Authentication-Results: i=1; mx.google.com; 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 r184si696817oig.35.2020.03.25.02.36.13; Wed, 25 Mar 2020 02:36:27 -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; 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 S1727320AbgCYJez (ORCPT + 99 others); Wed, 25 Mar 2020 05:34:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:59346 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726262AbgCYJez (ORCPT ); Wed, 25 Mar 2020 05:34:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4ACB5AA7C; Wed, 25 Mar 2020 09:34:54 +0000 (UTC) Date: Wed, 25 Mar 2020 10:34:53 +0100 (CET) From: Miroslav Benes To: Peter Zijlstra cc: tglx@linutronix.de, jpoimboe@redhat.com, linux-kernel@vger.kernel.org, x86@kernel.org, mhiramat@kernel.org, brgerst@gmail.com Subject: Re: [PATCH v3 04/26] x86/kexec: Use RIP relative addressing In-Reply-To: <20200324160924.143334345@infradead.org> Message-ID: References: <20200324153113.098167666@infradead.org> <20200324160924.143334345@infradead.org> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Mar 2020, 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: > > vmlinux.o: warning: objtool: .text+0x4c0f1: unsupported intra-function call > > Replace the (i386 inspired) pattern: > > call 1f > 1: popq %r8 > subq $(1b - relocate_kernel), %r8 > > With a x86_64 RIP-relative LEA: > > leaq relocate_kernel(%rip), %r8 > > Suggested-by: Brian Gerst > Signed-off-by: Peter Zijlstra (Intel) > Acked-by: Josh Poimboeuf Reviewed-by: Miroslav Benes M