Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5585226rwd; Sun, 18 Jun 2023 15:01:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7KuQg5jlxsVWAjqPJCRAA99iQdrwfp4SL9cm8X7TXTR/M6KZfJqTSBIeL8dw45O3asEdCQ X-Received: by 2002:a92:c943:0:b0:33f:bb6b:ed37 with SMTP id i3-20020a92c943000000b0033fbb6bed37mr4899492ilq.24.1687125712037; Sun, 18 Jun 2023 15:01:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687125712; cv=none; d=google.com; s=arc-20160816; b=ck/2he6LhpU/RmHqcRrFWQ6E1uB94+D9vDmhf9WFZwGteA+3b/mghpNN4eqJw0tdI9 ZJ9CDAPBeTs4y6jIBCEXG4kQbV5G2pY3btW0fb0GCgafoajoLCxTIJcagj8qAKR67GmV c1XRvKV/rvsRIQs3Wgss9kF10hVyIGqHkxewGA80uJPO5uZ839XkjBW3vRLSZ+STK9tA LIqHaSWV0B5+9Rdpmmhw1udLFkpyAaVT7JQl/GvEBg4dcX23yvkVChntxwXjZNFOujUE Y+9sV1Yzy5oTKz0Q1mXWicirYSlXOoffRvK0WYAfnQSF5E/odSNg3Z1I42Fiz/aAlLrq NE2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=95V82FuCk14L4o23xW0SJ3YkPbN9/vpBfmhpOLByVJ8=; b=h+TFDVVeqbqjET0vq3fF4RT+7Rr8jgf5zvSGx47IDNzXWnJVoNshoIp3NJXkL1TGQ7 3g0D02hdyRhShRMwKA7kDsngBBrwj1iCPfMg1v0dUh00awOfvI9UOWF1+x61Z0JjJ5tM wYidT7TIK8GA8c6swWWeWMD9uevgq8mCuL+dCQfXAV2MMsNH2gLwu7acqv/aFbKjRsnE y1loOedxSyqxgB/jdTq/2bSAeuGtZPJEMPQKF1dD5iaYjvGQ3YtsnLEHKRocpXtOqn9r FoiiuMNU730u0AEJl6yn8Lj+zyaVy3+8wosSwVBvakB5FuGGgq75SgRFHPq4eZKW/We2 DrKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SsvvLK4n; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020a1709026b4800b001ae40e07fb0si15349662plt.216.2023.06.18.15.01.37; Sun, 18 Jun 2023 15:01:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SsvvLK4n; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbjFRVR6 (ORCPT + 99 others); Sun, 18 Jun 2023 17:17:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbjFRVR5 (ORCPT ); Sun, 18 Jun 2023 17:17:57 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 038EB1B1 for ; Sun, 18 Jun 2023 14:17:57 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687123075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=95V82FuCk14L4o23xW0SJ3YkPbN9/vpBfmhpOLByVJ8=; b=SsvvLK4n/Gaa5VbGZ9GxksdY2mrE+pKF+VCO4Dv9QVpj8FNUJYpcUsP0CkXdnCa/8hKfTZ uU1kT3AbkbLv9AlFXI1r49/SNp2W3MXYDLKS3HKbhlFP6bJqZXFynNny71YGYUhpQIgQ0K CR0DMp9M4S5ITtaSYY5/SPchqIhIWQ7mpiIRPadbqgfqQzJy+UzLDlZ8wb0VFfRLY8cF6/ wUvF592l4cRlDQNPNUGv6K7Lk+QK+3EFxLAwRB91nMq0RqYgEnfsPZ+MfLPu/vYNburX6T QYF8q2FvfNMcNmELkS3agprGDqcm4P0TgmfN51aU3ebe7mDYtQvDpVKfV5XJnA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687123075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=95V82FuCk14L4o23xW0SJ3YkPbN9/vpBfmhpOLByVJ8=; b=+uoNM3ie6XohdMXjT6HbhEXzk+3cxRp3khWNQgcIIpgew6FKbgIDbmCKaDy0hjeYAb9FxU l4uhXFiQzTuGwKDw== To: Nikolay Borisov , x86@kernel.org Cc: linux-kernel@vger.kernel.org, mhocko@suse.com, jslaby@suse.cz, Nikolay Borisov Subject: Re: [PATCH v3 5/5] x86/entry: Make IA32 syscalls' availability depend on ia32_enabled() In-Reply-To: <20230616125730.1164989-6-nik.borisov@suse.com> References: <20230616125730.1164989-1-nik.borisov@suse.com> <20230616125730.1164989-6-nik.borisov@suse.com> Date: Sun, 18 Jun 2023 23:17:54 +0200 Message-ID: <87mt0wqxkt.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 16 2023 at 15:57, Nikolay Borisov wrote: > Another major aspect of supporting running of 32bit processes is the > ability to access 32bit syscalls. Such syscalls are invoked either by > using the legacy int 0x80 call gate interface or via the newer sysenter > instruction. > > Ensure that if ia32 emulation is disabled (either at compile time or > runtime) then those 2 syscall mechanisms are also disabled. AFAICT there are _three_ mechanisms for 32bit syscalls, no? > void __init idt_setup_traps(void) > { > idt_setup_from_table(idt_table, def_idts, ARRAY_SIZE(def_idts), true); > + > + if (ia32_enabled()) { > + idt_setup_from_table(idt_table, ia32_idt, ARRAY_SIZE(ia32_idt), > + true); Just let it stick out. The 80 character limit is history. Thanks, tglx