Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3420321lqp; Tue, 26 Mar 2024 08:42:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWV4yM5S+6sYSW0g7DuEc+RlVw12was2t/l7oioH1Hu5YX+UsL2sOtBxcmAv5clsUO5dS74g53kHId7c8qHg8XIWUcBiu8VfAJfPYMAzA== X-Google-Smtp-Source: AGHT+IG9F/IAUfwyIQlJw/Xzse9wma7eAj4fZRFqVWoHN9QURNGiGVGqPp+5I5z4D+MPPLdsa7ee X-Received: by 2002:a05:620a:4441:b0:789:13e7:4f22 with SMTP id w1-20020a05620a444100b0078913e74f22mr2590784qkp.36.1711467725520; Tue, 26 Mar 2024 08:42:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711467725; cv=pass; d=google.com; s=arc-20160816; b=EZBhog238H2ASx1Gf+1kfr1lwSVxeBLt/nX7HqJCzmiPDEuZUhfjdWoyQRsE9e1fEr omw5C3ByJFnCN8JDJDhQE21lGKBxU0dVcZXTHHCbcdnawkjW+j4U+30vmVOFRCDdi6q7 4F42kEhKDXsL/T8/7DGnnB2QyVLQahiK63cshm2Zi8IAWR6tTnV3Xp2sm/zUjdXMEViK EsUml0fDSOCRF5Q/e1R5KSS9F+0r4kK97laeMHMYO36U4TtjMTdH8lTEcQyrwTlMLbAA bndzZyutVNKMJj3dB0g4AM3zvLJmnvMbUOVjd5zghZ2FMSPnUmhO44zA8X0GQNQb27Za PjDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=81fQKwEJA+hlzgOLJEAJ85+s1sN4nH0Cn4/OgM1cHNo=; fh=xHw7+rLSbGvgJxP1LChnjks9Wd/QIxCENs+FhfGmQ7c=; b=DbFH48N67ZapV3wnwU8lTI60xxJzE8IlADwlJIxbkCMBI7xd5o/k27uywpwjXebF/r s3IiOMvx9f7EaLzhtOLedCwb/DOS/6Ynglk5YvWQRK+zvC3Y8mp3JsCKQu3A2HIsisSQ FnlyziWdBuW1VPa6J7MfU+jqEKsHyybXxhaPZXYqqQMpJVJSX66/VtuqDqEW8i0Q5ipx Mdj8jJhZqPzc6CtbL2QL4NfKgpO/FKFniaPZ0029qvWfVeit5KuFTA48bAo64Y1a91vC yRQ4/EfTLG4v30uVs0yeXDHvbvaKFbl1Fv86w+fjJJ8NAnxtFf6LV7J139ciz5Z95Jk1 Xuqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kc4USQE7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119352-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y2-20020a05620a0e0200b0078a457da031si7318627qkm.640.2024.03.26.08.42.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:42:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kc4USQE7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119352-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 84C7E1C63788 for ; Tue, 26 Mar 2024 15:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD07F13D2B7; Tue, 26 Mar 2024 15:37:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Kc4USQE7" 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 E4BF013C9A8; Tue, 26 Mar 2024 15:37:26 +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=1711467447; cv=none; b=c1qVWbhXzR4reMBS/NfOFY16dWI174Md4j15L9VYgKhWfxgLoxUpeZmFY1HCLHrz1nTm7nhz6DEzILHuc03JVBDP5T4K3vmjl8j8N2zWv0Yf0GiLfrgLN7vcXcyoWaTUYxLkIFIWmGtIKspWrO4uY3Xl6uwEgOi7r4xpPQN4dks= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711467447; c=relaxed/simple; bh=Bl+BYidMPD6QYSFEUn9nKPp7BsOGv1w8t/Y35xkpOsU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dET89eQWqB6oDycs1ro+S+NQ/cLGvCk/AG50hAhmOwF/sciQMi3yHl1EBFxEU9zU/YtpLMuUCBv+WFeTh45U5iHgV1LhP1fCl+SiHAcMA4cDy3xa9F/HNFrqIzwD8uc6exknz3EPv2IcckR9VcOLifhZ580oZYqK2N0fauiK6KY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Kc4USQE7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9198AC43394; Tue, 26 Mar 2024 15:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711467446; bh=Bl+BYidMPD6QYSFEUn9nKPp7BsOGv1w8t/Y35xkpOsU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kc4USQE7pWStzRH38MPjUVOniBdEq5uyWMoUbz0gTjBmUbZKyomc3+N1bbVG9vdyk fESewTVbd3oBlMBpODGuKsQ7U0RrznUbpvGESpnHLrYY95vSEWQgt7tVJvhjBJ5E9g 3U26IABZk/FvcbeOquNy1outnQxgYWJuJWEBjmsSiX5gN1vhK5A0AJdM+uF62HcZkt JM7Tmgbuh6+MlC7ySVap9O8c3uC1wgzwI2PHxvXCVL2g4cWD4KJDkHSxqCr0Hcrt2+ 5gjlARL8ooO+2pygBvdaL3daFfodtBbnJhsxwceWyyF1QkNhpCg/CRUxGVwPWvAfgK I+vFRiBXWES0g== From: SeongJae Park To: Suren Baghdasaryan Cc: SeongJae Park , akpm@linux-foundation.org, sfr@canb.auug.org.au, kent.overstreet@linux.dev, richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net, linux-mm@kvack.org, linux-um@lists.infradead.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] arch/um: fix forward declaration for vmalloc Date: Tue, 26 Mar 2024 08:37:24 -0700 Message-Id: <20240326153724.89126-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240326073750.726636-1-surenb@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Tue, 26 Mar 2024 00:37:50 -0700 Suren Baghdasaryan wrote: > Patch [1] replaced vmalloc() function with a new definition but it did > not adjust the forward declaration used in UML architecture. Change it > to act as before. > Note that this prevents the vmalloc() allocations in __wrap_malloc() > from being accounted. If accounting here is critical, we will have > to remove this forward declaration and include vmalloc.h, however > that would pull in more dependencies and would require introducing more > architecture-specific headers, like asm/bug.h, asm/rwonce.h, etc. > This is likely the reason why this forward declaration was introduced > in the first place. > > [1] https://lore.kernel.org/all/20240321163705.3067592-31-surenb@google.com/ > > Fixes: 576477564ede ("mm: vmalloc: enable memory allocation profiling") > Reported-by: SeongJae Park > Signed-off-by: Suren Baghdasaryan Thank you for this fix, Suren. I confirmed that this patch fixes the issue I reported. Closes: https://lore.kernel.org/all/20240323180506.195396-1-sj@kernel.org/ Tested-by: SeongJae Park Thanks, SJ > --- > arch/um/include/shared/um_malloc.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/um/include/shared/um_malloc.h b/arch/um/include/shared/um_malloc.h > index 13da93284c2c..bf503658f08e 100644 > --- a/arch/um/include/shared/um_malloc.h > +++ b/arch/um/include/shared/um_malloc.h > @@ -11,7 +11,8 @@ > extern void *uml_kmalloc(int size, int flags); > extern void kfree(const void *ptr); > > -extern void *vmalloc(unsigned long size); > +extern void *vmalloc_noprof(unsigned long size); > +#define vmalloc(...) vmalloc_noprof(__VA_ARGS__) > extern void vfree(void *ptr); > > #endif /* __UM_MALLOC_H__ */ > -- > 2.44.0.396.g6e790dbe36-goog