Re: [PATCH v2 1/2] mm: uninitialized struct page poisoning sanity checking

From: kbuild test robot
Date: Thu Feb 01 2018 - 23:13:18 EST


Hi Pavel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mmotm/master]
[also build test WARNING on v4.15 next-20180201]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Pavel-Tatashin/mm-uninitialized-struct-page-poisoning-sanity-checking/20180202-105827
base: git://git.cmpxchg.org/linux-mmotm.git master
config: x86_64-randconfig-x013-201804 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

In file included from include/linux/page_ref.h:7:0,
from include/linux/mm.h:26,
from include/linux/memblock.h:18,
from mm/memblock.c:21:
mm/memblock.c: In function 'memblock_virt_alloc_try_nid_raw':
>> include/linux/page-flags.h:159:29: warning: overflow in implicit constant conversion [-Woverflow]
#define PAGE_POISON_PATTERN ~0ul
^
>> mm/memblock.c:1376:15: note: in expansion of macro 'PAGE_POISON_PATTERN'
memset(ptr, PAGE_POISON_PATTERN, size);
^~~~~~~~~~~~~~~~~~~

vim +159 include/linux/page-flags.h

158
> 159 #define PAGE_POISON_PATTERN ~0ul
160 static inline int PagePoisoned(const struct page *page)
161 {
162 return page->flags == PAGE_POISON_PATTERN;
163 }
164

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip