Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp817484pxk; Thu, 1 Oct 2020 14:48:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9PZkxt4gzWJuwdmA27T/kf7l88KGwG0+xcuV1fuaBSFqKqpdjmHNuAEcFcCtPqcUMWtVl X-Received: by 2002:a17:906:3e0c:: with SMTP id k12mr10171378eji.189.1601588890204; Thu, 01 Oct 2020 14:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601588890; cv=none; d=google.com; s=arc-20160816; b=rHsx/FU9FFRB+DJ24fTV/oG6IEbsGhr2BLJb2LkpcxfioKam2H18hQKWb/b4caYwM8 rgFmM8Ndtt0UKr+aHNhDLewyCxjKIJwa/jEbIVhVV3pVpa6Csmqab3ACoGcY6HCzhq7g Q16fDzTL/QPJsdgVLhQlhjXBKCem+k2WmweS/D5um3B5o6r0QzcxJrkr3xYIZJGKHQK2 20DkCt1U4vNTfJCgBYIUf144vl20qLXYuR+0T+OGKIgAXSV4IzYf0tjquuyvgmT75OL4 Xa40AFl63Ili/2Sc14QKniYOp14iwwsvsd0nfqAaMB8JZL+s/EqigyeHECaTulz8LPEH aELQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=33d+5YpKaZy67awLHISI1I7yC3fnUn3elft+nSUfo70=; b=onkuQkH1ucAxJgnHtivq3H9RlYs9msI86QciCgzlb/Secv3uXcwHvnpNAvJoWDvqfT K1nwMTSP4td79d4y4zmZlFQ4pEJTVyTYzYPmfuI3lIMrLkJlTmezNc++PYZ6H8qFCOa7 0bYAVl8bc6k4fraCBFG3rR2lh2V1og7+QWbrJFQ1CyyU6pCJl6Zi6Z5hFi1mvmqeDuVT zIHtrvbmJFOfKntL14uLqA9XmpZGeEWAKGJCGn6HpCwTnJaWq4BJ6KZvbRBedl223Hz5 n3drqMUtKgfZIHjEiKRWYnDwCEFZZJuGTffgpFY1GavSahzvvtQFqrP3ZVk6eU32q2GP Z6WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H8qVwXSL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si4414680eji.77.2020.10.01.14.47.46; Thu, 01 Oct 2020 14:48:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H8qVwXSL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727017AbgJAVqn (ORCPT + 99 others); Thu, 1 Oct 2020 17:46:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:36260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726626AbgJAVqm (ORCPT ); Thu, 1 Oct 2020 17:46:42 -0400 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D47920848 for ; Thu, 1 Oct 2020 21:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601588802; bh=33d+5YpKaZy67awLHISI1I7yC3fnUn3elft+nSUfo70=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=H8qVwXSLBHBvlySX3bMRCImUzAtdDhMN0M2WVdSC+BhPdVLHB6JaG2lptLG8PzAn1 bHwzTGKFroIJ8Smx3efp1Xh/JSWfn99GH4C0wWPcBvzpei08/4l0xQp+cAViKWFsbD X6FqmJyocQeew0SkmCZs1A0keIyAwJdpc1d5nNLg= Received: by mail-wr1-f49.google.com with SMTP id w5so330798wrp.8 for ; Thu, 01 Oct 2020 14:46:42 -0700 (PDT) X-Gm-Message-State: AOAM533lD5aFjPzAqkfdlEzgdXuKp6dVAsASWSovHwD5pHnx4fO3sCZg tqHr60nS/niAGdTBvAGlmt+yWbss9LJQYUDJbeUYwQ== X-Received: by 2002:adf:ce8e:: with SMTP id r14mr11091963wrn.257.1601588800854; Thu, 01 Oct 2020 14:46:40 -0700 (PDT) MIME-Version: 1.0 References: <20201001205819.27879-1-krisman@collabora.com> <20201001205819.27879-5-krisman@collabora.com> In-Reply-To: <20201001205819.27879-5-krisman@collabora.com> From: Andy Lutomirski Date: Thu, 1 Oct 2020 14:46:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 4/9] x86: elf: Use e_machine to choose DLINFO in compat To: Gabriel Krisman Bertazi Cc: Andrew Lutomirski , Thomas Gleixner , Christoph Hellwig , "H. Peter Anvin" , Borislav Petkov , Robert Richter , Peter Zijlstra , Ingo Molnar , X86 ML , LKML , Dave Hansen , kernel@collabora.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 1, 2020 at 1:59 PM Gabriel Krisman Bertazi wrote: > > Since TIF_X32 is going away, avoid using it to find the ELF type on > ARCH_DLINFO. > > According to SysV AMD64 ABI Draft, an AMD64 ELF object using ILP32 must > have ELFCLASS32 with (E_MACHINE == EM_X86_64), so use that ELF field to > differentiate a x32 object from a IA32 object when loading ARCH_DLINFO > in compat mode. > Reviewed-by: Andy Lutomirski > Signed-off-by: Gabriel Krisman Bertazi