summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-11-25 20:17:19 +0000
committerAndrew Morton <akpm@linux-foundation.org>2024-12-05 19:54:45 -0800
commit6a7de1bf218d75f27f68d6a3f5ae1eb7332b941e (patch)
tree82629ff29f55b989191db0463fd76b00fb38828b /include
parent4de22b2a6a7477d84d9a01eb6b62a9117309d722 (diff)
downloadlinux-6a7de1bf218d75f27f68d6a3f5ae1eb7332b941e.tar.gz
linux-6a7de1bf218d75f27f68d6a3f5ae1eb7332b941e.tar.bz2
linux-6a7de1bf218d75f27f68d6a3f5ae1eb7332b941e.zip
mm: open-code page_folio() in dump_page()
page_folio() calls page_fixed_fake_head() which will misidentify this page as being a fake head and load off the end of 'precise'. We may have a pointer to a fake head, but that's OK because it contains the right information for dump_page(). gcc-15 is smart enough to catch this with -Warray-bounds: In function 'page_fixed_fake_head', inlined from '_compound_head' at ../include/linux/page-flags.h:251:24, inlined from '__dump_page' at ../mm/debug.c:123:11: ../include/asm-generic/rwonce.h:44:26: warning: array subscript 9 is outside +array bounds of 'struct page[1]' [-Warray-bounds=] Link: https://lkml.kernel.org/r/20241125201721.2963278-2-willy@infradead.org Fixes: fae7d834c43c ("mm: add __dump_folio()") Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reported-by: Kees Cook <kees@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions