Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp957224rdb; Tue, 19 Sep 2023 16:00:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEUCI1v0p73q78bJDjC+xggMgB1/vpl9WZEAh8e/xTuENk353ke9vvTjUQt9p9nqhwRpJRb X-Received: by 2002:a17:902:ec81:b0:1c3:6705:bcee with SMTP id x1-20020a170902ec8100b001c36705bceemr1028643plg.57.1695164413230; Tue, 19 Sep 2023 16:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695164413; cv=none; d=google.com; s=arc-20160816; b=S1uZ3dhO7ePcmJVwBFWwxM+jBhx/P5qAptMGNWd7Swb75WtTT+P3wYx+TLDjwqK6wJ cBHoriNruiSmuHgDxqP5j7wWVJ56J6Vi3Vvk56IJQH2h6Z3oYTFoVG3X2VVJp11sJTMf YLGMLaSIv/Od2YIkn2nXxtXCvWOkJOcdbYzS8mhxrJXsIFzfHK7JDpt5h07GJ0dxZvTL IyAx2wiJgNFamCKVTWclKC3PU/VDxGRVSYNcyb+E01BCqXMEtOBY/cGu++mDTwMnx98u Qw83ZZMpAhqTZS1KKsgCwQZVEYShgK1+ypQrqtHsKp9dkreGGmPHqpYv1vwOE6I8vZb7 V/fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=OEdu2g01aECyCFr7xlTp8RBgniB55w3ERDlk/xtDrF4=; fh=pIOSNa9ZiyQsthxCNuyzHEloBKPj7iiY+bkrASU6uR8=; b=0jM2iMeVgGTlo89uMLDRJZ/Vmyyz84rJTKH27WkU9cvAR/y1E+oPsFXaFVWiDHcub0 7+wuy+J/3EdN5An/bg4B9mQn4pwd6uHSiVgaH/aIAwuX4WbuqE3P3XsysKnG9xN/iDrR N3Casa2g0F0r2OHGuFBftlccW1HyAyZvmYDdKxYbVXkGPV7NeitcJySc5jqcUd71wFHD FmDm9hZfIWpVN2MaDclVI26c2ECbCPwKi14tmlZ9VAJ9nCRZDw2IhT5kaEF51367tfBe udl5IuRCFgkmQ0YGNumb+L/5QOE9mjfWqBb9nnTdo78AUP6lWQ2PxTohJwi/OvvTskNR qDgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="hUmE/qXZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id n16-20020a170902e55000b001bc02b730f3si10888176plf.242.2023.09.19.15.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 16:00:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="hUmE/qXZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 59DEC809C676; Tue, 19 Sep 2023 09:06:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231697AbjISQGW (ORCPT + 99 others); Tue, 19 Sep 2023 12:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjISQGV (ORCPT ); Tue, 19 Sep 2023 12:06:21 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 903609D; Tue, 19 Sep 2023 09:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695139575; x=1726675575; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=m9SJWOh+sBbmoBDHuJDTvYjtZel5Tu2jwPotxz7MjXY=; b=hUmE/qXZSiQD+5XsknaEFo0x2rsll9vKPCfvl9ONYITWx+H9YLLoCqZS qKaVaY+AK22EzNm0VkDF5l9s5YV8zHIB1+5J0AOvaVNd6gEI/M3uLE1Me pj1KWt133UHBj3q+Il4a6uS8SWKaz2SfJcZSmFT3C4KJWufaF6YdCM4KR CGLy8WpeKzxGktRfoYftpcjZ8axJ23ggJFEfTmj/BV/zdgOM+NRlb3eNL efzjLXF76bSsnqJpYfA1YpSisgmv+ASJBL4JFypZpotDTIM4AV/19fyY1 qmMKbJF5CgkficBqOjgol+qZyA80aS1tEAz5fGQuryHmFM50/3yB+C627 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="410908993" X-IronPort-AV: E=Sophos;i="6.02,160,1688454000"; d="scan'208";a="410908993" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 09:02:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="746294853" X-IronPort-AV: E=Sophos;i="6.02,160,1688454000"; d="scan'208";a="746294853" Received: from rdromms-mobl4.amr.corp.intel.com (HELO [10.212.158.204]) ([10.212.158.204]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 09:02:08 -0700 Message-ID: <782b131a-c3b9-7679-824a-70625c966def@intel.com> Date: Tue, 19 Sep 2023 09:02:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [RFC PATCH 00/14] Prevent cross-cache attacks in the SLUB allocator Content-Language: en-US To: Matteo Rizzo , Linus Torvalds Cc: Ingo Molnar , "Lameter, Christopher" , penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, keescook@chromium.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-hardening@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, corbet@lwn.net, luto@kernel.org, peterz@infradead.org, jannh@google.com, evn@google.com, poprdi@google.com, jordyzomer@google.com References: <20230915105933.495735-1-matteorizzo@google.com> <7a4f5128-28fd-3c5f-34c2-1c34f4448174@intel.com> <1d7573c0-ebbc-6ed2-f152-1045eb0542f9@os.amperecomputing.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 09:06:21 -0700 (PDT) On 9/19/23 08:48, Matteo Rizzo wrote: >> I think the whole "make it one single compile-time option" model is >> completely and fundamentally broken. > Wouldn't making this toggleable at boot time or runtime make performance > even worse? Maybe. But you can tolerate even more of a performance impact from a feature if the people that don't care can actually disable it. There are also plenty of ways to minimize the overhead of switching it on and off at runtime. Static branches are your best friend here.