Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp354281pxx; Mon, 26 Oct 2020 10:01:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzXC2lXKPeGLDkftuaKtgY3Bce8lJbp1WtKZGsNxF68E2yQnZAKyWGBAlK0FHdBNgcIWAO X-Received: by 2002:a17:906:3c44:: with SMTP id i4mr17154322ejg.177.1603731708111; Mon, 26 Oct 2020 10:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603731708; cv=none; d=google.com; s=arc-20160816; b=TOgwKzVHw09Yt83QOBQXJmm4Al/n9afLbUaxf0u4Ch1E23kB2tX4OSw0BocQ21Wf6l xuDXOta5OCtWE/dF+4rxIWyGK3W1KQlMIXxKxL/zem9gL+X9C4LagvgRaoDR06+KLm5T XO7s58Q2yBQBpsFqQaJ/Oez0f4S8KnmD2Zf7LjxPmPKuH+AfwVBkpCRb43qQZFadqA4P pmbrk5h/kAkSl3AxAXAcjy6qUp2Juvr6ExRd3GxnoKAXNkxVt/RCwjbjYdtepq5zysHV /0kvVVknTYOlH3KjaPwo+AcSxRJUnXpshlaWAoxFa3DhkvejiP77vPRcKiz9oeFbfD5e NGeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=4Rqeto/78InwKJzU7bGqoAEw5BDhCuPHB0mKAB98Bt4=; b=cBrcFcoaHjNtVK77iso17s6yv/57qpITphUMUL2XvI7YHxOTLKk/NllE1qu+xsDt2l jTxB5jcQyd0VAybrG16QwbrgnhsFtHIzf4YtviwJOTptIfR8eAPsCXwet09MVWX3tCgO 2XLIuL0offmtbYTbRByd76F/Q90hiwox2cg0Hswhd76rnpludUzZY3FNsQHpt2ZmiCd1 adNVfVcf6GT8AiPLStCogTA6pAPWmgPV5z8G86FRfw/fZ5QJy92iRjOsRYB6ZjpylXY6 ytlc4eDv+QML4RwYgMUkzNyCPxXeA5IMdlCwvWhICNUMdyGD7AZLn8eis+LYy8dGza8S EDGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iUcE6o1g; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kaKbR38Z; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z11si7503226edl.450.2020.10.26.10.01.23; Mon, 26 Oct 2020 10:01:48 -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=@linutronix.de header.s=2020 header.b=iUcE6o1g; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kaKbR38Z; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1775677AbgJZMwl (ORCPT + 99 others); Mon, 26 Oct 2020 08:52:41 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:39830 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1775662AbgJZMwj (ORCPT ); Mon, 26 Oct 2020 08:52:39 -0400 Date: Mon, 26 Oct 2020 12:52:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1603716756; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Rqeto/78InwKJzU7bGqoAEw5BDhCuPHB0mKAB98Bt4=; b=iUcE6o1g20eAircKAMgrK2paVuCTBohGopJ8eDJNP/IpRaZuzhnw9U/+vXK/hyWtmb4TbB YLzLEw0I317qZqLhcIfbtSzDoqXc02NuqJ91jLVq8a7j8w3MUHoAppwhMmBJ7bn6TTOmdD YARPiGtr7knr8b+aWwdvNJhtiVhgn51f/GeFnee57vqzrhE/Y0sMuGb13XCoAKmhYCKerZ IaD7yXqFNlDRQHFTATa+OM+T5R/lT/VCvzsvD8OECgfKJQ2GxHTP0zO4oRD0iOd08F6ngI BmE6C7S+1YBrGV2wyc5vrsrWPShFODufMu85FWSTzR1dbdQ2mwCRzPMf6jTbyg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1603716756; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Rqeto/78InwKJzU7bGqoAEw5BDhCuPHB0mKAB98Bt4=; b=kaKbR38ZDekV66+6ZAGnSL/g5A6pfTHRzQkRYI8nwP/+aQo4CNBfRNR5xkkQ/c1/GatZjQ JJ20a6p1PiTf9BDA== From: "tip-bot2 for Gabriel Krisman Bertazi" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/elf: Use e_machine to choose DLINFO in compat Cc: Gabriel Krisman Bertazi , Thomas Gleixner , Andy Lutomirski , x86 , LKML In-Reply-To: <20201004032536.1229030-5-krisman@collabora.com> References: <20201004032536.1229030-5-krisman@collabora.com> MIME-Version: 1.0 Message-ID: <160371675602.397.8513905247826263985.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 2656af0d5abfa26d7f1e40f92e9953fe155b950a Gitweb: https://git.kernel.org/tip/2656af0d5abfa26d7f1e40f92e9953fe155b950a Author: Gabriel Krisman Bertazi AuthorDate: Sat, 03 Oct 2020 23:25:30 -04:00 Committer: Thomas Gleixner CommitterDate: Mon, 26 Oct 2020 13:46:46 +01:00 x86/elf: Use e_machine to choose DLINFO in compat 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 Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201004032536.1229030-5-krisman@collabora.com --- 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 b9a5d48..9220efc 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