Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4932985rdb; Fri, 15 Sep 2023 17:58:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHETneaMCjQtIvvciACRmIpaF5IIf54v0wmwd8LYenEOf0frbfFFwYug47UNaYyW/RsLMrI X-Received: by 2002:a05:6a00:1a4f:b0:68b:a137:3739 with SMTP id h15-20020a056a001a4f00b0068ba1373739mr3511445pfv.4.1694825932945; Fri, 15 Sep 2023 17:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694825932; cv=none; d=google.com; s=arc-20160816; b=oyhsLqWaBbOeXPcSZo7PIrIZl65MV3OGjAW7i1rrNOjVUHGnbeUBVr8mJjx67cmyaA go5akpDKqVaTDkcvcre77Ghj96eVVrnJ3mgqoqva7XuXQe6tn6LhcYFh2thqCSly41GW N4P4but/vT50DhrGjgfH0DJNQ02+iyRxNG+QJHE6f2gCfrGYRd23x/Utr4GTa+P84/Xe lqBIlfeoxKiKNwTpr/jLw/2TQ96vv5fYnrcyiv9PbxdT9wu2XSpgCFRNsJsW30K6tD8o GD5IKa79EYbog26LE55DfCCl+zD6ON17HxJn0ADekUtl5dp2DGG4oR8yEtkcnPuE3GHB ji/A== 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=1USzWYUGvvuIEVJkYh5wRYXrAoKFGs+D9zdSuXXuGko=; fh=jqyVLh6bCUdwF76+d1nSsH9gan5yVpKFn6DRJJLnHtk=; b=x4QX6bPlQt/EvaDxPzjsAlZdz3lAd38ZNVku9nZYtp4+tP4kidoU70skUfbKRO8sEr 7SkZbVLRtb8g/BEteKk0K9ptLPRHbiYjYTl4wD+JOpqvZKfNPGQVRr3mPyJD2Y4bXvj+ zUtvymJ34xTYtIZH3NV+b8XWxRlSFW4lq54dlwiMJF6a61H+ZMkEzDxVPBT7AvY6/R3u 6Gca33a+7H99pO/R/k2haAqNaoTTVK1ga+3yTETZGZinHeOJzVYnE92HYNRsPTsO9MR1 t1gnt0w+rFofhhdfIaUcpgcdIGbhU35U9ikpoTqMNHTGjYzwv3/6xlKIMYfIJM9IK4lH FPEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CHZ4Br4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id cn15-20020a056a00340f00b0068fce6a86acsi4085620pfb.121.2023.09.15.17.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 17:58:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CHZ4Br4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 092DC80CC211; Fri, 15 Sep 2023 14:10:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237501AbjIOVJX (ORCPT + 99 others); Fri, 15 Sep 2023 17:09:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237154AbjIOVIw (ORCPT ); Fri, 15 Sep 2023 17:08:52 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D646A0 for ; Fri, 15 Sep 2023 14:08:48 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1c434c33ec0so8613185ad.3 for ; Fri, 15 Sep 2023 14:08:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1694812127; x=1695416927; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1USzWYUGvvuIEVJkYh5wRYXrAoKFGs+D9zdSuXXuGko=; b=CHZ4Br4anGAQsDYK2xv2w0WNa+PxFhcQ03z08OEERDJPkjtUDddOwcXa1qvUcwyiBd vg6LTimDbaww50419WFegtYr+cH89uLG+2DsIMGnLgGIDaoTfUZYqjShLLNstUNTGueZ RpBQk1jHcBV8J7e/EI8PRgWu0Ux513cCOiAYU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694812127; x=1695416927; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1USzWYUGvvuIEVJkYh5wRYXrAoKFGs+D9zdSuXXuGko=; b=JcJ9whCHOMT2NXea4YE5PaqvmUYLn/BT/A2JMd33e7KOxHWgSSgZwxPBSclNffIuW8 /AScb8xcQcbbmx8kTD4eNYJhQ7klxVjAogZVjcDGTF44KYWndLhTnVCzTesOohE/0nWN B7s4e0VOL8HXL8UuMPkbePBdtS7Nugwark5hTWMmp/a77Z1A3IKO5rw72a+r6lgXEk/5 ijJVjHRNw5Dw4mdjzg/yfcwz8dIG41BbS1XA0NJtXNWbRCHxA7JIP6OwljoBD8EMgtBC GZUr6YfLdf8ON3IZy7Fl5icRz8KR3qMPJERGRFCbHZoIQyO1JDOdwDP36SKRkFuKiHM4 y7WA== X-Gm-Message-State: AOJu0YxAPvyXQjGoJ66/oHc69BtVd6eOq1PoS64JmNU1OPYlhP0BD2/y 01a58DG7nMKe9migldsAIqGd+A== X-Received: by 2002:a17:902:64d6:b0:1c1:fc5c:b330 with SMTP id y22-20020a17090264d600b001c1fc5cb330mr2308796pli.12.1694812127548; Fri, 15 Sep 2023 14:08:47 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id y11-20020a1709029b8b00b001b9e86e05b7sm3916537plp.0.2023.09.15.14.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 14:08:47 -0700 (PDT) Date: Fri, 15 Sep 2023 14:08:46 -0700 From: Kees Cook To: Matteo Rizzo Cc: cl@linux.com, 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, 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 Subject: Re: [RFC PATCH 09/14] mm/slub: add the slab freelists to kmem_cache Message-ID: <202309151408.A419BEAD15@keescook> References: <20230915105933.495735-1-matteorizzo@google.com> <20230915105933.495735-10-matteorizzo@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230915105933.495735-10-matteorizzo@google.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 15 Sep 2023 14:10:01 -0700 (PDT) On Fri, Sep 15, 2023 at 10:59:28AM +0000, Matteo Rizzo wrote: > From: Jann Horn > > With SLAB_VIRTUAL enabled, unused slabs which still have virtual memory > allocated to them but no physical memory are kept in a per-cache list so > that they can be reused later if the cache needs to grow again. > > Signed-off-by: Jann Horn Looks appropriately #ifdef'ed... Reviewed-by: Kees Cook -- Kees Cook