Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2715338rdb; Mon, 12 Feb 2024 14:14:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXvVLv3GyOhMOU9bK8aP82EWan7q5j2YIJbuFhERCg1Yy6ySRwYfWVq+JnSqrYf4L7M9NJytmEdAiGr/9simLZD7VsAmZYf3zpoHtqK9A== X-Google-Smtp-Source: AGHT+IH17vIg9jkH18aax+8R4kD1BSkH4HlkoA8YOUlDwNDKrOlV9me9iEJU6h2WBrLroGez72Hp X-Received: by 2002:a05:6808:f09:b0:3bd:c19f:2fa3 with SMTP id m9-20020a0568080f0900b003bdc19f2fa3mr11208991oiw.51.1707776080669; Mon, 12 Feb 2024 14:14:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707776080; cv=pass; d=google.com; s=arc-20160816; b=JCsHl+AUek6GSEJAK1TjdJJGvfQdiltxsQ0RdQeD7P01oqL9XkS41FIyGFdCToC0/B vPCm21ppoMuvSBgf8UFq4mR+kBUHDZDXB+HrG6sPaLJ/FCsTnUTRfOElEE050YdMvT7o 3LDdv0YrXlzplKOAOzx004dIpNfzYLAETeLAMikVe9JGK1CpVTCeoNFy3dGkOlE1EQny iq1fuzTQZiSbChMfF3Vwhw5t7ZkEJGkvt3YUKWIG/OQYsHg2fxcG9xWxZ0ucOk2fO7Qc eaHBzfuV3lO2Xu9JIeFPqDeqTZaFz4xLpFvkdn/J8I5jkk/rdrX7bH0WwmIEZfVuqWIh LtEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wZiXjxKnrMyz6iBNN8FZ/8Z5umOyXaSKjAB1K7uHil4=; fh=SVBEbVeCko4mfl3L4SVHl30kY2AKp3LJp3/BPF5npF4=; b=dPkYca7unPD4AnAqbg0YCAz9jXzVikmPyo/MNDt4k56g4sErqE6sF3/jE8eq9j1HHr fvYWsLibQF6ppPn2fygSlw4MMD+n54usHmJ1tAqSAfCzmhjpCvxhwDdvomJEEvR+InRu afkA7vKSJ2YKYBWISF0juO5wSS1tn1xvKLBGnY9wRJxEARchYWvnHVH8qRuVVHr+FQMq ub1Hej0RWZsRl1pr3vs2EK4FeuEr2DgxzN20nvw/1ryquCguhk87htTLYde/p+LLxWIt 0XZFh850PO/VnxVV+AyS9yoKrIjxIunO+v3v9Id887hSUPd0Bgh2p3n1bvAoTgDOkWPl A1qw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Y0pKnnLM; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-62463-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62463-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org X-Forwarded-Encrypted: i=2; AJvYcCVVG+/ED+BpUJbliFKQ0ogx2tABZaMw6f/jQ3Imxhgb0kULB9imvFSmZemIFqlY2sb1SBJbZDtkzJ0HVRsp0MiK/pEe811wfvNTKIRKBA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b9-20020ac87549000000b0042c33ee227asi1276743qtr.394.2024.02.12.14.14.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 14:14:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62463-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Y0pKnnLM; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-62463-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62463-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 49C481C2228E for ; Mon, 12 Feb 2024 22:14:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94FC94DA1F; Mon, 12 Feb 2024 22:14:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Y0pKnnLM" Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94A484D599 for ; Mon, 12 Feb 2024 22:14:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707776060; cv=none; b=TbJVF+BL/+NN076WIqhWzmwH2LslWy6dopGmGTcoen4BtacIli6DivuXrWMz2dhT0lHqcLkfvUAvMlq2Lj6pxgR0uwlVpAml0p+joM5n/Ieu8x1mnshXqEcjV8tGR+ffOIdiihggN5SGqkFCerIsXjAFyDBbhq2UK1maoTyamoU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707776060; c=relaxed/simple; bh=16fk7xoE50+bBNfgxcCm+Ee3v/cfVODmJmytJVNx6ZE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TwYh/O997xZOCvDnxNibsZYy2UGx4U1wYo/+ukWGm3eSE0Psp/l3Ea4CX49auEhMuHrh21eg+M6Ba1vwrp0O2k23Fw/WhOJuavf4kQCScJA/URYSUA5aQjYMLG2qFnbt+TQdRLSZTubkl0Xvw9yIIEIFB2W1NQxUXNUj9EP/pkM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Y0pKnnLM; arc=none smtp.client-ip=209.85.210.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-6e12d0af927so2503275a34.0 for ; Mon, 12 Feb 2024 14:14:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1707776057; x=1708380857; 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=wZiXjxKnrMyz6iBNN8FZ/8Z5umOyXaSKjAB1K7uHil4=; b=Y0pKnnLMUuTV5nTgugxSZPcfBuGuQ2jKMG+tv/9HT2Q2WXIryA6UU0aQZrBAaBet73 aAW/gQnbPsIsASOLqhCY2pkSOe7gWKbpo/zrQbqfFSAttIF3GLTrRAFCFT3o+qHgEpht XoDjQJqAfIiTfdkZc6LbecsTBWuRapkfu6KCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707776057; x=1708380857; 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=wZiXjxKnrMyz6iBNN8FZ/8Z5umOyXaSKjAB1K7uHil4=; b=IjpDHm9MAi7LbTunSjR1YYdcZPh3hHXIWm3ZRT7p6705kvfNl8mhdCTgaGZpAByfdz 9Y2NN840HATQU163qFTsmL3xTyee3AfACspvQxCkuXGpL5bvMiGLzLCxasNdcWownnTL isfsMNn/Ts4GLfr7+j1/zfsA+CWSmNQSTPWvZ0oNQK0Qc0ItC5tN2JWoegHB+OYuHAr8 cHM7bRgskEvI90Cwp7yfxZJ6EEXhdb1AJ5wCD/5OvVQv2YqBhdBI1re8C0SUx1y+M0lk +/VqRo9wmnYvZ3+WLgaw7aSBRCVoXbAm1p2p/oSR/8dpbgr9+jiFHu5CyduzSSm/7oys uIVw== X-Forwarded-Encrypted: i=1; AJvYcCUbqDEGgwSshINaXN9BOuvLndy1M1UvK4QzOj+28D2bw8olFeABPMEB5c+DZbmCn+nFos6n44nQCvkJfLsLL1AM72ZpgvvVcnK2M8P9 X-Gm-Message-State: AOJu0Yw7LDO33Hf16QIBoibk39uukMN7IHEbV5kVWwXQV/KIvh9lS7Yq UNKBYYDBKWHPtbUg8ghsuW0oJNNNOuvsDNu+4P4JJ5+BH/+yZ1neDRfdGAImKw== X-Received: by 2002:a05:6358:7e41:b0:17a:ec8c:72cd with SMTP id p1-20020a0563587e4100b0017aec8c72cdmr2085486rwm.16.1707776057707; Mon, 12 Feb 2024 14:14:17 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWg3dML8VKifNsHk2CVNShk758+NTmByKLZI72E1V2q4Wu9oUmJYkccV4vQiDGOQgADidt5TguGkvh7V4YwOg63GLUryvPiyAQ7f48JUGKHk5FmbcUkOWNBC3Ux7+ARsfis4drosOSrq4FcO2E/nb4nKPd5tTo1IpF7Z2ZQEg+WFRPMypAJ1e34DAT+XFI/el7dGRYPGKNGvKQ6aS8/NETGtgnEw4gK8U9U1Hv73eJqHAkKRRk3J8Ph4Ck//KLXOSNRvO+rAIzUOniypVv1/4JK6yXaykyMLrjMOY39G+2fpgxPBGFw3nZ/LH0KQIjw0EkWhY3rJoqcS/NUxqyJmBf0+SxOykkUoB0LcAsReO1NjiWu0KRnzfLjhQG17Mx1k6lSx7ZZighHq1IIEqMNKmrf+vg0gcVHjQdB9dMPLIKL8hpNfHfvE4J6f62rNrCDo8Bd7E53U+GZrPnL0LkHPW+og8Hr772ylPjBjfFLnALXxOiqaNCPEiXgFsI4tlEu7NYq0RiV8tZ22FLSM13tuC21ckHIWSqolHrrEG281jvnKKCQqMQuN+O/NTCkXba09zfBsvtBX8T2lqUmkKdD00zzZRvUtnr587FITudCjm3qCRbvrPscljCRS1dQo3iBQh8Zy18C+pJxaLHX0SyV1nKKQzyumJgyrZRPaWmuLpyLmJijRnh1cQeWSVGBxt1Wxl7ZPOvMuLO8rM6/m1ZJffXJtGOBjfOlZIyZ/d2SeZ/s9b2tmn7hjA== Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id le22-20020a056a004fd600b006e0a30c8c8dsm5334232pfb.117.2024.02.12.14.14.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 14:14:16 -0800 (PST) Date: Mon, 12 Feb 2024 14:14:16 -0800 From: Kees Cook To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Subject: Re: [PATCH v3 05/35] mm: introduce slabobj_ext to support slab object extensions Message-ID: <202402121413.94791C74D5@keescook> References: <20240212213922.783301-1-surenb@google.com> <20240212213922.783301-6-surenb@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240212213922.783301-6-surenb@google.com> On Mon, Feb 12, 2024 at 01:38:51PM -0800, Suren Baghdasaryan wrote: > Currently slab pages can store only vectors of obj_cgroup pointers in > page->memcg_data. Introduce slabobj_ext structure to allow more data > to be stored for each slab object. Wrap obj_cgroup into slabobj_ext > to support current functionality while allowing to extend slabobj_ext > in the future. > > Signed-off-by: Suren Baghdasaryan It looks like this doesn't change which buckets GFP_KERNEL_ACCOUNT comes out of, is that correct? I'd love it if we didn't have separate buckets so GFP_KERNEL and GFP_KERNEL_ACCOUNT came from the same pools (so that the randomized pools would cover GFP_KERNEL_ACCOUNT ...) Regardless: Reviewed-by: Kees Cook -- Kees Cook