Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp798047pxk; Sat, 12 Sep 2020 00:07:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+N2F5LJlVGfaYVCKlkk+2oPPnoBVBCkStZBjteHvqAs3S1OONg0dTGZFNF+3/oUuuh3H7 X-Received: by 2002:a05:6402:176c:: with SMTP id da12mr6898186edb.386.1599894449813; Sat, 12 Sep 2020 00:07:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599894449; cv=none; d=google.com; s=arc-20160816; b=j3oKGM54DB9lW8xe86E3a4eZHwzv/l0x/s3CsWJ6nI59VXfs4SjIY/8NuVNAU9VQPM K6lQt1I2xchIfe6Rbk4c2IxP5UaKkYYlmbpxVPSMJiSzVUD29uz6Ipf+a+4bp3HIml7/ jVevmKRII9v/ZrEibJtSeaLpoTC/mMtwFkAgvN3YYWb6bQ8TZeCK/3YzKQzka4eEkEir BcJ6/d4P75wNWLnK3akg6NHer0MtnFki9ckn7QWvEfSEtIaN6FgkL4XeBjRmHbDhRlFT SxGwuxdvgVlJuZm4mh6mMHRdONnzn6tanikZCzs7VS3Wc8sjBYKg9btBgJyi/OzIDULB nfig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=26s0HPiSkO5F2enmBSNRLmPQsy9SIJsrGKcyhH6zYUc=; b=SfcAlNobUGrxdVRBdTF0cUiO4HUFVJwQ5Jz9Mws6MnT2f+I+//MFidfFOAMXNtywWk gtRTml9aoVg6v3qz4Fyh0+Hody4h4C8zAMdDFMHMPfPDqc8otdupUlIGQ+8dkzSNOArY DVBOMHBqViV7odSdp29jH1rv+Vhjp1FaWLu0MhYpwWFtaRJibZmb3TzqY3LlQesdzuEG yhfrwsQ/lBek76ed9BhtCh45zuNDZr6YfxPTuJIoEwZqMLIDn0EVi9sRBX8mERvk++Km c86OTtF4Jg7iDlApCtUQBibqmyBsrcrT8e5/QmNYRNkyIBQV/BBFfzVmG2mELTmbjyjH 9E6Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si2380313ejc.542.2020.09.12.00.07.07; Sat, 12 Sep 2020 00:07:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725913AbgILHGQ (ORCPT + 99 others); Sat, 12 Sep 2020 03:06:16 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:45324 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725888AbgILHGQ (ORCPT ); Sat, 12 Sep 2020 03:06:16 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id B2AD429C420 From: Gabriel Krisman Bertazi To: luto@kernel.org, tglx@linutronix.de Cc: hpa@zytor.com, bp@alien8.de, rric@kernel.org, peterz@infradead.org, mingo@redhat.com, x86@kernel.org, linux-kernel@vger.kernel.org, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH 4/6] x86: elf: Use e_machine to choose DLINFO in compat Date: Sat, 12 Sep 2020 03:05:51 -0400 Message-Id: <20200912070553.330622-5-krisman@collabora.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200912070553.330622-1-krisman@collabora.com> References: <20200912070553.330622-1-krisman@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index b9a5d488f1a5..9220efc65d78 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h @@ -361,7 +361,7 @@ do { \ #define AT_SYSINFO 32 #define COMPAT_ARCH_DLINFO \ -if (test_thread_flag(TIF_X32)) \ +if (exec->e_machine == EM_X86_64) \ ARCH_DLINFO_X32; \ else \ ARCH_DLINFO_IA32 -- 2.28.0