All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Marco Elver <elver@google.com>
Cc: 42.hyeyoo@gmail.com, akpm@linux-foundation.org,
	oliver.sang@intel.com, torvalds@linux-foundation.org,
	vbabka@suse.cz, stable@vger.kernel.org
Subject: Re: [PATCH 5.15.y] mm, kfence: support kmem_dump_obj() for KFENCE objects
Date: Thu, 21 Apr 2022 11:59:47 +0200	[thread overview]
Message-ID: <YmErE2tiWEBAvkqE@kroah.com> (raw)
In-Reply-To: <Yl6g3B5/d+uwHal2@elver.google.com>

On Tue, Apr 19, 2022 at 01:45:32PM +0200, Marco Elver wrote:
> commit 2dfe63e61cc31ee59ce951672b0850b5229cd5b0 upstream.
> 
> Calling kmem_obj_info() via kmem_dump_obj() on KFENCE objects has been
> producing garbage data due to the object not actually being maintained
> by SLAB or SLUB.
> 
> Fix this by implementing __kfence_obj_info() that copies relevant
> information to struct kmem_obj_info when the object was allocated by
> KFENCE; this is called by a common kmem_obj_info(), which also calls the
> slab/slub/slob specific variant now called __kmem_obj_info().
> 
> For completeness, kmem_dump_obj() now displays if the object was
> allocated by KFENCE.
> 
> Link: https://lore.kernel.org/all/20220323090520.GG16885@xsang-OptiPlex-9020/
> Link: https://lkml.kernel.org/r/20220406131558.3558585-1-elver@google.com
> Fixes: b89fb5ef0ce6 ("mm, kfence: insert KFENCE hooks for SLUB")
> Fixes: d3fb45f370d9 ("mm, kfence: insert KFENCE hooks for SLAB")
> Signed-off-by: Marco Elver <elver@google.com>
> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>	[slab]
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> [elver@google.com: backport - substitute uses of struct slab with page]
> Signed-off-by: Marco Elver <elver@google.com>
> ---
>  include/linux/kfence.h | 24 +++++++++++++++++++++
>  mm/kfence/core.c       | 21 -------------------
>  mm/kfence/kfence.h     | 21 +++++++++++++++++++
>  mm/kfence/report.c     | 47 ++++++++++++++++++++++++++++++++++++++++++
>  mm/slab.c              |  2 +-
>  mm/slab.h              |  2 +-
>  mm/slab_common.c       |  9 ++++++++
>  mm/slob.c              |  2 +-
>  mm/slub.c              |  2 +-
>  9 files changed, 105 insertions(+), 25 deletions(-)

Now queued up, thanks.

greg k-h

      reply	other threads:[~2022-04-21 10:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  9:55 FAILED: patch "[PATCH] mm, kfence: support kmem_dump_obj() for KFENCE objects" failed to apply to 5.15-stable tree gregkh
2022-04-19 11:45 ` [PATCH 5.15.y] mm, kfence: support kmem_dump_obj() for KFENCE objects Marco Elver
2022-04-21  9:59   ` Greg KH [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=YmErE2tiWEBAvkqE@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=elver@google.com \
    --cc=oliver.sang@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 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.