From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6753DECAAA1 for ; Tue, 30 Aug 2022 14:27:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6FsHfsjGyfGU9RIpz6FJwTvUSh14JaboN8/ZX/dd1/0=; b=cnUacPPbF30WIS +GHqWEKhOcskN4dsS9y92rKlD2/iiB9EILLdy9kArqxgviEWYFSg+hxYzxecgPtnk2qIWjRG4G0Hk ix4JsZOYly87oayjR0YZF2vGIgmJQmFVxJSJovKFtjLct6JQR010mpZOept6DeTvda8qkkRbfGXrH EAVvPmoNlQorE3N6SdH/n9mKW5YjsVLWSMSkq8oO7edfrZza9W/qz4TEUhBa0pJH/pjl8s+q4wkvV JqebTjy8pmTFemVhRjoJIWav+tTT4KPm2Rk82JAAPhzsBfY07OUIeAAQwI/1/af5Eeqgb42iL5m+E LB3lNqV+5H18GOAiCbvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oT2BY-00HagE-Tj; Tue, 30 Aug 2022 14:25:49 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oT2BV-00HadU-L3 for linux-arm-kernel@lists.infradead.org; Tue, 30 Aug 2022 14:25:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661869545; x=1693405545; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ls7bUeG0qImuDU5GXNYrpLFVEHonOvKe9zvl+zk5MN4=; b=m7Qcsh+3vWARWONgrMFkIyFRHIWeUQ49ioNtCy7rKuBPdu3plHlgeXE6 fRTnxe+P5zDhqCQSMwP5LP+W7ZZ/Um4mZtxsErARn93zoQXNYpVrc/FNm udC+la6i8FATfMN6jbZkYqow3pBKvkiqfVhJlM101/KpWd9LOkCIWYzZK ti2g96KuIBRyPx9mHVwGD2Jqqo1wiUS9yO9OetchSmaRSKuxl5QrdfwJv 7iGuM0d6jiDF3WkvqkMqezwkgYtgArdr84NOQgYl8auPJ6zkT1Fw6WClf UexDgEQtRiAi/3I4j5whq0aVt7/XGsj2A+x7Jc+KqecEEc01UD7lbRN0w A==; X-IronPort-AV: E=McAfee;i="6500,9779,10455"; a="293930001" X-IronPort-AV: E=Sophos;i="5.93,275,1654585200"; d="scan'208";a="293930001" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 07:25:30 -0700 X-IronPort-AV: E=Sophos;i="5.93,275,1654585200"; d="scan'208";a="680053657" Received: from agawande-mobl.amr.corp.intel.com (HELO [10.255.229.254]) ([10.255.229.254]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 07:25:30 -0700 Message-ID: <6ec9cdab-db5b-ab28-c92d-79c3812dd369@intel.com> Date: Tue, 30 Aug 2022 07:25:29 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: Should Linux set the new constant-time mode CPU flags? Content-Language: en-US To: "Jason A. Donenfeld" , Eric Biggers Cc: x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Adam Langley , Ard Biesheuvel References: From: Dave Hansen In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220830_072545_863001_94CADDE7 X-CRM114-Status: GOOD ( 15.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 8/29/22 09:39, Jason A. Donenfeld wrote: > On Thu, Aug 25, 2022 at 11:15:58PM +0000, Eric Biggers wrote: >> I'm wondering if people are aware of this issue, and whether anyone has any >> thoughts on whether/where the kernel should be setting these new CPU flags. >> There don't appear to have been any prior discussions about this. (Thanks to > Maybe it should be set unconditionally now, until we figure out how to > make it more granular. Personally, I'm in this camp as well. Let's be safe and set it by default. There's also this tidbit in the Intel docs (and chopping out a bunch of the noise): (On) processors based on microarchitectures before Ice Lake ... the instructions listed here operate as if DOITM is enabled. IOW, setting DOITM=0 isn't going back to the stone age. At worst, I'd guess that you're giving up some optimization that only shows up in very recent CPUs in the first place. If folks want DOITM=1 on their snazzy new CPUs, then they came come with performance data to demonstrate the gain they'll get from adding kernel code to get DOITM=1. There are a range of ways we could handle it, all the way from adding a command-line parameter to per-task management. Anybody disagree? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel