Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1401592pxj; Fri, 21 May 2021 13:21:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx9FeOZXcFtlRqCzCm65d+mB9VVYA8BHFlNkjtNdk4CQv9yYLdIC0qyvbm5Tg3CtpjIzpO X-Received: by 2002:a05:6402:781:: with SMTP id d1mr13394097edy.32.1621628498387; Fri, 21 May 2021 13:21:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628498; cv=none; d=google.com; s=arc-20160816; b=bc07JzCL9Aun3OWTMXK98lVtyVdGEVnGC83BY+dFaC3sRk5xKuG/jjb1W1+dFKQClL SQu/3l8q3nQjTBMPtPX3opZkSmoMrVf3aiYQ8ccZQEYzL79xj45tMnOAIxzIf3ZawLsK mTdCNdgu9SNSWH18kSRRdFnOTM/LP0rb1/iJ3O8zKeu047C+7sG/IXTivNkxRiN8Li74 gbdlt+jNLCKk++Fa8xHnDG4WYSk9eIgIRT8nXNAt0mvZO8OiYr/+c/f+/UMqcagZ72+7 uv3+5K1GaTtDEO5BU0ZOSpf/fiSObjt6SBUtZBzxMtGEhho64MYLoShMDo9y4G6nMIQP +8Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=52L6TailJfOHnT60OyLMvZwjwsLknN3CBZJe6K5Xqt4=; b=bGoRa/JhvoCwMbaXCRGAPTkCf4ulr4+AvvH7JKGqt4lK2jLJ8QYEUdsYbop/cWqE4U JwWrT3WbWgJ8VQPmU03gOUjSQim1N3/gcgoxuEEEwd4dZ8u++FjkY0yNkyvupjo7uA26 L46xzA6wMXRUp/bG+ljdVV97bKrwm8QomsPTatCLsLmTA2vnGGhgBxc5S8mgpA9YMF7Z X+kEGxbQ3ao3oqS8Bs3tuB5qYIfe37xiQswn9jEh1+o0NTnmW6WrqxLmSt4mtBUlqy01 CySaZyIkgmx7ajqdhtrzgIbnxsNQTfPd7y+AUtTfbBLD2Fs9OLCUZslIRtwim/4menDU 1ZKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=qfRtg1DL; 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 d4si5944137edv.465.2021.05.21.13.21.15; Fri, 21 May 2021 13:21:38 -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=bombadil.20210309 header.b=qfRtg1DL; 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 S235171AbhEUQLW (ORCPT + 99 others); Fri, 21 May 2021 12:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbhEUQLV (ORCPT ); Fri, 21 May 2021 12:11:21 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE1D7C061574 for ; Fri, 21 May 2021 09:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=52L6TailJfOHnT60OyLMvZwjwsLknN3CBZJe6K5Xqt4=; b=qfRtg1DLskiwonH559Z7T0iK2s vwvVa1S3QQUDNcQFY439w/QP8dPt89Uc/C6iho9/DnJ+0Ek92pisZz4PWfDsO6DRuNUpaQLeUKqcP hZsN5KJnw6OpUQRgvlsa3CdpMjnhQsYHakEg9Va0VW36OYffhP63zMnn8mihg4iwJSmQoTiVdpZUU Yx49xaABymi1dk55bIwVdl75pIEypKD6PPGnDWDP1c8zZ/T2GqXhaW0LtrGUkTONOb3AkjbSllmGa MiWYdWivs4Jol5xoSeK2K4DNKUlWZcClw8WID1aPVNiDXDhirxaZaOJ2RllqwYrXxKuvKzalFGCqE dECZYv5g==; Received: from [2601:1c0:6280:3f0::7376] by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lk7in-00HGV7-DF; Fri, 21 May 2021 16:09:57 +0000 Subject: Re: config SCHED_CORE To: Peter Zijlstra , Hugh Dickins Cc: linux-kernel@vger.kernel.org, joel@joelfernandes.org References: From: Randy Dunlap Message-ID: <47848ac4-6164-57fe-de16-7ca6048aa371@infradead.org> Date: Fri, 21 May 2021 09:09:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/21/21 12:53 AM, Peter Zijlstra wrote: > 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) privilege while you are at it. > + -- 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. > -- ~Randy