From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 99C5A78276 for ; Fri, 31 May 2024 21:08:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717189684; cv=none; b=mWTi3Tq4kDiZDVvdk0URCTOJfXtmCOBFAYpQiliW4o3H+ORJc5bSMv9jXPRruxZm6R/GtURj5g2wQ28iCnGjTSutPwZ+Bp3RZMII54sC+ZzGoAOLiSspB13kjXL9LMnvcFHuSeBZ/Bhyow/fo/Z7J3IEQM+nuRV8MAb8VFijzJY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717189684; c=relaxed/simple; bh=jySXDNeokm7iuVZtdpS/Y3fW/yp7AlExakgw7S88qFo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pf7fX/JGK4ikHlUcMkHX/JoqNQ1gNcHETwdCEg69boZEoHnKzgXwhx7KwNOG3tjwM9UjvD5jsM2yEEC9e+u3gbzhOkjV+FADA5gcwtOVR0d9Be6G6COKiQnT4ZM2TcHCGz7dL5QaykVk9kFWnfLHAt57B16fyij+WW3A8MMeyaQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dSTxV43/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dSTxV43/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A842C116B1; Fri, 31 May 2024 21:08:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717189684; bh=jySXDNeokm7iuVZtdpS/Y3fW/yp7AlExakgw7S88qFo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dSTxV43/YOLNlF2y0mUfKZEvaZR/2abCx4X/cQkXJj9XD0EBWcRe5qKvs8ppPLEMM uP9ON6V4912/GEjROWHr7zx9Uy/O2axyvfKUWIDG8Zda/Nu8OeebL1XEZ2LMhsnVIf FB3Tuyafus+oV6vh0wH2C4s4X3GWgCZV4Uz6O7hftIh9uKRZa8TjKFtROzOP2n1zxr hMsHRGHWdn/j4mY/ajzcaZqabMo2ciyoStD6ela21qbbt2t+3YnnMTAK/Bx9DS5Dkf JPcow4TYE2ykHBbl1HoRwRu3hshds+CMcKZ0MAmE0XIK33QeyaHLQjCQ2jshIKevP0 ej6oAZ2t6PW4g== Date: Fri, 31 May 2024 14:08:03 -0700 From: Kees Cook To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, kent.overstreet@linux.dev, pasha.tatashin@soleen.com, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] mm: fix xyz_noprof functions calling profiled functions Message-ID: <202405311407.E21104C0@keescook> References: <20240531205350.3973009-1-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: <20240531205350.3973009-1-surenb@google.com> On Fri, May 31, 2024 at 01:53:50PM -0700, Suren Baghdasaryan wrote: > Grepping /proc/allocinfo for "noprof" reveals several xyz_noprof functions, > which means internally they are calling profiled functions. This should > never happen as such calls move allocation charge from a higher level > location where it should be accounted for into these lower level helpers. > Fix this by replacing profiled function calls with noprof ones. > > Fixes: b951aaff5035 ("mm: enable page allocation tagging") > Fixes: e26d8769da6d ("mempool: hook up to memory allocation profiling") > Fixes: 88ae5fb755b0 ("mm: vmalloc: enable memory allocation profiling") > Signed-off-by: Suren Baghdasaryan Reviewed-by: Kees Cook -- Kees Cook