Message ID | 20230616125730.1164989-4-nik.borisov@suse.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1347884vqr; Fri, 16 Jun 2023 06:34:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4rbef3EAsyNdpXE9z/+dgn32pDkagGqY+KEFmxVCgsvyNrp4KvMnAn9akbUg4d+OQhMZHt X-Received: by 2002:a05:6a00:1a4e:b0:653:a90e:b63e with SMTP id h14-20020a056a001a4e00b00653a90eb63emr2156839pfv.21.1686922463499; Fri, 16 Jun 2023 06:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686922463; cv=none; d=google.com; s=arc-20160816; b=zWEBRQ9PdqOiXI/YwTg5esCjorSKbYutZGpFuOnwutE0cSoPyeBfUcYx3i1jpunB1Y BuU1QmEmPwgiprr3SILjNJryzoil4Gys+gLUyHZHrhe0m3lgZlK0/qf3iJJ0a+HNw2ft KsymvBkiQTwom339RYE+Ha/KbKuzUmGYGHU6YuqnFZGWhpOUyht7F/Fu9GHRtt+YCM5s wpqysUGDrN7p5mO9IAYli8Cnf9RWTsHyyj+Z8dm5AURKRJoLiTYL+dBNno5aWV5nfjfV RUenCKu0VDgoOmv/Bd7ihEdDQR1uzCu1vKt953dZBtjeZbzlUgd90r4KNG9a01HP1OlZ 7ewA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SoXFQh+RzasTMouNeEc9Sv2mkn82qFE8WfTasNo7vBE=; b=lU4p/tZQGNreoO+ps8A8xGFTF4nx7r7h2HSdPyLeNEczGOYLIsVFQ5Glk5i+lb4EYg b0Z8J9x7Adv+KfgTxDd6bRhKkP/ixNHFycaQRLbxhn2FawgU+WaFlqSdZCODSSTMjBav Q1z5bJRoVMUx6oFm6gTd3BUgUAZLCx6xgzP07DpY9rTLVOM62GPn5dXmvdB8Zug8mMHH 9h9cs+QxUmu/TUZmWy5jRwU+heBVW2jOY9bd5Usvx48IUKjikrJWDtA9Gsqs4W8uFITI BwO03N82h+26ZIsekg5wOxvxB00TXZbWOb+mfz1f2fdvtVTsz+GDX10reVDdInKTt38f InsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=sDNCqdYQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h26-20020a63385a000000b005537c93c40asi1054807pgn.146.2023.06.16.06.34.08; Fri, 16 Jun 2023 06:34:23 -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=@suse.com header.s=susede1 header.b=sDNCqdYQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345540AbjFPM6H (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Fri, 16 Jun 2023 08:58:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345512AbjFPM5y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 16 Jun 2023 08:57:54 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 016CE2713 for <linux-kernel@vger.kernel.org>; Fri, 16 Jun 2023 05:57:52 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 942E022057; Fri, 16 Jun 2023 12:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1686920271; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SoXFQh+RzasTMouNeEc9Sv2mkn82qFE8WfTasNo7vBE=; b=sDNCqdYQ9KuxM/AapNsR3qQipjbFj4+Pt0gEHCUgW8lqoS7iiEQEKbIKAbGsgA3Hrr5kDs HpEE9CHDy5K1UwzUvknprcAGsJtjWXq7JQXZ6W1IkYExK8Sd1je0HqrygxBMIJDNPYTLIy BQfj3R/F9fXwQPnQ42TQGoWUfhZ+1hM= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3EBBE1391E; Fri, 16 Jun 2023 12:57:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IL+0DE9cjGTjNwAAMHmgww (envelope-from <nik.borisov@suse.com>); Fri, 16 Jun 2023 12:57:51 +0000 From: Nikolay Borisov <nik.borisov@suse.com> To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, mhocko@suse.com, jslaby@suse.cz, Nikolay Borisov <nik.borisov@suse.com> Subject: [PATCH v3 3/5] x86/entry: Compile entry_SYSCALL32_ignore unconditionally Date: Fri, 16 Jun 2023 15:57:28 +0300 Message-Id: <20230616125730.1164989-4-nik.borisov@suse.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230616125730.1164989-1-nik.borisov@suse.com> References: <20230616125730.1164989-1-nik.borisov@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768866409132164694?= X-GMAIL-MSGID: =?utf-8?q?1768866409132164694?= |
Series |
Make IA32_EMULATION boot time overridable
|
|
Commit Message
Nikolay Borisov
June 16, 2023, 12:57 p.m. UTC
In upcomiing patches entry_SYSCALL32_ignore() could be used even if
CONFIG_IA32_EMULATION is selected but IA32 support is disabled either
via CONFIG_IA32_EMULATION_DEFAULT_DISABLED or the runtime override.i
Just compile it unconditionally.
Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
---
arch/x86/entry/entry_64.S | 2 --
1 file changed, 2 deletions(-)
Comments
On Fri, Jun 16 2023 at 15:57, Nikolay Borisov wrote: > In upcomiing patches entry_SYSCALL32_ignore() could be used even if comiing? > CONFIG_IA32_EMULATION is selected but IA32 support is disabled either > via CONFIG_IA32_EMULATION_DEFAULT_DISABLED or the runtime override.i override.i ? Aside of the lack of a spell checker, this sentence is not really well structured and helpful. You already introduced CONFIG_IA32_EMULATION_DEFAULT_DISABLED in the first patch, which is questionable to start with because the config switch is only fully functional when everything is in place. So up to that point the command line option and the config switch can create inconsistent state, no? So the right thing to do is to introduce the global variable which controls that first. As it is 'false' it won't do anything, but allows you to build up the code. The last step adds the config option and the command line parsing. Then the changelog might read like this: "To limit the IA32 exposure on 64bit kernels while keeping the flexibility for the user to enable it when required, the compile time enable/disable via CONFIG_IA32_EMULATION is not good enough and will be complemented with a kernel command line option. Right now entry_SYSCALL32_ignore() is only compiled when CONFIG_IA32_EMULATION=n, but boot-time enable- / disablement obviously requires it to be unconditionally available. Remove the #ifndef CONFIG_IA32_EMULATION guard" The point is that changelogs need to convey enough information on their own that they make sense without having access to the full context of the patch series. Thanks, tglx
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index ccce0ccd8589..7068af44008a 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1514,7 +1514,6 @@ SYM_CODE_START(asm_exc_nmi) iretq SYM_CODE_END(asm_exc_nmi) -#ifndef CONFIG_IA32_EMULATION /* * This handles SYSCALL from 32-bit code. There is no way to program * MSRs to fully disable 32-bit SYSCALL. @@ -1525,7 +1524,6 @@ SYM_CODE_START(entry_SYSCALL32_ignore) mov $-ENOSYS, %eax sysretl SYM_CODE_END(entry_SYSCALL32_ignore) -#endif .pushsection .text, "ax" __FUNC_ALIGN