From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DF5BC072B5 for ; Fri, 24 May 2019 17:42:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59CC021851 for ; Fri, 24 May 2019 17:42:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391375AbfEXRm2 (ORCPT ); Fri, 24 May 2019 13:42:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56204 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfEXRm2 (ORCPT ); Fri, 24 May 2019 13:42:28 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EFF5308219F; Fri, 24 May 2019 17:42:28 +0000 (UTC) Received: from treble (ovpn-121-106.rdu2.redhat.com [10.10.121.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 846315F7C5; Fri, 24 May 2019 17:42:26 +0000 (UTC) Date: Fri, 24 May 2019 12:42:24 -0500 From: Josh Poimboeuf To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, marc.zyngier@arm.com, james.morse@arm.com, will.deacon@arm.com, guillaume.gardet@arm.com, mark.rutland@arm.com, mingo@kernel.org, jeyu@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, arnd@arndb.de, x86@kernel.org Subject: Re: [PATCH] x86/tools: deal with 64-bit relative relocations for per-CPU symbols Message-ID: <20190524174224.pdj2hgyni675xaoi@treble> References: <20190522174057.21770-1-ard.biesheuvel@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190522174057.21770-1-ard.biesheuvel@arm.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 24 May 2019 17:42:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 22, 2019 at 06:40:57PM +0100, Ard Biesheuvel wrote: > In order to fix an issue in the place relative ksymtab code, we > need to switch to 64-bit place relative references, which > require special handling in the x86 'relocs' tool. The reason > is that per-CPU symbols on x86_64 live in a separate link time > section, whose load time address is not reflected in the ELF > metadata, and so relative references emitted by the toolchain > are guaranteed to be wrong. > > So fix this by extending the handling of 32-bit relative references > to per-CPU variables to support 64-bit relative references as > well. > > Signed-off-by: Ard Biesheuvel > --- > This is a follow-up to [0] and a prerequisite to the change it > implements: using 64-bit relative references on x86_64 requires > this handling in the 'relocs' tool and in the decompressor. > > [0] https://lore.kernel.org/linux-arm-kernel/20190522150239.19314-1-ard.biesheuvel@arm.com > > This patch plus [0] build and boot tested with x86_64_defconfig on QEMU/kvm + OVMF. NACK based on https://lkml.kernel.org/r/f2141ee5-d07a-6dd9-47c6-97e8fbdccf34@arm.com -- Josh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D3F3C072B5 for ; Fri, 24 May 2019 17:42:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E33F020851 for ; Fri, 24 May 2019 17:42:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oEZ1KGZu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E33F020851 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a3JIpBHx1bb7QEaVIpROiTkjuLhOGheYVaL/mnhpQr8=; b=oEZ1KGZuLP2SNf 8+VJezfL5mXU6wT3A1iv44bceLOGadDXEErbuFMmSEQS7Rdpg85WEA7Vk2rEDG3iap43bQgHzgB2R 241QXDf9pebdK/gWOLYn6iS6MpkpANbsCFyFVjjvtGY5Ygtdn1yro3i5UBpoEWp3KZnRJxWwczMMh eWQPcbrLWWfe2qu5mOmTLlrzduoLKO6svwwHaKF2A46VZNjKIzqCSXmCrCK70u6DVmfbgitMJzIIR KNqdRS+T5s9wa7A0mcavvv20oEsdTH/oBK4VGPB/6VVM/5Z2CUYrGdWgqm8SFssR1jHGgRQQaZeWD B0+kg6ETWD6Q84irLW4Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hUEDA-0007Gl-NW; Fri, 24 May 2019 17:42:32 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hUED7-0007Fy-DI for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2019 17:42:31 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EFF5308219F; Fri, 24 May 2019 17:42:28 +0000 (UTC) Received: from treble (ovpn-121-106.rdu2.redhat.com [10.10.121.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 846315F7C5; Fri, 24 May 2019 17:42:26 +0000 (UTC) Date: Fri, 24 May 2019 12:42:24 -0500 From: Josh Poimboeuf To: Ard Biesheuvel Subject: Re: [PATCH] x86/tools: deal with 64-bit relative relocations for per-CPU symbols Message-ID: <20190524174224.pdj2hgyni675xaoi@treble> References: <20190522174057.21770-1-ard.biesheuvel@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190522174057.21770-1-ard.biesheuvel@arm.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 24 May 2019 17:42:28 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190524_104229_470159_D96BE36D X-CRM114-Status: GOOD ( 15.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, linux-arch@vger.kernel.org, arnd@arndb.de, guillaume.gardet@arm.com, marc.zyngier@arm.com, x86@kernel.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, james.morse@arm.com, jeyu@kernel.org, mingo@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 22, 2019 at 06:40:57PM +0100, Ard Biesheuvel wrote: > In order to fix an issue in the place relative ksymtab code, we > need to switch to 64-bit place relative references, which > require special handling in the x86 'relocs' tool. The reason > is that per-CPU symbols on x86_64 live in a separate link time > section, whose load time address is not reflected in the ELF > metadata, and so relative references emitted by the toolchain > are guaranteed to be wrong. > > So fix this by extending the handling of 32-bit relative references > to per-CPU variables to support 64-bit relative references as > well. > > Signed-off-by: Ard Biesheuvel > --- > This is a follow-up to [0] and a prerequisite to the change it > implements: using 64-bit relative references on x86_64 requires > this handling in the 'relocs' tool and in the decompressor. > > [0] https://lore.kernel.org/linux-arm-kernel/20190522150239.19314-1-ard.biesheuvel@arm.com > > This patch plus [0] build and boot tested with x86_64_defconfig on QEMU/kvm + OVMF. NACK based on https://lkml.kernel.org/r/f2141ee5-d07a-6dd9-47c6-97e8fbdccf34@arm.com -- Josh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel