Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1419647rdb; Fri, 16 Feb 2024 15:50:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWf0DPONMYssqUryWMjWg3qwYfQHARpHkaBamF2mCYRONCVkGpH4Z2tdfzLEfaH4rsn5Ku0P0O645rE1SG82L7WuykAucEFEmNKO5sFmA== X-Google-Smtp-Source: AGHT+IGQ8qTj8NGBMp8aWKrKVbFxkYGqK3wEerGfr1noXKJF0MF2fy4K/5BPBi9I1YWbOfWZw7kA X-Received: by 2002:a05:6a21:3a87:b0:19c:a48b:6a4c with SMTP id zv7-20020a056a213a8700b0019ca48b6a4cmr8299436pzb.38.1708127412081; Fri, 16 Feb 2024 15:50:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708127412; cv=pass; d=google.com; s=arc-20160816; b=FOozWjgQS1Vqbn1uTB7xaOz9oVYn07Udk+5BWQeV0Cdv7Xz/aRqc9Y8zsAB1mmf6Mx 5xLVXRd5b4sZQd4RRxCC+jaBzMX2bRRWzwNjxwCpGwAvaQSBaoTjkCxaDm4EcL7eYjno mlGc2S/ddhsfip4vD7aYeN/+bZszdmwjIuctqFv/YnzmdJ2ehM7BCxvaHT/JwKyd3coB 4lRPjre+5AebV4rK0btQn3fb5N9XFNpCC6FIIrTw4t4rt+qsDmXIeAVrX0ca4DJXp725 Okfq2gSSdMpNeCqUEDx5hp1sMFPmEqsf5NchxMzxw6oQtJ8m5wiXlZ7OR4yIi9/Hcr2g 2v3A== 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:dkim-signature:date; bh=i1dxXMhVUP1rgHFbx3bYUtrQ4Vj3OMrjAfFZh9B2nko=; fh=ZX1mQe9vQl9pPM1dVUQHi1h0y0vhcnnbIS+FULnWS30=; b=C9jFzcxG+qERpw5iohzixt8dsE7QimTpuGJWuM1vliejS5Tyhb8Oh/9utQCVkhxeWC LwE4P+Rw/UYAKyMTOoD+cLGDTVxylDs2Vv5SAFYryl2+bfOKp65ifnrjKnMMRfGNca5d Hfpo7urQqkJBpb1kONls2FGtdekXAXGLlsDJ60Kk3varuxyoeQvej3uMdz4rm0JXTX1R b1NhliWiXtvkoxYIw5U3iA8gjQRH1yGagks5J6TWN+JapudIdZG/jGKQsdFW9soVboxU aChCqh7FX7N1EUzRmpoO2OuAO1AIgiHPf+jaxcmOwAzg4A4+nG2kQ94FHJs8RbwLkTVS FhXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=C1BPf5NM; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-69477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id rj3-20020a17090b3e8300b00296041acecfsi699848pjb.1.2024.02.16.15.50.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 15:50:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=C1BPf5NM; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-69477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 24B53B23B6C for ; Fri, 16 Feb 2024 23:26:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E06014901A; Fri, 16 Feb 2024 23:26:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="C1BPf5NM" Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 543E7148FFC for ; Fri, 16 Feb 2024 23:26:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708125982; cv=none; b=vBBTtaf6a51xxaKL8V6D8tDy3WibHb1FJjPM7xxtYWJidJAFPaA2egpUSwLNEfSLZdtown58+hlS1IboU7Gmb3vKjrnuNRA1j9skrWpgxHrVGJbUkQH+H6S1fLTZb2v3yvM07TW/H2XUGgwFp8F0C3z8Tphk8gCWynQYfM/bEYU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708125982; c=relaxed/simple; bh=HjwfytaqXF8iH9Dbpef0PBEdfS3nBXLDDCpMfB7MbjI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NLpRpdWZu3bguPgtfusFCpq6HaXksAGs1PX7DTAoTUaSKVoRVs8UyhhUmhmd2mWPbVoAJUDGrAy0dFhR/THu8ZpUytu/QQwytnVhpKVkMhUGspfoN7aE3wD4pOk4FwITS+41d0VmyNABZsrJ0SeSpdebWjIrdDQrRLsg94MynKI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=C1BPf5NM; arc=none smtp.client-ip=91.218.175.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Fri, 16 Feb 2024 18:26:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1708125977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=i1dxXMhVUP1rgHFbx3bYUtrQ4Vj3OMrjAfFZh9B2nko=; b=C1BPf5NM9g0o4QItUPGRDmMrvEdGWmyuKm4wf1nFggUVoULHG8BShovAlb221Bb8TlJ2Ja KutXp2dyrtywnpnLlJsZyWbMnLgEtGr2j6xQgJwjPAMGkgKbYaLIt/Hwmsmi7ACHkQBytE lKW+kj7xiaratGuJKp1Q6urfXB8QmCo= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Kees Cook Cc: Suren Baghdasaryan , akpm@linux-foundation.org, 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 13/35] lib: add allocation tagging support for memory allocation profiling Message-ID: References: <20240212213922.783301-1-surenb@google.com> <20240212213922.783301-14-surenb@google.com> <202402121433.5CC66F34B@keescook> 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: <202402121433.5CC66F34B@keescook> X-Migadu-Flow: FLOW_OUT On Mon, Feb 12, 2024 at 02:40:12PM -0800, Kees Cook wrote: > On Mon, Feb 12, 2024 at 01:38:59PM -0800, Suren Baghdasaryan wrote: > > diff --git a/include/linux/sched.h b/include/linux/sched.h > > index ffe8f618ab86..da68a10517c8 100644 > > --- a/include/linux/sched.h > > +++ b/include/linux/sched.h > > @@ -770,6 +770,10 @@ struct task_struct { > > unsigned int flags; > > unsigned int ptrace; > > > > +#ifdef CONFIG_MEM_ALLOC_PROFILING > > + struct alloc_tag *alloc_tag; > > +#endif > > Normally scheduling is very sensitive to having anything early in > task_struct. I would suggest moving this the CONFIG_SCHED_CORE ifdef > area. This is even hotter than the scheduler members; we actually do want it up front.