linux-brain/Documentation/vm
Kees Cook c0837e021d mm/slub: clarify verification reporting
commit 8669dbab2ae56085c128894b181c2aa50f97e368 upstream.

Patch series "Actually fix freelist pointer vs redzoning", v4.

This fixes redzoning vs the freelist pointer (both for middle-position
and very small caches).  Both are "theoretical" fixes, in that I see no
evidence of such small-sized caches actually be used in the kernel, but
that's no reason to let the bugs continue to exist, especially since
people doing local development keep tripping over it.  :)

This patch (of 3):

Instead of repeating "Redzone" and "Poison", clarify which sides of
those zones got tripped.  Additionally fix column alignment in the
trailer.

Before:

  BUG test (Tainted: G    B            ): Redzone overwritten
  ...
  Redzone (____ptrval____): bb bb bb bb bb bb bb bb      ........
  Object (____ptrval____): f6 f4 a5 40 1d e8            ...@..
  Redzone (____ptrval____): 1a aa                        ..
  Padding (____ptrval____): 00 00 00 00 00 00 00 00      ........

After:

  BUG test (Tainted: G    B            ): Right Redzone overwritten
  ...
  Redzone  (____ptrval____): bb bb bb bb bb bb bb bb      ........
  Object   (____ptrval____): f6 f4 a5 40 1d e8            ...@..
  Redzone  (____ptrval____): 1a aa                        ..
  Padding  (____ptrval____): 00 00 00 00 00 00 00 00      ........

The earlier commits that slowly resulted in the "Before" reporting were:

  d86bd1bece ("mm/slub: support left redzone")
  ffc79d2880 ("slub: use print_hex_dump")
  2492268472 ("SLUB: change error reporting format to follow lockdep loosely")

Link: https://lkml.kernel.org/r/20210608183955.280836-1-keescook@chromium.org
Link: https://lkml.kernel.org/r/20210608183955.280836-2-keescook@chromium.org
Link: https://lore.kernel.org/lkml/cfdb11d7-fb8e-e578-c939-f7f5fb69a6bd@suse.cz/
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Marco Elver <elver@google.com>
Cc: "Lin, Zhenpeng" <zplin@psu.edu>
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: Roman Gushchin <guro@fb.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-23 14:41:30 +02:00
..
.gitignore Documentation/vm/.gitignore: add page-types 2009-09-24 07:20:57 -07:00
active_mm.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
balance.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
cleancache.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
frontswap.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
highmem.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
hmm.rst mm: turn migrate_vma upside down 2019-08-20 09:35:02 -03:00
hugetlbfs_reserv.rst docs/vm: Minor editorial changes in the THP and hugetlbfs 2019-04-30 06:34:40 -06:00
hwpoison.rst docs/vm: hwpoison.rst: Fix quote formatting 2019-06-20 14:11:32 -06:00
index.rst docs/vm: add documentation of memory models 2019-04-30 06:30:01 -06:00
ksm.rst docs/vm: ksm: split userspace interface to admin-guide/mm/ksm.rst 2018-04-27 17:19:49 -06:00
memory-model.rst mm: document ZONE_DEVICE memory-model implications 2019-07-18 17:08:07 -07:00
mmu_notifier.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
numa.rst docs: cgroup-v1: add it to the admin-guide book 2019-07-15 11:03:02 -03:00
overcommit-accounting.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
page_frags.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
page_migration.rst docs: cgroup-v1: add it to the admin-guide book 2019-07-15 11:03:02 -03:00
page_owner.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
remap_file_pages.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
slub.rst mm/slub: clarify verification reporting 2021-06-23 14:41:30 +02:00
split_page_table_lock.rst mm: treewide: clarify pgtable_page_{ctor,dtor}() naming 2019-09-26 10:10:44 -07:00
swap_numa.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
transhuge.rst docs/vm: Minor editorial changes in the THP and hugetlbfs 2019-04-30 06:34:40 -06:00
unevictable-lru.rst docs: cgroup-v1: add it to the admin-guide book 2019-07-15 11:03:02 -03:00
z3fold.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
zsmalloc.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00
zswap.rst docs/vm: rename documentation files to .rst 2018-04-16 14:18:15 -06:00