Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp810527pxu; Wed, 7 Oct 2020 17:11:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsAfQorvHpfAoC6VnPbzFQK3g7XvAYV2lpmFt1HvqA7AiWXf9W9oUo/wUfy3v4Ue6z1l62 X-Received: by 2002:a50:b023:: with SMTP id i32mr6001055edd.377.1602115862339; Wed, 07 Oct 2020 17:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602115862; cv=none; d=google.com; s=arc-20160816; b=Eh3K+F4eozfpq7vNOJH3Pu2Aayc3lQMhpVLLv+X5KrcrRGgJ1puygM7+3c0Ej0Q02m dNNzHdDsQa8SwFWHbO4XsuI8q1oeh/7kujVztxz47WRQEnvd4O7Wv5amwPE02VSh+xtq 8H6eIOTF+SE01Z6l3G2AhhO8cXiyegbYVVCTGFZO6MmSbW2XbaHBHjTOSdx4qwRM+FOS xvT4P5jpwOsJRJojZRUdGoVwa1blN0o64zwCfdiSrJ2IWf52wSHrvm9c4ADN0YXMLSmJ g+gxWCmlzIPauM2qH0O054rM7h85jGUpk6qYBIVaO6JhqRWkZf2vtD6JiWKG0IGAnayf CrNw== 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=d0dAA5F9VN4+sGCQqnBE/jkgCTNjH8SeaYVmPDf+qNE=; b=f9J5Zw4ULb1uUx5SLQf8X0MPqdzFVfn7edpDcXgU0DlHHPtor3bOpuenQ53tMnzj50 q8bRms8JjjMnE7d0ysLHzSy8CPTcmhihK8rn02s7nUSPedfIIa0tO/IbzgOx8KdPjiv4 +rewFIhbfpm9PN8qnU+lb+GJpSu7yDY1CRJj9SMK5nfVWm2jEW/2pVMvKRpGZYzNCIHT gCs2qlmx5/sS0QiIuNHmLxK9h0G1/u2GY714adHV5Q8V68A0kp0VNzmOOhn/pz8cHiTQ y5pxJas4V9890MrPQu9WSqFtpv8nhqCl6ev7+SIkRvmMtUuuFrXDEOTNdhXKHFAmSxzg N+TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pJ+giGL2; 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 v20si2534748edy.422.2020.10.07.17.10.39; Wed, 07 Oct 2020 17:11:02 -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=pJ+giGL2; 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 S1727111AbgJHAGI (ORCPT + 99 others); Wed, 7 Oct 2020 20:06:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:46036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbgJHAGH (ORCPT ); Wed, 7 Oct 2020 20:06:07 -0400 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 042A520739 for ; Thu, 8 Oct 2020 00:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602115566; bh=bS0l/wIJtDRND8W0efdV/S17wUdgcGyO+U2nsP9YKT0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pJ+giGL2pM4ZgcTYomhm617uKI4eenEIRjun0ZlD1EiY3xuQUnR6NbBV1dG9SrV49 s4RyC/61cIRjvPKdYBShORwp2CIRv7CbAGHuUQy9+sX9HPiguWd1LoGGY2Jor/X2Lz M9ZjiODPL0PQL02R2GZ6E/C6Des4YJGm2xBULdmQ= Received: by mail-wr1-f44.google.com with SMTP id n6so4033198wrm.13 for ; Wed, 07 Oct 2020 17:06:05 -0700 (PDT) X-Gm-Message-State: AOAM530OeKsx8zuMBnn6RJ8u7ovapV25+imll1oxeS08yedKDrXdBXD/ zN17lrZIrjBgI7gvvbVzbv+GvGS55WfJ10BbkyoqkQ== X-Received: by 2002:a05:6000:1202:: with SMTP id e2mr5998788wrx.75.1602115564523; Wed, 07 Oct 2020 17:06:04 -0700 (PDT) MIME-Version: 1.0 References: <20201004032536.1229030-1-krisman@collabora.com> <20201004032536.1229030-7-krisman@collabora.com> In-Reply-To: <20201004032536.1229030-7-krisman@collabora.com> From: Andy Lutomirski Date: Wed, 7 Oct 2020 17:05:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 06/10] x86: elf: Use e_machine to select start_thread for x32 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 , "Christopherson, Sean J" , kernel@collabora.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 3, 2020 at 8:26 PM Gabriel Krisman Bertazi wrote: > > Since TIF_X32 is going away, avoid using it to find the ELF type in > compat_start_thread. > > 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 executing > start_thread in compat mode. Hmm, I suppose I can live with this. It's not fundamentally worse than any of the other ELF compat hacks. Reviewed-by: Andy Lutomirski