Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp447328rdb; Thu, 30 Nov 2023 08:47:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDnALb1IyboXBTwRZfXC26b6uO705m785X1OgzYmZyrDucfQnTiZ870QYAcHwbXYoWRz4M X-Received: by 2002:a17:902:d4d1:b0:1cf:aeca:8a28 with SMTP id o17-20020a170902d4d100b001cfaeca8a28mr21726218plg.60.1701362860434; Thu, 30 Nov 2023 08:47:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701362860; cv=none; d=google.com; s=arc-20160816; b=C9xVZL4Y28JuwIiX300oVwTLvU4at5q3CMZ8YU8LGDropoBSkn6YiDC9TRIR111CEC GSrCQoHp7ImEEIv6Hv5HEA9gQ8r+Eq/TDF1t+JxurcvwxWG93YYmp4Nb4Yajm/I9ztLO jOMipqwXMImZ4FsUozI6vrMhfJWZkRzdvLrtoZ72zgpV8PM6nqI+ebZZVWq4EUq7us/q Kzgx2TTwOF7DUoHm/5vhwCPe47eH5LonhtT0OvHb1x/XeFzTYzHJ14aFNVhPSvbQtRvm be36vrdyOdTtnOsgsRpF2Ta9tUz554/eCgMcGBY2O6CRovi8zlBkHQ+bjkVFjVoupPEA ExOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=n/82G/0nOOPB91Vse2y9ZbjxwVgoVjZManIXPaj11EM=; fh=c6ULuwrEvs81d/SGBbEGkeGvnJaJUssF+sP5VR2Lcag=; b=XcGQha9xunhRrOgfHulT30mweVIvaMwdEbwq35syQOGr9ToygAM8+Q4Py6JyhNp6Bi VIokOZIChsO4Qkjs032VKqBHgiDRSnnBx0KsyiKDB1xCXGVv7zlYn8BevGCLdYxqvFVl mFmMTxAnwtcIJ7y73OLoURijG/wfNIEHu5zjGu1UFgr+QES1Jo74qxEkJOyygau00NjQ pf78qbE6jQABKNL8sdSWKeY72cpoK4jcAwyqrncI67aZ7V85vyjyXzkwGu2i09v1z0jE T3yv/f00QDZg0ssZ0qmmro3e9JwKxMjeVzDzECt+FhRRWavU3wMSujmHixGNboS7DVaZ 6A9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WqXgrbrr; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id l4-20020a170902ec0400b001d0107e765bsi1464094pld.564.2023.11.30.08.47.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:47:40 -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=@gmail.com header.s=20230601 header.b=WqXgrbrr; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id D066E802D7DF; Thu, 30 Nov 2023 08:47:37 -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 S231796AbjK3QrZ (ORCPT + 99 others); Thu, 30 Nov 2023 11:47:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231861AbjK3QrY (ORCPT ); Thu, 30 Nov 2023 11:47:24 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA4C110DB for ; Thu, 30 Nov 2023 08:47:30 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-50bccc2e3efso1350350e87.0 for ; Thu, 30 Nov 2023 08:47:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701362849; x=1701967649; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=n/82G/0nOOPB91Vse2y9ZbjxwVgoVjZManIXPaj11EM=; b=WqXgrbrrVPdmiJPrd1NVu5MbXFlxBaBbVajmssKdhg8AvIbHISrS6KqZB0gmIS+O/R pl0l5kFlRpNx5ePJhIdUav7Enu/gJ9ACgCP9x0nqRZLyROYMAJt3K/6o/EMperXnuvy2 v06rd/mjMXKBse2/+FhgZYH6/IYBcDgzqbSoCE354AfBoQlHEyMFyZpDdKfYEoNjG9ti 1IWbz8ywQaSHx2n2gWjqOeF55UR5x2+dXkMI8tz/rohywOoAGmI9hXrYViULrOaXSKzc jaLuRD2aPPw640WmY0SRxpHrKJqbAnWoNdXCH3bz+NXIgNno2InpyhD99fDgVqwkC2Q2 1vOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701362849; x=1701967649; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n/82G/0nOOPB91Vse2y9ZbjxwVgoVjZManIXPaj11EM=; b=d3sdcHeHa4SR2OUHFtXS5+jzsf9dJ0DkRUv6yTPKvNEUqrfLH1aJ1+6EAQte/4U418 hGYS6e6gOxRRKaJApprBCpake+luWUamaHgzDW8603rgtQJV1weCWLWbZ/QdklZd3+W7 ssElqVQFYVIIZCbJBWIY+lSDMA6tZuPx8nBwhEB1IkhvXdelXeFKKTP2T4SvhqompoO1 SXX+KSjGBkrepM2gRuFAYWcATF7HOuYeh22/hitxFxvrDt7K59nWAxD06Tyav95YMG3i sFZ6rzUDeAM08JVwkSyytPiDcQhhyTShVtJnD8/eCdUMZslUN7yojcMWZI6GEN6DuCGB ESDg== X-Gm-Message-State: AOJu0YwAUSFUBXZONEVQrBBCZmnA+I14PXDEnoR+xZbZ3eJVXHfGlw4z pvRmOz99+dcPDQo1uKqCqx2/zRxzP+AYteJ7ig== X-Received: by 2002:a05:6512:453:b0:50a:9f28:5efe with SMTP id y19-20020a056512045300b0050a9f285efemr12837lfk.19.1701362848097; Thu, 30 Nov 2023 08:47:28 -0800 (PST) MIME-Version: 1.0 References: <20231130155213.1407-1-bp@alien8.de> <20231130160903.GJZWizn+dPaaViFVKN@fat_crate.local> In-Reply-To: From: Brian Gerst Date: Thu, 30 Nov 2023 11:47:16 -0500 Message-ID: Subject: Re: [PATCH] x86/ia32: State that IA32 emulation is disabled To: Borislav Petkov Cc: X86 ML , LKML , Nikolay Borisov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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:47:38 -0800 (PST) On Thu, Nov 30, 2023 at 11:42=E2=80=AFAM Brian Gerst wr= ote: > > On Thu, Nov 30, 2023 at 11:09=E2=80=AFAM Borislav Petkov w= rote: > > > > On Thu, Nov 30, 2023 at 04:52:13PM +0100, Borislav Petkov wrote: > > > +static inline bool ia32_enabled_verbose(void) > > > +{ > > > +#ifdef CONFIG_IA32_EMULATION > > > + pr_notice_once("32-bit emulation disabled. You can reenable wit= h ia32_emulation=3Don\n"); > > > +#endif > > > + return ia32_enabled(); > > > +} > > > > As Nik rightfully points out offlist, this should rather be something > > like: > > > > --- > > bool enabled =3D ia32_enabled(); > > > > #ifdef CONFIG_IA32_EMULATION > > if (!enabled) > > pr_notice_once("32-bit emulation disabled. You can reen= able with ia32_emulation=3Don\n"); > > #endif > > > > return enabled; > > The #ifdef isn't necessary, as ia32_enabled() will always return false > in that case. Scratch that, I misread it. If compat is disabled at build time you don't want the message to appear, or at least would want a different message. Brian Gerst