Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4036419rdb; Thu, 14 Sep 2023 09:50:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJKstWsIatcW8Rr39bIyDyODY6LmaKhkDllpjRmNJ5rfRVA5KakTPMJ0+A1WNxM84tpOWO X-Received: by 2002:a17:90a:9417:b0:26f:87d1:e48 with SMTP id r23-20020a17090a941700b0026f87d10e48mr3474262pjo.20.1694710239804; Thu, 14 Sep 2023 09:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694710239; cv=none; d=google.com; s=arc-20160816; b=briS7uWOFWzIRc9shddSwdAfkKd0VHwB2kLUC3d8B0OIAlbYyFVSuLeWXzo9Y07s1r 5MwLuYNdhcsG7kMd60XvBgUNMf6Jg+wiXMyMOfPOTHc1kY9dkP0G47OOBiY76S7i5aP/ cYNV5JNd4YosGwKcypaxtu6VbzT+QiN/KHjoZR/dbx0aQgGFC8+647toq8Gxda/FoMqH ifpmnBgw+MCjB8+ckT4TSMvO7iAsuHbxdQHwofdaIgC8VALPmLlUx1TNh/KxZQExHmnX oBm4yYilewPsIz5h9he0b2sLwrKgAj51OqQI5HmQ6bX4BQ4Q3RwMt47Tfl0gTpcMFjqX Pjvw== 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=kf6VRRqhWvA8boUZqcpc/MRGoYGxVjM8NNnYnSRa7uE=; fh=n7fF7QC0RNRn6F3FQu0v+CrFD4hMTQOXYoV2ln8SMUQ=; b=u+0uTmAENUq2lBzrcuZ6O6LVkbzl+K7trzGiFpsjUqam9782I/73TX1nIam+K0sVD0 tgyKqgrRLjE5bDZCOLEym4k+TBUhnX22ekP6BZ2bbOt7cdONgZr6A6/vcmZfTKW1zy5s kuNDHESjMk2hbqkaJoNGs3YAAPdLXXP9+s40Igc8tstiG7mdwJ26PcWXlg1r0cA5Zy3o gF3U5BmHl84c43PtHr9DTB71YIlTQ7U7HCuPz7I0Qy9SIKRtXH0lEhYYrlfgj4KUs7tS tmGFvOV1JhyJc6feLGeA1utqPYsrUOBm8LtEmfin9u/qJuP52JR6ejbNhCCRn9FJ+cv2 ky5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CFGjwNmp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f20-20020a63f114000000b00565ee7952c4si1735388pgi.633.2023.09.14.09.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 09:50:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CFGjwNmp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1901582F27CC; Thu, 14 Sep 2023 04:27:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237616AbjINL1P (ORCPT + 99 others); Thu, 14 Sep 2023 07:27:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233393AbjINL1J (ORCPT ); Thu, 14 Sep 2023 07:27:09 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74BDCE3; Thu, 14 Sep 2023 04:27:05 -0700 (PDT) Date: Thu, 14 Sep 2023 11:27:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1694690823; 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=kf6VRRqhWvA8boUZqcpc/MRGoYGxVjM8NNnYnSRa7uE=; b=CFGjwNmpuAEgdme0vO3/8C5kjhVlOdBwx1SCCv3WN9GXKSRctzUa87ktHzkq2LnzkzBUqp RaEnxkzgT3zLzCstadjbBb/7YSq0M5fCpyxPyV0GBcnM1lMRkS5hfovlzyLrFuprA7Jtw8 xjEFw9KxtUwMt835UcKDwb21OAdY5hzweNlh0KJcN8OPqoOK2d3QmB4UvRsjQtOBN3zQ3u pm0ux8mUBaViQa1AiyiZIZuPDQzTOjNEmy3henLYyRtUetnQcxcXQwnIGSsFiXCv222aeK 6QOz19yia53lQLEnophDST1AZdqhLhagsvAuTv1wYGzcYsn0zbGl+m+KYvfPzQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1694690823; 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=kf6VRRqhWvA8boUZqcpc/MRGoYGxVjM8NNnYnSRa7uE=; b=0eR8CZANFYxxd4f1bwmyTDhWKgt7CqauMWpMQBgiO/tpvNHiTxqgfY0Z019FUkyUTd4rQk Xuf6jDCnc1h/aBBA== From: "tip-bot2 for Nikolay Borisov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/entry] x86/elf: Make loading of 32bit processes depend on ia32_enabled() Cc: Nikolay Borisov , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230623111409.3047467-5-nik.borisov@suse.com> References: <20230623111409.3047467-5-nik.borisov@suse.com> MIME-Version: 1.0 Message-ID: <169469082322.27769.6028739507798340170.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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 04:27:17 -0700 (PDT) The following commit has been merged into the x86/entry branch of tip: Commit-ID: 5ae2702d7c482edbf002499e23a2e22ac4047af1 Gitweb: https://git.kernel.org/tip/5ae2702d7c482edbf002499e23a2e22ac4047af1 Author: Nikolay Borisov AuthorDate: Fri, 23 Jun 2023 14:14:07 +03:00 Committer: Thomas Gleixner CommitterDate: Thu, 14 Sep 2023 13:19:53 +02:00 x86/elf: Make loading of 32bit processes depend on ia32_enabled() Major aspect of ia32 emulation is the ability to load 32bit processes. That's currently decided (among others) by compat_elf_check_arch(). Make the macro use ia32_enabled() to decide if IA32 compat is enabled before loading a 32bit process. Signed-off-by: Nikolay Borisov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230623111409.3047467-5-nik.borisov@suse.com --- arch/x86/include/asm/elf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index 18fd06f..a0234df 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -149,7 +150,7 @@ do { \ ((x)->e_machine == EM_X86_64) #define compat_elf_check_arch(x) \ - (elf_check_arch_ia32(x) || \ + ((elf_check_arch_ia32(x) && ia32_enabled()) || \ (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64)) static inline void elf_common_init(struct thread_struct *t,