From: David Rientjes <rientjes@google.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>,
Andrew Morton <akpm@linux-foundation.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Kent Overstreet <kent.overstreet@linux.dev>,
Suren Baghdasaryan <surenb@google.com>,
Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH v2] mm, slab: don't wrap internal functions with alloc_hooks()
Date: Mon, 27 May 2024 11:37:16 -0700 (PDT) [thread overview]
Message-ID: <30544807-e9a4-f764-d113-d446242e9f35@google.com> (raw)
In-Reply-To: <20240527090127.21979-2-vbabka@suse.cz>
On Mon, 27 May 2024, Vlastimil Babka wrote:
> The functions __kmalloc_noprof(), kmalloc_large_noprof(),
> kmalloc_trace_noprof() and their _node variants are all internal to the
> implementations of kmalloc_noprof() and kmalloc_node_noprof() and are
> only declared in the "public" slab.h and exported so that those
> implementations can be static inline and distinguish the build-time
> constant size variants. The only other users for some of the internal
> functions are slub_kunit and fortify_kunit tests which make very
> short-lived allocations.
>
> Therefore we can stop wrapping them with the alloc_hooks() macro.
> Instead add a __ prefix to all of them and a comment documenting these
> as internal. Also rename __kmalloc_trace() to __kmalloc_cache() which is
> more descriptive - it is a variant of __kmalloc() where the exact
> kmalloc cache has been already determined.
>
> The usage in fortify_kunit can be removed completely, as the internal
> functions should be tested already through kmalloc() tests in the
> test variant that passes non-constant allocation size.
>
> Reported-by: Kent Overstreet <kent.overstreet@linux.dev>
> Cc: Suren Baghdasaryan <surenb@google.com>
> Cc: Kees Cook <keescook@chromium.org>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
prev parent reply other threads:[~2024-05-27 18:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 9:01 Vlastimil Babka
2024-05-27 13:15 ` Kent Overstreet
2024-05-27 18:37 ` David Rientjes [this message]
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=30544807-e9a4-f764-d113-d446242e9f35@google.com \
--to=rientjes@google.com \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=keescook@chromium.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=roman.gushchin@linux.dev \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox