Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp411543rdb; Thu, 30 Nov 2023 08:00:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQ6COyqZ8xH1T++euKaHn6c6xPavD5lhzga3y7WZF9is1hnlY+MRmKts/Zd0eytgPn2lW6 X-Received: by 2002:a17:90b:4c02:b0:285:dbbe:1178 with SMTP id na2-20020a17090b4c0200b00285dbbe1178mr12540769pjb.39.1701360001573; Thu, 30 Nov 2023 08:00:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701360001; cv=pass; d=google.com; s=arc-20160816; b=gH44gAwS9PZDZBWyGQJqmsKti1cEJ8p7sp5eXHV4cNY5h07XiCR9JsFfXMbAoLPeXO 6gfEMZqvJGmg6hnHBK0Vsxlag5h9UQjkC78/pfLGOleUHW9Q05Umn/dmfOi/27sx8Edx 71h1K5MlkDqTi/OHRiqD7bsfqRqLXUeM4eOdqjAeNU3S+dhZr4iC9c+wnDmmnvGKwSSk v+Rka59tR60j3MdJEuo7UMsJWF8wPEOQx+lQCDXiMDp/QGm7q/qDPGoPlt1hOY8x082a wAk7tkORD9v49Tf1Y/N3NIaiaPRZyqDHtWhG1IDHkBjzb/dmKFUo6q50grzU1sFWbrxR F96Q== 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=4JjQnX4j7SE98pk/4eH6RjzyJOwKfBttdbIn4AImRFQ=; fh=6LYrjt2C8+n8oZJqh4UfKQQIbZx/uXWb++PjYthlam8=; b=URZUTzo4cXLSnDqKbLCn9vq1VmuY2dOdASxkDQJDTlUP8mghiktXvfVPEu6tpQF3zU E2I8fupfsmAlUDSzGeIHvPpW6ITQp1CRJJ6S7mVTa0suST/7+TdPOW1vma88O2CkkUmP 9VSorsOWAEJlF81ahz0oOVFCjQLoi3/yQfURIDBXD/LOMSAoYlub1VIcaTqbG95Do306 zubfFCLE0p+Suu0YiWqMqXcP2c0UaNxR+EidoTPGzJQFv4ZmaeJsra6uXV9BIxcuF91D Xht6UmY+wu+rq+5P1aXVZWfHMZl0HplNhmbLK995vQ46ycHHrA8zXlqP6ivuIUISCkOd DuVw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=YsZWxB+3; 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.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id k10-20020a170902d58a00b001cfa70f3a41si1504228plh.421.2023.11.30.08.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:00:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=YsZWxB+3; 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.31 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 morse.vger.email (Postfix) with ESMTP id 5778D80936F6; Thu, 30 Nov 2023 07:59:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346481AbjK3P7f (ORCPT + 99 others); Thu, 30 Nov 2023 10:59:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346478AbjK3P7d (ORCPT ); Thu, 30 Nov 2023 10:59:33 -0500 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2047.outbound.protection.outlook.com [40.107.6.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DDB410D5 for ; Thu, 30 Nov 2023 07:59:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EuhTBtzjac2K7w2qXhiqdhKgSm/mHVccg+apFxvnz6/XblCUnDOBkojhUU/rgEny1n/Gj7nIAbSRmEget5WBIMtVhtPNqjOyTGqbdewJhgRwn9mzv3wr7eItKMtjkWgCZKDGR79bgfLDO6CVQsQ34XWLpr2R+PtQ78jryjp0CHF2vCzjYbdfFSWQdi/K6Sx2cfIpbX7n9HMV6mXkWbqufnQVZIaXz/IysYgA50NTgJ/grY3FR4qKnpNF3hk5y/sSBsnO64rtojmFIbYrOC7Ie1c5Pgt2Fki2liKirk7IWk2G1QqmlILsKC39d1+10g94GtCh+jd8O/mwL15Segy5yw== 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=4JjQnX4j7SE98pk/4eH6RjzyJOwKfBttdbIn4AImRFQ=; b=ObVdbZgWYVZFtMhiFXu2pvqq+HH59PsOPBsVOgKBSspR5Cf2AZ8w4sEX+TytP49nYscmWNL1Uv6GJI1Uhm6PLMU1/BrBFoNnenb36tyJEpokHjS9mMoblR3kfDw6YxpPVojQR3aiejLOfD7yB433QoXOiLa2nCzsgI27wm7TdO0T84xMSk7UwwPYaQiftL342P+PcKViI6Ro+jPomV+8m4gQoZo88sXYdSn9AsBryrFGmqnOq8V7X4PvD6ccDVXIRBTSm46p9Io/viEdJhQCAOkdH+uYhPkozvhit9PG097y04euqdzPiwFuG3qZTTV7girrciWwThHQx5SKawG/Ww== 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=4JjQnX4j7SE98pk/4eH6RjzyJOwKfBttdbIn4AImRFQ=; b=YsZWxB+3mWoSHpa8dH2s6lapN+hPdvZ4lOvPoLYPVhAZyZnzVYCfo9yzPBWPqfpndQo7D5RjcsM0zjVaoMqS70zqw/CpS8ny8BNp3U8UcpGgTZvHZK5GeVi8hPu/u1nNx9ZmBBWRxzt8F9T7JXmETBKse9gVhiantAwsAe3bz5rwL47gJ2If8UZ0pjBm4TaRSwRc4yHE8+MDsDeMpKdDjNYMSuRgoRzUb1lvv7Bt3bv60w6dDIuNw7C/kW1+Q7u62a+GTh9fhx0UObaH57hIlgT0qCZBjO6pEjoghK+A3NvYzZS/CfX+Sw6Xo9osCRJQJvK2YMBx79wPN/NwV7L3kA== 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 DBAPR04MB7288.eurprd04.prod.outlook.com (2603:10a6:10:1a3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.13; Thu, 30 Nov 2023 15:59:36 +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 15:59:36 +0000 Message-ID: <12a5af2d-c58f-4b4a-a994-49a935f59693@suse.com> Date: Thu, 30 Nov 2023 17:59:33 +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_|DBAPR04MB7288:EE_ X-MS-Office365-Filtering-Correlation-Id: f4b9e533-3926-412e-0905-08dbf1bd59b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jH3LHQSteqOBJlY4YBkcSkPB9GLlyrzFtSzy6ULJRmfRwcjCqLLPULm2yo2lfELDp62eevrp/duQPBnP3icWvDtTD/SLsrlGobVkYlOqegcXUqLolv1LH2MhDvX1NSLUQ4zuk0QXjiI6cmUMW67rwNViSQ2/p7lYpLjYkQsXPaiwuBdtw/Jiusz92hVy+1Q5r6aog8ufQ2cNrEGmei57Ad9A4OdLXC5xgONKUVCAL3mMSCV03LjgSifWtXuXdTUiD8uS8JF0TqI84WKiXOyzZr8EibgYfHOskX4gBFjA0sivBjcbeVraqv8fyHVagIfTIV5xlYZnb9tOOMG1oMdq0U5MIVWBIW4eyCO9hkcnaBJteXjBHyi/ULHEot6kGA5O0IXaum+8xCdJO26ra9FQhTVyrbaYSMXT33Hwv1pRappsD+7DEpoZwwh6fU6KIkiSk9f1yFQ8IrUnCNDQzV6gKRaULceTuEkerWF/O4HO4GLa8/fDnHyX1b1TlFAkRyEFyNpev+46g/bXr+sCrmVtmsBWm2xidwMSmspQyzwqi5w5lHADXmNzhdZkahqfBBR9QceNbzy1/3/6PFemN7wTYs/Mnkv4cKI7icjC4MxtqguUA1+1kmoS2tAkx9HbDi3YgmkVzazSErqNIzn28/fm6g== 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)(39860400002)(376002)(396003)(366004)(136003)(346002)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(86362001)(6506007)(83380400001)(6666004)(6512007)(2616005)(41300700001)(478600001)(4326008)(5660300002)(8676002)(8936002)(2906002)(110136005)(6486002)(316002)(66556008)(66476007)(66946007)(31696002)(36756003)(38100700002)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QXhZcHZmUlpCOFNXUXYvSlExU0Q0ZFVhWHZRTUZ4NmxwamZqRVFtWnU3cHh5?= =?utf-8?B?SXlkUVExZU9nMm9qZHl3bWVBYUVoU1c5VXh2UGxJOU81MDBDMGZIdU1MdzVq?= =?utf-8?B?V0REK1RrNFNxUUl6VVBsa1hnd2JlcGVsVDJIYlVuQ0NwOXI2L1h4Zi83NjNP?= =?utf-8?B?OEg0UzlYNHI2S1dNd3JtdEpLSEJ3WVBYWVB4SEdUbVBsUmo5eU8zaVhSajJ0?= =?utf-8?B?dWJCckNFWER3M3dKeWIxOXlyNjJZendKcnRSbnp6aSt2VmRSd3gwTW5Da2pw?= =?utf-8?B?ZkhSRmtGL2pqVUNldjVNOTZLOXVJaW5YenNFcXcyTk9HYWlPMVQ2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Tzd4Z0RaU0tKNVlJcUs5SVpibm1tZEpFN1VsMkdT?= =?utf-8?Q?QMjrE52VN3+tHdZ4d99YfsvNDWaX9Lp6QbTJ31nvFrcZ?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4b9e533-3926-412e-0905-08dbf1bd59b9 X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB7790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2023 15:59:36.0906 (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: URjkK9cL6BiQlehellF99sUrLZEa6JNZ5cuxCXz7r+Jc+RGO3WrXaOrFk89T/UYg3RTsiZIrngjVBBEgSFFl1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7288 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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 07:59:59 -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 LGTM: Reviewed-by: Nikolay Borisov Would have liked for this function to replace the non-verbose variant but since it's used in syscall it might be easier to miss. > --- > 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"); > +#endif > + return ia32_enabled(); > +} > + > #endif /* _ASM_X86_IA32_H */