Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp963443pxj; Fri, 21 May 2021 03:19:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOHGkdmnDryoZnCeANTcq+AWaGLuvqPVlGWVZhGt2pLeQxQQChnW9TSIcFrNKtUNO4xj3n X-Received: by 2002:a05:6402:35c4:: with SMTP id z4mr10091563edc.362.1621592369623; Fri, 21 May 2021 03:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621592369; cv=none; d=google.com; s=arc-20160816; b=Uhzj2Xry4JH5TqoHTHruLuYjeVD4sbliRZOSfjuC64rUV6It5HniFQh2pbZRgZxYil 5irMVBzPUvITnINjW0frURaCJDk+kRtXgyqH8KdLUe00p0aQXARmDYH3iOP/jev48Rqo m3G78Cb7qkQjDqIaNeDkZH/kfFP9QmzLSC8vVsGo/yhwV50Inoh+4VwY1TgsidG33LRo AhJ6zMhewddjHfIUFfl29ubSMsgPRMcZXwRxK/0dwsmmBm9FgrosraJ4H2R3HjZXDk7h w95FfE1pbmWsq288OBXbGbxTCfJot4M5D7/P3ku2xjc8TB3o2i5e5KrHUUMrbKKuT3xR HsIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Rtlup+fauhu/WfletXJx5U+N+g6I1TwSLIMa7TtqpCQ=; b=ctzWyEZaI8mNbm/oiU4E45vNcxpZXtfhHwTT6EiC/gtH2Dkntx+0521XYAGEBPQGuO z8eqNnRmun25m3FgFSmrqxAUhhn3yRs5nhPqwWbvnuWalnLvuLkhqZk/s7lZIdrJQq3B crdHf9Gy9MDmishStuX7PAObo1b1iyx/cFdPFq0jRBi+URXCINm4RB2fwyIx1bGE6LL/ /mkphlrX3CZyyWq1I22tlP/kDuaEeDOXaMDaesdttnpF2OyiX3p83lUbdQt8tf00tyJQ mvDkdzC/hRrPudYBczoOErU1we+KQ+p2DfhIhC7fdSpA+n7moQguCdf6E3GFKn5uCfsT ly9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=TgEyYWI+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si2661526edb.243.2021.05.21.03.19.05; Fri, 21 May 2021 03:19:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=TgEyYWI+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235955AbhEUHyn (ORCPT + 99 others); Fri, 21 May 2021 03:54:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231709AbhEUHym (ORCPT ); Fri, 21 May 2021 03:54:42 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C19A4C061574 for ; Fri, 21 May 2021 00:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Rtlup+fauhu/WfletXJx5U+N+g6I1TwSLIMa7TtqpCQ=; b=TgEyYWI+kHy5pUXV5YID2Dcgl2 pEmUYIK0pYImE4KyDXsjQGa9+lsi1ELoI/LRZXViMqrNWclmTnDbtdYMfnsCVMqp4JZNxnCXsXgoO 3ycoYhsTvpv6Lc+VhKU+N6Z5xU2mRgr+iI5m8TMUA2sPRph/RkRPqheNIIEoBWxokROS4e7GqvqH6 chxL3f/2e7cQYZHl3iDh/TKLYImlVgd9pu6eLw0N9tBbmyixOAvNW9vP7HxrNL0WBuIy3fS2KwTfz KJfUWNA/poal2xwGQNJE0wPz2pNVLOybbFhywK/p16kgGpCU9jpaM9CuODDLkvUOHyZ0RqjFRL/ej EPkA7GwQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljzy8-004IKF-EC; Fri, 21 May 2021 07:53:16 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8322A300103; Fri, 21 May 2021 09:53:15 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 63CF72C6D2B85; Fri, 21 May 2021 09:53:15 +0200 (CEST) Date: Fri, 21 May 2021 09:53:15 +0200 From: Peter Zijlstra To: Hugh Dickins Cc: linux-kernel@vger.kernel.org, joel@joelfernandes.org Subject: Re: config SCHED_CORE Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 20, 2021 at 08:06:07PM -0700, Hugh Dickins wrote: > Hi Peter, > > make oldconfig gave me no help at all on how to decide whether to choose > SCHED_CORE Y or n, beyond it recommending Y. Maybe you'll delete that > option later, or maybe removing the prompt string would silence it. Ah, you're quite right. I never seem to have gotten around to actually writing anything useful there :/ Similarly the documentation for all this seems to have gone missing too. Joel, could I ask you to refresh the document to match the current state of things and repost? I still whole hartedly despise this RST crud, it makes it so hard to read / modify the files. ( I think the latest version is here: https://lkml.kernel.org/r/20210324214020.34142-8-joel@joelfernandes.org ) Anyway, how is something like the below, Joel can add a reference to the document once it's there. --- kernel/Kconfig.preempt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index ea1e3331c0ba..3c4566cd20ef 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -104,4 +104,16 @@ config SCHED_CORE bool "Core Scheduling for SMT" default y depends on SCHED_SMT - + help + This option enables Core scheduling, a means of coordinated task + selection across SMT siblings with the express purpose of creating a + Core wide privilidge boundary. When enabled -- see prctl(PR_SCHED_CORE) + -- task selection will ensure all SMT siblings will execute a task + from the same 'core group', forcing idle when no matching task is found. + + This provides means of mitigation against a number of SMT side-channels; + but is, on its own, insufficient to mitigate all known side-channels. + Notable: the MDS class of attacks require more. + + Default enabled for anything that has SCHED_SMT, when unused there should + be no impact on performance.