Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp412107rdb; Thu, 30 Nov 2023 08:00:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFD8Khu4bqlN5+rcveNibC40dnKvcvH47YpxXNPJU5lzaSi+0zxkHjiuch0pu22IuuOWnR1 X-Received: by 2002:a05:6808:18aa:b0:3b2:e6a4:e177 with SMTP id bi42-20020a05680818aa00b003b2e6a4e177mr28184084oib.51.1701360033630; Thu, 30 Nov 2023 08:00:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701360033; cv=pass; d=google.com; s=arc-20160816; b=mnlrdVG1vP53WXg2uWxq+yiTLz9Wtx8q+cRUEhRCulhe2W6nxAecWtz7eNQfCCSN6D vN2DTp8LU4Xxxx4+6G53WtRg0WHo/ajugC9gn2Hd0dfFyzvuv5dQ7weFV6U2Jb+Zm7ik m+l3nLlk/xHlb3XxpU5M4/l5788gipXdrXXxhFy9mxis2fCEjxc2I3afGC2GY2T8DZNF 8OQUNqIoOfLVf6zYfTTvZo/IzRjd9Nmb5zYf1Uq9F1qkh5r3UpdG8t5HVJL+tQikYshS m8dPjvXPBZW2qQ/R0fR0om9AsFQKXsa042bpzNSgxp/IFxYhFflG3KbKxpCqLzXbGYyt piPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=x/aQi3HMSghPNdqzDfkeTjij54fYacivhcx/Uj66rjw=; fh=6LYrjt2C8+n8oZJqh4UfKQQIbZx/uXWb++PjYthlam8=; b=gubyOKasLIael1KMLqvWthfDiSHWR3ou7Zi6/F+uCZjjSBf0c723sNFbEVD14Lek0b dMMwvbZiGW44Qhm8LRkR51cFu7yzHxBHKGNiENUVWVty2G3+ovb3JQktXKG9nE7JufeX Q1Puj0J1ACqnwB10rFDXjpnSe0rKEMuClyqPN79modpASI3AEAVBJZx8emSlBH0mqvFE RY5EK/9RtdVM0yytLgelu+JXVKH3g0yz6c8N8SHNNXfT6r8IOuIvD2ORThgYvAGaiWSP Fp2bi0qE9DvU3qDjW52yrsQA/CtEjlF/4yGhlbZ0HBMOpFHO96WUTR37cTEkQrJ6g8zc FTkg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=yQiRH+wn; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bd22-20020a056808221600b003b843b5ea3bsi594413oib.18.2023.11.30.08.00.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:00:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=yQiRH+wn; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id C6FCA802EE59; Thu, 30 Nov 2023 08:00:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346477AbjK3QAQ (ORCPT + 99 others); Thu, 30 Nov 2023 11:00:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346463AbjK3QAO (ORCPT ); Thu, 30 Nov 2023 11:00:14 -0500 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2041.outbound.protection.outlook.com [40.107.7.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E09D90 for ; Thu, 30 Nov 2023 08:00:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UebiB1w0t+iS4KmnCemAGmWztkpZOSWyy8jf2yf09UFvHwrphYixGaVeet9G+I12miRzIhF3KL7aIKYvWneGsttu+HqxHo4+NKvWTjBqzQMaqKkeqmfaVt7taOBGdMzQQ7Ox3/W2cEIVdRkMEejYPX06jw7QFvZT2XNCmm+DYS+gvUdcsZEQ/Dhp2JQfqzCtcxz8Z0oLP6YrTQueAU/11csGHaEJBamvPViA1mYhLxgUXx8cQ5cljxY2EVPe/mpRxmhYxiFs7Ql6mBzdfs4tqCfBiyR28j/MF3ZAFSt3T/DLkT0/44f3/NfO4YEdqyrto69crxj9CJNNjw/B5t/8aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=x/aQi3HMSghPNdqzDfkeTjij54fYacivhcx/Uj66rjw=; b=FqaYgKtTtIo1oMloW++Vpy2INAzAQ3DGgRaoC1ejSJc9gDvTNoW07+VLkK6EUUJp8942ZhzcRUBTmYUEsf6MHhGvOEkr52o7rQ4tBI+KPLdoWjvRgyx0xRvid2w4DbCvYLDtalBQZ/OyXezJRuTsCs+sqryJ1S51yGMlnLkQ412wKEHSmtCWAQJuaR8tepUi5WF9PWaLUa0/px4IlkZxTeh/FNaSLDjyzWHlLAJkwqO8kWEyxf9LPbwGQgOkCLXL1WknaU+0fXJpsAa5iL3G1mGWU46csW3I1cNocvz3QNUpgenxvBbQi0GAuG1QhXp3FvUjkvJ1QiEhgRQPySnnRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x/aQi3HMSghPNdqzDfkeTjij54fYacivhcx/Uj66rjw=; b=yQiRH+wnTnhluSTEvjRLEvtfd87UNMXUCxcDhm2Q0vCO+wnUr4FyquTCxfuadkuzEpsvEZtudTSFeIXuegL+UVt8VBFPNj29K0Gm1X5gLcK4GUH9QsewtbXAc3VB1qktgEj76dzM6a0m8AOR82j8+JV5NstbK/l3vStPMBVTh3NADE5ehzT3SjypWPn72ltn9WN+E970cMVpDVfMd0SLkPHPX8xrlwx/ugsxeQRJrTrcYlLkkLrBEvUxlidx484KaHAqLM2rKpEYzobVc80qX2CWL7dcOTH8tbEYKBV3tplgVYGo7v4i1KjbbocRIOZBixQ/lHjw9otO07nuJKWPmA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from PA4PR04MB7790.eurprd04.prod.outlook.com (2603:10a6:102:cc::8) by DB9PR04MB9819.eurprd04.prod.outlook.com (2603:10a6:10:4c0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.22; Thu, 30 Nov 2023 16:00:17 +0000 Received: from PA4PR04MB7790.eurprd04.prod.outlook.com ([fe80::e665:a062:c68b:dd17]) by PA4PR04MB7790.eurprd04.prod.outlook.com ([fe80::e665:a062:c68b:dd17%3]) with mapi id 15.20.7068.008; Thu, 30 Nov 2023 16:00:17 +0000 Message-ID: Date: Thu, 30 Nov 2023 18:00:16 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] x86/ia32: State that IA32 emulation is disabled Content-Language: en-US To: Borislav Petkov , X86 ML Cc: LKML References: <20231130155213.1407-1-bp@alien8.de> From: Nikolay Borisov In-Reply-To: <20231130155213.1407-1-bp@alien8.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: VI1PR07CA0271.eurprd07.prod.outlook.com (2603:10a6:803:b4::38) To PA4PR04MB7790.eurprd04.prod.outlook.com (2603:10a6:102:cc::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PA4PR04MB7790:EE_|DB9PR04MB9819:EE_ X-MS-Office365-Filtering-Correlation-Id: 593118f6-09a5-4167-cea7-08dbf1bd724a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: siw/F+SBupMhCfygvExvkcAppL7n/xdduAXSVjgXbX/Hfg17J+WtDXHSyHJqrT12ExXj9GKff05xS5kjO89aIFjKh+0+k9QV1t1cIUwUtU4sW2KSfSUGG9pCi+lrYGO2f2eMCgUiyx4Gm027XNG+GOxIcfUuo1yoO7td/TBVmVvtH+e2IJjeoCOEv/OCm9usw1+7F68clA4/VUPOBuhk+DMDbWDoQThVDnqf09/Ojtoi4u6yB14hmsrPpaTDWKlFaYcBvOZGWURQl/FY3XvqOlwphtScUJkiXanPR4bbFKkDLxedWJ8quuKt1LhvZ8H901CG5LNsEQNIx2wztI+OjYPw6GM8kY7Wu8g0bZjCbDeBF96KW1sg6bsTjcTkVhShvoBNtKCsli/kWoA9+1gjQX+22ra3Tymq49GLOReA0djzA1DaFoAYL6XGKu1Eggx3RJ7E6lAbKm8yCJER9c9ruM776HJW46Uw+tVlQF3wG6AZ9C/+CPCN5KccTQF3JHhHV/oEJy/eSMtaBvJLMJdKDuaxUK/1hoLw0rb8UJnYxnNl85lNpDSR3SbKe1t5WzgkJoJIzdhpY/acMSBwAu6If4lz8G2wu+WD+rYdehJmPDqEfzZ/Wln38FF6HZ/d0TPWqW+WBJxg5sDlHnlnF4udNw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR04MB7790.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(346002)(366004)(39860400002)(396003)(230922051799003)(186009)(64100799003)(1800799012)(451199024)(31686004)(2616005)(6512007)(478600001)(36756003)(38100700002)(31696002)(86362001)(5660300002)(2906002)(66556008)(66476007)(6506007)(316002)(8676002)(66946007)(6486002)(8936002)(4326008)(83380400001)(110136005)(41300700001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eG5MQlUvMk03MlN3ZE5xUkxnTmQ4SVl2VmsxMy9KQlcwY0pyeFhxV3V1Q0gy?= =?utf-8?B?ZUxmWjBWWXpkeUFsc1RMVW9INWJYUW5HVDdEekRuUjZodW1nSFppMUJKL0Yz?= =?utf-8?B?ZW9OTnV2cTkrZlFVUXh4NXNjQXg1TUZlNjBURjF4bVI0MnFHOHd2TjFwalJX?= =?utf-8?B?WTQyWDFBbVdiQ08vaU9DQnRYaEhSSVNoVzUvQUVBamdWUDF4NUxacE1HT1lP?= =?utf-8?B?ZlZ0QTJCZVlPd1NDdEVReFB5YTJKS0dSdU85ZmN6bURWZWEvWWNHTTFpaS9C?= =?utf-8?B?WDE2cWpoZFlMQXVIcVE5V3dRODFYTTRIK2NCcTRQS2NIS2dvTHc3WmthSmM2?= =?utf-8?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WEQ2Syt2aFlxUTh6ckdE?= =?utf-8?Q?o6FfWUHUbpyDyG31qy+4i6S7fd9bFEvTpe5CsOPqFrWY?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 593118f6-09a5-4167-cea7-08dbf1bd724a X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB7790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2023 16:00:17.2584 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lpbVT+vgJPdymPDb1fzpLqSaK4BJK53lEPW7MhOOly0A2RmWvmRmiLNkshhmLv9Lbix0KCO43bpJFOyh5+toJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9819 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Thu, 30 Nov 2023 08:00:31 -0800 (PST) On 30.11.23 г. 17:52 ч., Borislav Petkov wrote: > From: "Borislav Petkov (AMD)" > > Issue a short message once, on the first try to load a 32-bit process to > save people time when wondering why it won't load and says: > > -bash: ./strsep32: cannot execute binary file: Exec format error > > No functional changes. > > Signed-off-by: Borislav Petkov (AMD) > Cc: Nikolay Borisov > --- > arch/x86/include/asm/elf.h | 2 +- > arch/x86/include/asm/ia32.h | 9 ++++++++- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h > index a0234dfd1031..1e16bd5ac781 100644 > --- a/arch/x86/include/asm/elf.h > +++ b/arch/x86/include/asm/elf.h > @@ -150,7 +150,7 @@ do { \ > ((x)->e_machine == EM_X86_64) > > #define compat_elf_check_arch(x) \ > - ((elf_check_arch_ia32(x) && ia32_enabled()) || \ > + ((elf_check_arch_ia32(x) && ia32_enabled_verbose()) || \ > (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64)) > > static inline void elf_common_init(struct thread_struct *t, > diff --git a/arch/x86/include/asm/ia32.h b/arch/x86/include/asm/ia32.h > index 5a2ae24b1204..43e02b52ad19 100644 > --- a/arch/x86/include/asm/ia32.h > +++ b/arch/x86/include/asm/ia32.h > @@ -2,7 +2,6 @@ > #ifndef _ASM_X86_IA32_H > #define _ASM_X86_IA32_H > > - > #ifdef CONFIG_IA32_EMULATION > > #include > @@ -84,4 +83,12 @@ static inline bool ia32_enabled(void) > > #endif > > +static inline bool ia32_enabled_verbose(void) > +{ > +#ifdef CONFIG_IA32_EMULATION Hang on, this is wrong, it should be CONFIG_IA32_EMULATION_DEFAULT_DISABLED > + pr_notice_once("32-bit emulation disabled. You can reenable with ia32_emulation=on\n"); > +#endif > + return ia32_enabled(); > +} > + > #endif /* _ASM_X86_IA32_H */