From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: Kees Cook <keescook@chromium.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
linux-mm@kvack.org, stable@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] mm/slab_common: Restore passing "caller" for tracing
Date: Sun, 6 Nov 2022 19:46:15 +0900 [thread overview]
Message-ID: <Y2eQd365DU6Zi9wr@hyeyoo> (raw)
In-Reply-To: <20221105063529.never.818-kees@kernel.org>
On Fri, Nov 04, 2022 at 11:35:34PM -0700, Kees Cook wrote:
> The "caller" argument was accidentally being ignored in a few places
> that were recently refactored. Restore these "caller" arguments, instead
> of _RET_IP_.
>
> Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Christoph Lameter <cl@linux.com>
> Cc: Pekka Enberg <penberg@kernel.org>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Roman Gushchin <roman.gushchin@linux.dev>
> Cc: linux-mm@kvack.org
> Fixes: 11e9734bcb6a ("mm/slab_common: unify NUMA and UMA version of tracepoints")
> Cc: stable@vger.kernel.org
BTW I think it can be just sent to next release candidate.
The referred commit was merged in this development cycle.
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> mm/slab_common.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index 33b1886b06eb..0e614f9e7ed7 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -941,7 +941,7 @@ void *__do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller
>
> if (unlikely(size > KMALLOC_MAX_CACHE_SIZE)) {
> ret = __kmalloc_large_node(size, flags, node);
> - trace_kmalloc(_RET_IP_, ret, size,
> + trace_kmalloc(caller, ret, size,
> PAGE_SIZE << get_order(size), flags, node);
> return ret;
> }
> @@ -953,7 +953,7 @@ void *__do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller
>
> ret = __kmem_cache_alloc_node(s, flags, node, size, caller);
> ret = kasan_kmalloc(s, ret, size, flags);
> - trace_kmalloc(_RET_IP_, ret, size, s->size, flags, node);
> + trace_kmalloc(caller, ret, size, s->size, flags, node);
> return ret;
> }
>
> --
> 2.34.1
Thanks for catching this!
--
Thanks,
Hyeonggon
next prev parent reply other threads:[~2022-11-06 10:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 6:35 Kees Cook
2022-11-06 10:46 ` Hyeonggon Yoo [this message]
2022-11-06 20:23 ` Vlastimil Babka
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=Y2eQd365DU6Zi9wr@hyeyoo \
--to=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=stable@vger.kernel.org \
--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