Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp840855lqd; Wed, 24 Apr 2024 20:26:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUoZzXuIC2mSItnjT8Zjln1DNHGCZtl/MVToDpSepXCyIUiUD8gQC+8zjF19IjXJw4eFpaCCHNydoVwwXu9mClGLhLNdml/d5qDenKkKw== X-Google-Smtp-Source: AGHT+IFPavnxTi0ac11u5933N2AjVoFPayoSJgX6jiiG63h/C5DkHdG4yYnp6tdGEEjXhLmRT4V8 X-Received: by 2002:a05:6830:19da:b0:6eb:7a4b:a56e with SMTP id p26-20020a05683019da00b006eb7a4ba56emr5116852otp.23.1714015595105; Wed, 24 Apr 2024 20:26:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714015595; cv=pass; d=google.com; s=arc-20160816; b=FSZpmtpkZXQ3kmTRii6b/GkBjEdLX75YtH4PJlTvkpCRtkWUwEGWDoshgM7G04onMb KxpbiDE5Kn92LuOgUy8NsvfXit8ZQQRQvBuL8K9BsqRUZDale3u4wnlI5BSwrcmkhCoh IQUlWndNJCe5di2ailaWJbqYZOb6y+Dom/tvRauBEFvjCRUgv6FLjqPp8QqNfuaGhqI7 sMwnnZgt5Jwb6P+Jq73imdQ8t7qfLkMoOGllXYV/JjklZ+RjkTns/43pPs6lCCdV1VIH OCpL6slOCLPp7ROFiZzfdP0Uly1jmwlB7ezik56GrAMT5hpS57pyBRQrkViFNQrbyemY 8iXg== 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=B4E11bh0mnSYCbs7XlFu6X7DBUDw+NgzQF2QoLRfZq4=; fh=77LLyW1dlUNu7NwY6XTVihyowrlfxy9OIGb7ziNH6XE=; b=S36Cse7FXdQntvsUtTDpDll4VH42++zWvNlErUuuRLBl1p/YaxfKfmV6hhGLOjKCji p2eUE7Iqu0ATiUfpqGAZsUzeF3dMGzwzgrIoaMcR/zxNlqVNPro/gZAjCgEtIlQDoA/W fRG5pPb02P+dQ7Y/2kT6/bCWRCWspltUn+5daSh0RnY9iD+0jQmVrcHOwXoJdxmzVOcn uESUcEyJJTYdDOQynWlqLN7pPoYUwafIyWv0bB1WGANmxZhREd+vTqQA/jeY1RPqNPAR N42ZpUPBxqWRAKaLNX+nUhIyWGLczSNDf6gI5pUJpmylwqflFZch0V/a0LFq1dlNjfEB IsFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="SB/UBFh9"; 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-157967-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157967-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m15-20020a6562cf000000b005dc85dc982asi12039103pgv.832.2024.04.24.20.26.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 20:26:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157967-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="SB/UBFh9"; 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-157967-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157967-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 57B7A2824B5 for ; Thu, 25 Apr 2024 03:26:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 934972B9CC; Thu, 25 Apr 2024 03:26:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SB/UBFh9" Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (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 9371A1D524 for ; Thu, 25 Apr 2024 03:26:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714015574; cv=none; b=HeHHfUewg/vfJoO5kyg7Rgf4PCr+d6B/gVKY+MVx3RXr3HhqmuVTy2BgFwhlb4dyvYWxBqr2Qtj8j5RnTsumfRo8UuAdBAtR6lWRR9OPAnV2V9M5uUGJPzH/REVtFcSHmvLRIbXaUdFfY49lwB/+87Jmh7rcWiJNhmVikg2ik5I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714015574; c=relaxed/simple; bh=88mSEe2XHZvT1rBs/fYya7T2WNxPEAzzgRRezEnLHpg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Nzr35g+JRr/BwlAc1y+eW+9f9dXunvTvHG5coq4SGetTCnf9teean13EsSPqRj4OCKFtSWeRrjU/9/QlYh/gqBvj2d6YM6HpshlRgiK3GFmwjQe5O4eBFzt3JoxScahDzO4lFNLJ1jeoTkBjp/lKf3lUbCNPn9FEdSdJtmnJ+2s= 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=SB/UBFh9; arc=none smtp.client-ip=95.215.58.170 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: Wed, 24 Apr 2024 23:25:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714015569; 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=B4E11bh0mnSYCbs7XlFu6X7DBUDw+NgzQF2QoLRfZq4=; b=SB/UBFh9p4EtaUdmuFy3Y/2llf6hAFYeqTBTCq9EEsoT+vbVj3Dlf1lTZDFcjgmVyftRCV Waevx5gMLX6VuaMH0g7owkCnFmE0q6eqUFo94c3PjotScdKb99fpqHnymmit8v+7TmVjp+ fv6zDMYTkmqCw9Lze8Tza4V/pRVw9Ow= 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, penguin-kernel@i-love.sakura.ne.jp, 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, jhubbard@nvidia.com, 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, songmuchun@bytedance.com, jbaron@akamai.com, aliceryhl@google.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 v6 00/37] Memory allocation profiling Message-ID: <3eyvxqihylh4st6baagn6o6scw3qhcb6lapgli4wsic2fvbyzu@h66mqxcikmcp> References: <20240321163705.3067592-1-surenb@google.com> <202404241852.DC4067B7@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: <202404241852.DC4067B7@keescook> X-Migadu-Flow: FLOW_OUT On Wed, Apr 24, 2024 at 06:59:01PM -0700, Kees Cook wrote: > On Thu, Mar 21, 2024 at 09:36:22AM -0700, Suren Baghdasaryan wrote: > > Low overhead [1] per-callsite memory allocation profiling. Not just for > > debug kernels, overhead low enough to be deployed in production. > > Okay, I think I'm holding it wrong. With next-20240424 if I set: > > CONFIG_CODE_TAGGING=y > CONFIG_MEM_ALLOC_PROFILING=y > CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT=y > > My test system totally freaks out: > > ... > SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 > Oops: general protection fault, probably for non-canonical address 0xc388d881e4808550: 0000 [#1] PREEMPT SMP NOPTI > CPU: 0 PID: 0 Comm: swapper Not tainted 6.9.0-rc5-next-20240424 #1 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 > RIP: 0010:__kmalloc_node_noprof+0xcd/0x560 > > Which is: > > __kmalloc_node_noprof+0xcd/0x560: > __slab_alloc_node at mm/slub.c:3780 (discriminator 2) > (inlined by) slab_alloc_node at mm/slub.c:3982 (discriminator 2) > (inlined by) __do_kmalloc_node at mm/slub.c:4114 (discriminator 2) > (inlined by) __kmalloc_node_noprof at mm/slub.c:4122 (discriminator 2) > > Which is: > > tid = READ_ONCE(c->tid); > > I haven't gotten any further than that; I'm EOD. Anyone seen anything > like this with this series? I certainly haven't. That looks like some real corruption, we're in slub internal data structures and derefing a garbage address. Check kasan and all that?