All of lore.kernel.org
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: SeongJae Park <sj@kernel.org>,
	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	[thread overview]
Message-ID: <20240326153724.89126-1-sj@kernel.org> (raw)
In-Reply-To: <20240326073750.726636-1-surenb@google.com>

On Tue, 26 Mar 2024 00:37:50 -0700 Suren Baghdasaryan <surenb@google.com> 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 <sj@kernel.org>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>

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 <sj@kernel.org>


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

  reply	other threads:[~2024-03-26 15:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26  7:37 [PATCH 1/1] arch/um: fix forward declaration for vmalloc Suren Baghdasaryan
2024-03-26 15:37 ` SeongJae Park [this message]
2024-03-28  8:48 ` Johannes Berg
2024-04-22 20:11 ` Richard Weinberger
2024-04-22 20:19   ` Suren Baghdasaryan
2024-04-22 20:31     ` Richard Weinberger
2024-04-22 20:39       ` Suren Baghdasaryan
2024-04-22 20:50         ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240326153724.89126-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=johannes@sipsolutions.net \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=sfr@canb.auug.org.au \
    --cc=surenb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.