Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp711237lqh; Fri, 31 May 2024 14:10:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnv6/P4gUh8xDMh1pRqF7jYSfVgUsZwlVW9KZmfWQJUGvjxj1Ou4lpw2qBxVlCIXLt0E9x3OKm9dRKIO7dQMrahKtY9KyMIVu9XLLGBg== X-Google-Smtp-Source: AGHT+IElzDwjRI0jUpKWkNO3AXsV2lr7dZYsqitHoB2vTeKpL2LfEYrZdrON6T6yq81qnhaB6ypF X-Received: by 2002:a17:90b:245:b0:2c1:9ea1:14d2 with SMTP id 98e67ed59e1d1-2c1dc5809d8mr2704364a91.17.1717189816304; Fri, 31 May 2024 14:10:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717189816; cv=pass; d=google.com; s=arc-20160816; b=XqCFaF2y9mAeEA9MCw+I6iARXScTCqi9WSFGnzXKsCEMiK/ktCpg0fcWu+AWRLILTx bKcmh652/SKi5MlLyWBarDrwozooxuLO7pzzQbW3cT3nd7oON3wDg3R8WpmKPQ/WlLh7 cyU7IxZVvOnxkSSY6GzNHyTlXEP0COsksDyqyHWFhH38K6CYzpH2aD994Xw/7ajW8meO Bx9u68Q+P2ZbW/qZx0P2C+Pg3zBcWg7BSjDX8IWb6p0qHXXWRctojaKZHAIDqXj2dimI mXCpTfEPVjU3yGhP1pvjrvx2V7ODsm6u8RyVYljUPmcx0xxgR7R2acDGmrMPlCKRvDKV Wb9Q== 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=G9MVV0i50OJrq+7gsNLqk9unrOrpdnroXNwmF/sDlko=; fh=th6TM3aNb/NEUaXMsK/O1Mexwxs3zL/Q0qr4b/NpZMk=; b=KjnHqmeeb0XN+bqV+Gh0eF8jULxIMPA8UszwJPC7kzPNV3xo6rfFg3T7FIQ2QU0mSg 6Xgtg/o592rPt6IPI6q7mgQRvr3t86Hxtn6k0m0uqDmcp4PXg36acHf5QMjxMUeTO6I9 exdunfRx0cMaHScR5h7Z0KRH9DnxRCgAVsTT+s9M+UHHpPp7w5rTuKE5H964OflNjiS4 ZHxjTctBDWwkyu70zR3QimBs8+7Y10a8yZusI6pOVEYMCJOV1rP07lmdkJTkptWYa6HO Ido/VabedjNfcMaZcSZpc6OiWZmXr7zTHql6gWj0Qs3ve81vwQXGpAgALCMm/9+xSjxL B6QQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="dSTxV43/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197485-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a77d49d4si1815433a91.178.2024.05.31.14.10.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 14:10:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197485-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="dSTxV43/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197485-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 47C9BB254B1 for ; Fri, 31 May 2024 21:08:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EE0178C87; Fri, 31 May 2024 21:08:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dSTxV43/" 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 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