Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp745070ybi; Fri, 24 May 2019 10:43:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyspj3smP0TpYl3a+u2bwvVS/B1X+0hzSHb3A/jxv0/Qj8Wj6Kv1Pugm68jDTM+BKmZVNbg X-Received: by 2002:a63:eb50:: with SMTP id b16mr32228632pgk.150.1558719832721; Fri, 24 May 2019 10:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558719832; cv=none; d=google.com; s=arc-20160816; b=Le2koQ24jrE7fm7nfKVWEk/bHD+W0hOzORnVUoSEdAk/WbyL/WRB+c0D8BBZsBeUbr IqRO1YxxQyyiAz3L28ZaSDsQaad/TbePo76H7sVSnE1th2a/VbFOGRHEZrMy3Td5CpmT w47t5kL9Nj2WPgstgRITMYJrX0tkaj0noKkBdSEQwQha07LzK7tXQCgH4J2IKIpR04Eg Lzgqhef/0KEEraoNdwd7lLY21T9EnUQl8y6+8EDEIOH70rzWM5oBhFqyR+kxQvTgk3Je Y701lZGqzDjLtuBIJEEYnZLeCeCgWHp+/iWIg705nxKusZ0DWiH+fWA8UkcdhbXUG/Hd V0tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=UVuatY/83bY3UeVfKdH99xDhWyUgBufXtrTBhFg3UWk=; b=e5CRi1dgQXh8vA1LSn7tBmRYcjnG0Pg8Cys5xwtSYRn01gbZaP2Lu1BlR2zPCsZGUK f0hLQn2tdpax0QXRSgpwVxWWYx7Vo82CcplSDCDajmWhapDg9a6t+2H3Y62l6DinYjjN VfAxCUkJlog7jAR6Iku6qfF2xSYjK3I4V5yezS1t3vxut2wAoEX2r1KT7EfYTFCC4Hyv R0cSQ+TdGRP/uLz25fariPszXckYPITLKw8tRlaZNsUmaxRbMqbzBURYPk7Q+cteowmk uadx10iBpME4VSXIH5nIRJmq0kkBzQaehrECyZS0+1sAnXYWHN+YSsEanxhtJXnk1QG6 y28Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d32si4826529pgb.409.2019.05.24.10.43.36; Fri, 24 May 2019 10:43:52 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391230AbfEXRm2 (ORCPT + 99 others); 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