Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp309386rdb; Mon, 18 Sep 2023 16:19:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeY/7kztWHyZyWLpbNFXOvCwJrZA4IIgCYOGgZp3qQi6Ki4QVK3sNpX8O1Yl6hP85toPjM X-Received: by 2002:a17:903:2345:b0:1c3:a4f2:7c99 with SMTP id c5-20020a170903234500b001c3a4f27c99mr12097179plh.4.1695079152395; Mon, 18 Sep 2023 16:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695079152; cv=none; d=google.com; s=arc-20160816; b=j6Yv0i3xHdr8WpzysBStJaNDNOEkOcIHrwuwMvBEBNZPCaupmVxoA2Qt+LgoMh0wG6 9hnlXK6uYXllAPEJmavLdPYuEb0gFm7e4P0/63yacJJP6uoap6PWkB2PbDgd8mtz1DES zG3/66ZBQieb+tzwBWXe1rY8LpOJJ+NKt6dzSe+7t86BFkS/xbvVduswQHdNTfdK1sCB NUJ0jD6KJFP9PnI0eYsMEWQHdOp9GuXo2wdgZwcCQ0UDdFS4CDsI2IG0HL/gMV1xqwBY 32F25CZXscxmxI38XNp3Y5GYaZqbQKR2DITNEIBQQtiDS5QpFiDyvlfBsdUzj+1Miceb H1gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=q9he4ZTvSFJmzzOtbECfSpps3SrCLJMjInfE6GKKq3k=; fh=2ftj3fdXfbSwPowBOVX1KnkiRS88gUYtDoqK5fKJKuk=; b=uBQHgfguIoMFIKL1J6Glp1aHLD3at+NTXz6cN759PWrgEdCB0+Midyde9TYdsl/VBt eA9i0pg8r3h26AbijA0xeKZyftDB8jL+bwypNgDtQeYCFYIZw0zoiAJhtrUg+dQImX3P pgkiQ1pabQj18uAEc9znrxn5SEDZN314ZPyqwYnmML7lDu9qgUEwZXMjeYYzmK1XWZkk 2la4Z2kNjPMDUwv0tETo+Ae0vKnbO4wbPSzmNJ8vkJjUz21T+JhjtKkb7PIhdg9DFMyc C89LZejyf3xhs3OmQKSEyvsR4WTFP3HzY7j/mQ0WKcp2Bw2ETqTgUO3hIJIS1AgXsjvW EKYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bUVgWHMn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id ks6-20020a170903084600b001bf0cc53d1fsi2219302plb.343.2023.09.18.16.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 16:19:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bUVgWHMn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 455198233523; Mon, 18 Sep 2023 11:06:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229518AbjIRSGA (ORCPT + 99 others); Mon, 18 Sep 2023 14:06:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjIRSF7 (ORCPT ); Mon, 18 Sep 2023 14:05:59 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B2A8FD for ; Mon, 18 Sep 2023 11:05:50 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-99c136ee106so642338166b.1 for ; Mon, 18 Sep 2023 11:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1695060349; x=1695665149; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=q9he4ZTvSFJmzzOtbECfSpps3SrCLJMjInfE6GKKq3k=; b=bUVgWHMnkjjX89LpVYBlYAFFxi7k49SUfS7HOxtazHqfaavZYbHJ5mwmm1coywq111 tGHfxKK31VpOn6AABTT5Xp5Q7VLKplkdPhUdm0OfncABSqD0cnfWMK9ffvYojxqAogwa bXHHzKnuiWMh6HMPur4X7IFW2OUut4UM6PXXM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695060349; x=1695665149; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q9he4ZTvSFJmzzOtbECfSpps3SrCLJMjInfE6GKKq3k=; b=gXy2vlvPQrEBOSgigzinI8HjlELuXyo2xPVLVvNktuV7HaAIgOf6W2aCIVGlKFsd3r MGBgUj0uE6vZnHq2NKgDh3A6KzqW4FN429oHXL0w48q+Xn4BXYlJk+lxmAZeL7obS464 DrN4mEmgeqE4tfuWJzpoK737QbnVQSGPkpf/8QDei34dBAZ3rd+uKpDrIrp/TldqL+4p JXHgCbdxYi1JjzKYyTx5zprtiN6orwr2rO4+/Iil7ZHazQQ73t328i9pLfwKn0aZFOmt UwNBotCJzlu0BGBCM1z+TuJhhQg+g3DdYR4elYvGIWK53c5m54icLQnupwyraJ31IdHR L0xQ== X-Gm-Message-State: AOJu0Ywla6KZOSZJraG8THSnHpcGZl+T7mwvzrMmc1ZC5yJ/0gMQD+dN N7XzlbQXPVPOwlE9Owkd7DRnYjSWvcnYqzZfVBBVUh4t X-Received: by 2002:a17:907:7714:b0:9a1:bb8f:17d0 with SMTP id kw20-20020a170907771400b009a1bb8f17d0mr9026024ejc.30.1695060348940; Mon, 18 Sep 2023 11:05:48 -0700 (PDT) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com. [209.85.208.45]) by smtp.gmail.com with ESMTPSA id oq8-20020a170906cc8800b0099bc08862b6sm6919775ejb.171.2023.09.18.11.05.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Sep 2023 11:05:48 -0700 (PDT) Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-52a1ce529fdso5862569a12.1 for ; Mon, 18 Sep 2023 11:05:48 -0700 (PDT) X-Received: by 2002:a05:6402:2903:b0:530:d53c:b4d with SMTP id ee3-20020a056402290300b00530d53c0b4dmr5507496edb.35.1695060348351; Mon, 18 Sep 2023 11:05:48 -0700 (PDT) MIME-Version: 1.0 References: <20230915105933.495735-1-matteorizzo@google.com> <7a4f5128-28fd-3c5f-34c2-1c34f4448174@intel.com> <1d7573c0-ebbc-6ed2-f152-1045eb0542f9@os.amperecomputing.com> In-Reply-To: From: Linus Torvalds Date: Mon, 18 Sep 2023 11:05:31 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 00/14] Prevent cross-cache attacks in the SLUB allocator To: Ingo Molnar Cc: Matteo Rizzo , "Lameter, Christopher" , Dave Hansen , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Mon, 18 Sep 2023 11:06:00 -0700 (PDT) On Mon, 18 Sept 2023 at 10:39, Ingo Molnar wrote: > > What's the split of the increase in overhead due to SLAB_VIRTUAL=y, between > user-space execution and kernel-space execution? ... and equally importantly, what about DMA? Or what about the fixed-size slabs (aka kmalloc?) What's the point of "never re-use the same address for a different slab", when the *same* slab will contain different kinds of allocations anyway? I think the whole "make it one single compile-time option" model is completely and fundamentally broken. Linus