Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp416975rdb; Thu, 30 Nov 2023 08:04:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDyf4mwLmmyZvEiYXj+yPo9Yms1Fhlg0h/a9995jDvCa0fGyHS5IMkUZqvBTL2YdwsuT40 X-Received: by 2002:a05:6a21:189:b0:18b:d946:5d1 with SMTP id le9-20020a056a21018900b0018bd94605d1mr27171031pzb.54.1701360285812; Thu, 30 Nov 2023 08:04:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701360285; cv=pass; d=google.com; s=arc-20160816; b=d4bu1sNKSYJdGUMrAi7pjdE4LyNDJHzE1R4LB8UA9fAN1M2wNb4Thx872qI01IxhpQ ycZBpFhwYoopWvu3IFJf9gAGI6HQ8URt6leMdezhb/wsBWynsq/B63nZDhp5j4GfO2PF 6YFqEmF4IQkgrE1Bxp5bCNQRcHezYnlZ1v+HxAtrQxZPWZQKRrJNQdV/OdhBPlHcJ145 5M+IdUFnXoNhISRNnckBvt6JigW9JND8lkuNN8Qwul43LAEVgy9tWzibg1ZHbM9X8z90 a4jxPIJWmgwlcOGMzz8DjeUTFMx3Yt1I0wJLWCN22L3XBQdREG6y5SEBjU7ga7VoKSpN Ph7A== 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=fSOQje/71a44Glx47Wm9Vul4H8McqSKCyypSU1e3O3w=; fh=6LYrjt2C8+n8oZJqh4UfKQQIbZx/uXWb++PjYthlam8=; b=D/xmsBs7nxkaSXbUurfcjUhsXGvABipSYyGQ/55EKJl87yYly65idO737MJjvjYsyp z44tjuUeTwKP1dCR2L138lVhcHsELvVYjF5Tf3udeNXr/VseEY6/DFzsMWBqdziXDmIC qQUFY/gP2bL2esOrX8nQLUeGapff/22CmPANBxv7jOxekJJ/MypS9xw+60RlK/KzPMf8 Byluvi6cJQ1gufG+M0bvLTwV6Lewg4LCuwxJPbxHapRUgtJaMQXXwfbmP6HCYRwimHKj bETqzXI2SqNO6RWHK+2v29brvZ2XQqx3JrYw8uL4Tgz8N0A+PDecjy30go4vX8ohRcAq +mRw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=cV9M0fZO; 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 23.128.96.32 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. [23.128.96.32]) by mx.google.com with ESMTPS id fa25-20020a056a002d1900b0068a54522bb0si1524057pfb.144.2023.11.30.08.04.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:04:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=cV9M0fZO; 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 23.128.96.32 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 71CF6808A8FA; Thu, 30 Nov 2023 08:04:36 -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 S232133AbjK3QET (ORCPT + 99 others); Thu, 30 Nov 2023 11:04:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232059AbjK3QES (ORCPT ); Thu, 30 Nov 2023 11:04:18 -0500 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2076.outbound.protection.outlook.com [40.107.249.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB04090 for ; Thu, 30 Nov 2023 08:04:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oSscDOS5ux8AXZUtY57LG4G0dbQdv8Uq7/QPV6U6yaArpZW3NFFDJnQ7vF4vQCtJDlkni6bRn/sukgkiUOh+ggUMjS6hVU4nquSaHCxPThr3TLXIj3mtmqyhobaxMYs/lJ9S7fZSh6PNtZhaCsImOem5kAts6mEh5mCPtz/HA/ZkHlTekW2KHV0DR5QvlB3QTRfYZ1GhIEavsbGtFsBpZfDy6oL/QVRn+7Hy+WB/XVbTWHGfXB/nFgDox0b4l1B+UfZdNbCBrU9kXbj1iDYLttiO10YIebxdZY6A+bq9Vqj+SGWoUPCSlFppjPp/T2YfgsSy6TKYzigPpF8baR7j+w== 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=fSOQje/71a44Glx47Wm9Vul4H8McqSKCyypSU1e3O3w=; b=duzkdFj1PeKIEMQV24PWtrgDDB2vIPppOvN3uIyVoH1pDRQMPM9rCGiDbCs2cjrGY2BiAldotGNFLHSNSu75mzjaclLRhzx/TQGL99zK7ZTTUbg4I/BtWhn8NcGMYzGBzXUVfKrTBThsqTzG4bmuJCt4vHURHu8mt/DB7QyZRe3b6HJDxjSP1oC5tQxlMFfiWgHgTSWyg8YZf+GDK/Qe03hXuB3m6tLEHxMUhISlijfCqf8vl/GmCCAMaV6P70uCjbR5s2r8UHs+GSQ4odslJNk4lFqJU7CedGm9fzwTW9rewDHgKUIShxFrCtNIoCjjJHEtARwpnF99A5cemq2k2w== 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=fSOQje/71a44Glx47Wm9Vul4H8McqSKCyypSU1e3O3w=; b=cV9M0fZO95y4oSRdQtt+VFxlZTcl/kAn8lL2YhTb1zOiEV0knNcTZ49fkWB9xM6BaO2dbU2qw44AYcb4olW37KHpzZcLSGsDUQN8aE/kjVlvKT6JauoOTP47hpGJVe2fgI5YuwGlSkAhmoR5YQzziSFeQCT382KHppTCsOXdoeL6O6x/v852KOfC6rlli4hnGZTPB13sY8fsk33zymWC98DjadFjB41DAeP99EAu9AWYzfXC6zdc1lAtsR0J/8aChBArq0R/4GmT+yvOXjFP6WisXySNphX0nOVj9ribGRPVyKTWqrjDpYMcj/DA2g2dlq/JgGdC/Xy43TtHa8mqzA== 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 PA4PR04MB7712.eurprd04.prod.outlook.com (2603:10a6:102:ec::14) 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:04:21 +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:04:21 +0000 Message-ID: <6adeb081-33d9-47f5-b812-e867561e0ded@suse.com> Date: Thu, 30 Nov 2023 18:04:20 +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: VI1PR07CA0255.eurprd07.prod.outlook.com (2603:10a6:803:b4::22) To PA4PR04MB7790.eurprd04.prod.outlook.com (2603:10a6:102:cc::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PA4PR04MB7790:EE_|PA4PR04MB7712:EE_ X-MS-Office365-Filtering-Correlation-Id: 8cf7cbfd-2703-406e-c30b-08dbf1be03f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HGmzP+KXzPfAVjfZit2eIwWqpFg8QhKNP8xthgsZDhS4rln/qwu5b7yeds9FJnoG4+Iw9cNicEzhICVM8XUzKD4l1ahaPYA0gxU5cvkMWjljca1YGqn59l6tYbP6SDRLU8qA87onYVUQyCkTFxc7lH3qk14P4MtJDofeWGhhS053Y/5Fdwq5+GHvpPh8ywzyHJedXXD4amnk3RqdZcqdlSvElepBQjIlFgU3GxrNKRQZOORmm26rRqZWEm6S2Eu89QK7AA1cPF9OUAACCXJF5F9LvEWwZo7FjEqz0gsm2Uy9SNTrDWgoniSB86hrZYSz5i0UY/AxN3yNcgxzdngIlQ1BlPGq0eqgPYXsRuWHCiY0MBHiZ92N+fzReM1S3i3hSzauSKcIwEzQ3GdWKadP28QpI2Lhy4tScXQMZ62DvhwUP2LF7St9wn9MSDQKA7reaQ2WMVm2d5K0Uwrvx4SUUC7XzME4+14P3eiAUfbEDuI80LTZFlHsdmLZCs9CL/dZf+4y2C91PkpqxLqT+/S6/YXcnzFWMWlvpk/cNCIG5g+tEnnHVSkKTsl+zpxvbwmwmhCn35hvwTasvoTg7p0SeiIdFs5y//IPfsNp9J1y9dsRHEjJhy+JV5c19OY3TBByKenHru7AYXXYHMYvTMMjeA== 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)(346002)(366004)(136003)(39860400002)(396003)(376002)(230922051799003)(186009)(451199024)(1800799012)(64100799003)(83380400001)(2616005)(31686004)(2906002)(86362001)(36756003)(6512007)(6506007)(38100700002)(5660300002)(41300700001)(110136005)(478600001)(8676002)(6486002)(316002)(66946007)(66556008)(4326008)(66476007)(31696002)(8936002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dXoyWkJXZU44akdHSjJGTmNhUEk2RUFJMG9WTWg4ZGdnNkFUUVExVUdxc2pi?= =?utf-8?B?YlZ4T3U2bnZnNjczQy9RYnluNTMzZnpUc3BsQkRVOFNsM0M5c1ZCNXFTL0ZT?= =?utf-8?B?VkI2SHhYZXY3MEhwV3A5bXhaaS80dnIvUjBOcFFlVUdKVS93WmNNckl1dmVF?= =?utf-8?B?dk01ci9pbnVucnh4ZmQvV051UnBCWlFwelRTb2FkOWh5N0dMYUE0b3d6d2Jl?= =?utf-8?B?dnk2QmxMR2lWSUZ6V01BYWNtOGdRRDBTMjlkdy84cjhSbWhRM09ULzNNMk9H?= =?utf-8?B?UDNyT2IxdXVWU1lubjlyT29STldwWFkyY0hoSEtwbjZuK1pvandSZjV2bXdN?= =?utf-8?B?QXdTbE9jU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haGZZOXVUL3ErNnNn?= =?utf-8?Q?q/bTCbblzJeP0YUfMA5PW9Ydr30eSG1cOCDaYu/YHWUs?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cf7cbfd-2703-406e-c30b-08dbf1be03f8 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:04:21.6945 (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: BaTqPFqbVS7m9jYve8HK9brn5ABKQR9J7IE8QLcOGJ79c0+Kg6FHDnujFkHqni6zQiXHJRgzsHmita+s9MgvQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7712 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:04:36 -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 > + pr_notice_once("32-bit emulation disabled. You can reenable with ia32_emulation=on\n"); Actually this will result in a false-positive, even with the DEFAULT_DISABLED but booting with ia32_emulation = 0 so it's best if it's predicated on the output of ia32_enabled. This means we'll always pay the price of the branch even if it's disabled but removes a spurious notice in a certain case. > +#endif > + return ia32_enabled(); > +} > + > #endif /* _ASM_X86_IA32_H */