Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
Hi Catalin, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.8-rc2 next-20160816] [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/Catalin-Marinas/mm-kmemleak-Avoid-using-__va-on-addresses-that-don-t-have-a-lowmem-mapping/20160816-232733 base: git://git.cmpxchg.org/linux-mmotm.git master config: frv-defconfig (attached as .config) compiler: frv-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=frv All error/warnings (new ones prefixed by >>): In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/frv/include/asm/pgtable.h:25, from mm/init-mm.c:9: include/linux/mm.h: In function 'maybe_mkwrite': include/linux/mm.h:624:3: error: implicit declaration of function 'pte_mkwrite' [-Werror=implicit-function-declaration] pte = pte_mkwrite(pte); ^ include/linux/mm.h:624:7: error: incompatible types when assigning to type 'pte_t' from type 'int' pte = pte_mkwrite(pte); ^ In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/frv/include/asm/pgtable.h:25, from mm/init-mm.c:9: include/linux/mm.h: In function 'mm_nr_pmds_init': >> include/linux/mm.h:1576:21: error: 'struct mm_struct' has no member named >> 'nr_pmds' atomic_long_set(>nr_pmds, 0); ^ include/linux/mm.h: In function 'mm_nr_pmds': include/linux/mm.h:1581:29: error: 'struct mm_struct' has no member named 'nr_pmds' return atomic_long_read(>nr_pmds); ^ include/linux/mm.h: In function 'mm_inc_nr_pmds': include/linux/mm.h:1586:21: error: 'struct mm_struct' has no member named 'nr_pmds' atomic_long_inc(>nr_pmds); ^ include/linux/mm.h: In function 'mm_dec_nr_pmds': include/linux/mm.h:1591:21: error: 'struct mm_struct' has no member named 'nr_pmds' atomic_long_dec(>nr_pmds); ^ include/linux/mm.h: In function 'pud_alloc': >> include/linux/mm.h:1605:2: error: implicit declaration of function >> 'pgd_none' [-Werror=implicit-function-declaration] return (unlikely(pgd_none(*pgd)) && __pud_alloc(mm, pgd, address))? ^ >> include/linux/mm.h:1606:3: error: implicit declaration of function >> 'pud_offset' [-Werror=implicit-function-declaration] NULL: pud_offset(pgd, address); ^ >> include/linux/mm.h:1606:7: warning: pointer/integer type mismatch in >> conditional expression NULL: pud_offset(pgd, address); ^ include/linux/mm.h: In function 'pmd_alloc': >> include/linux/mm.h:1611:2: error: implicit declaration of function >> 'pud_none' [-Werror=implicit-function-declaration] return (unlikely(pud_none(*pud)) && __pmd_alloc(mm, pud, address))? ^ >> include/linux/mm.h:1612:3: error: implicit declaration of function >> 'pmd_offset' [-Werror=implicit-function-declaration] NULL: pmd_offset(pud, address); ^ include/linux/mm.h:1612:7: warning: pointer/integer type mismatch in conditional expression NULL: pmd_offset(pud, address); ^ include/linux/mm.h: In function 'pgtable_init': include/linux/mm.h:1690:2: error: implicit declaration of function 'pgtable_cache_init' [-Werror=implicit-function-declaration] pgtable_cache_init(); ^ In file included from mm/init-mm.c:9:0: arch/frv/include/asm/pgtable.h: At top level: >> arch/frv/include/asm/pgtable.h:196:19: error: static declaration of >> 'pgd_none' follows non-static declaration static inline int pgd_none(pgd_t pgd) { return 0; } ^ In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/mm_types.h:5, from mm/init-mm.c:1: include/linux/mm.h:1605:19: note: previous implicit declaration of 'pgd_none' was here return (unlikely(pgd_none(*pgd)) && __pud_alloc(mm, pgd, address))? ^ include/linux/compiler.h:168:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ In file included from mm/init-mm.c:9:0: >> arch/frv/include/asm/pgtable.h:212:22: error: conflicting types for >> 'pud_offset' static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) ^
Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
Hi Catalin, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.8-rc2 next-20160816] [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/Catalin-Marinas/mm-kmemleak-Avoid-using-__va-on-addresses-that-don-t-have-a-lowmem-mapping/20160816-232733 base: git://git.cmpxchg.org/linux-mmotm.git master config: frv-defconfig (attached as .config) compiler: frv-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=frv All error/warnings (new ones prefixed by >>): In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/frv/include/asm/pgtable.h:25, from mm/init-mm.c:9: include/linux/mm.h: In function 'maybe_mkwrite': include/linux/mm.h:624:3: error: implicit declaration of function 'pte_mkwrite' [-Werror=implicit-function-declaration] pte = pte_mkwrite(pte); ^ include/linux/mm.h:624:7: error: incompatible types when assigning to type 'pte_t' from type 'int' pte = pte_mkwrite(pte); ^ In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/frv/include/asm/pgtable.h:25, from mm/init-mm.c:9: include/linux/mm.h: In function 'mm_nr_pmds_init': >> include/linux/mm.h:1576:21: error: 'struct mm_struct' has no member named >> 'nr_pmds' atomic_long_set(>nr_pmds, 0); ^ include/linux/mm.h: In function 'mm_nr_pmds': include/linux/mm.h:1581:29: error: 'struct mm_struct' has no member named 'nr_pmds' return atomic_long_read(>nr_pmds); ^ include/linux/mm.h: In function 'mm_inc_nr_pmds': include/linux/mm.h:1586:21: error: 'struct mm_struct' has no member named 'nr_pmds' atomic_long_inc(>nr_pmds); ^ include/linux/mm.h: In function 'mm_dec_nr_pmds': include/linux/mm.h:1591:21: error: 'struct mm_struct' has no member named 'nr_pmds' atomic_long_dec(>nr_pmds); ^ include/linux/mm.h: In function 'pud_alloc': >> include/linux/mm.h:1605:2: error: implicit declaration of function >> 'pgd_none' [-Werror=implicit-function-declaration] return (unlikely(pgd_none(*pgd)) && __pud_alloc(mm, pgd, address))? ^ >> include/linux/mm.h:1606:3: error: implicit declaration of function >> 'pud_offset' [-Werror=implicit-function-declaration] NULL: pud_offset(pgd, address); ^ >> include/linux/mm.h:1606:7: warning: pointer/integer type mismatch in >> conditional expression NULL: pud_offset(pgd, address); ^ include/linux/mm.h: In function 'pmd_alloc': >> include/linux/mm.h:1611:2: error: implicit declaration of function >> 'pud_none' [-Werror=implicit-function-declaration] return (unlikely(pud_none(*pud)) && __pmd_alloc(mm, pud, address))? ^ >> include/linux/mm.h:1612:3: error: implicit declaration of function >> 'pmd_offset' [-Werror=implicit-function-declaration] NULL: pmd_offset(pud, address); ^ include/linux/mm.h:1612:7: warning: pointer/integer type mismatch in conditional expression NULL: pmd_offset(pud, address); ^ include/linux/mm.h: In function 'pgtable_init': include/linux/mm.h:1690:2: error: implicit declaration of function 'pgtable_cache_init' [-Werror=implicit-function-declaration] pgtable_cache_init(); ^ In file included from mm/init-mm.c:9:0: arch/frv/include/asm/pgtable.h: At top level: >> arch/frv/include/asm/pgtable.h:196:19: error: static declaration of >> 'pgd_none' follows non-static declaration static inline int pgd_none(pgd_t pgd) { return 0; } ^ In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/mm_types.h:5, from mm/init-mm.c:1: include/linux/mm.h:1605:19: note: previous implicit declaration of 'pgd_none' was here return (unlikely(pgd_none(*pgd)) && __pud_alloc(mm, pgd, address))? ^ include/linux/compiler.h:168:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ In file included from mm/init-mm.c:9:0: >> arch/frv/include/asm/pgtable.h:212:22: error: conflicting types for >> 'pud_offset' static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) ^
Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
On Tue, Aug 16, 2016 at 04:20:56PM +0100, Catalin Marinas wrote: > diff --git a/include/linux/kmemleak.h b/include/linux/kmemleak.h > index 4894c6888bc6..380f72bc3657 100644 > --- a/include/linux/kmemleak.h > +++ b/include/linux/kmemleak.h > @@ -21,6 +21,7 @@ > #ifndef __KMEMLEAK_H > #define __KMEMLEAK_H > > +#include Given the kbuild-robot reports, this #include doesn't go well on some architectures. > #include > > #ifdef CONFIG_DEBUG_KMEMLEAK > @@ -109,4 +110,29 @@ static inline void kmemleak_no_scan(const void *ptr) > > #endif /* CONFIG_DEBUG_KMEMLEAK */ > > +static inline void kmemleak_alloc_phys(phys_addr_t phys, size_t size, > +int min_count, gfp_t gfp) > +{ > + if (!IS_ENABLED(CONFIG_HIGHMEM) || phys < __pa(high_memory)) > + kmemleak_alloc(__va(phys), size, min_count, gfp); > +} > + > +static inline void kmemleak_free_part_phys(phys_addr_t phys, size_t size) > +{ > + if (!IS_ENABLED(CONFIG_HIGHMEM) || phys < __pa(high_memory)) > + kmemleak_free_part(__va(phys), size); > +} > + > +static inline void kmemleak_not_leak_phys(phys_addr_t phys) > +{ > + if (!IS_ENABLED(CONFIG_HIGHMEM) || phys < __pa(high_memory)) > + kmemleak_not_leak(__va(phys)); > +} > + > +static inline void kmemleak_ignore_phys(phys_addr_t phys) > +{ > + if (!IS_ENABLED(CONFIG_HIGHMEM) || phys < __pa(high_memory)) > + kmemleak_ignore(__va(phys)); > +} I'll move these functions out of line and re-post the patch. -- Catalin
Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
On Tue, Aug 16, 2016 at 04:20:56PM +0100, Catalin Marinas wrote: > diff --git a/include/linux/kmemleak.h b/include/linux/kmemleak.h > index 4894c6888bc6..380f72bc3657 100644 > --- a/include/linux/kmemleak.h > +++ b/include/linux/kmemleak.h > @@ -21,6 +21,7 @@ > #ifndef __KMEMLEAK_H > #define __KMEMLEAK_H > > +#include Given the kbuild-robot reports, this #include doesn't go well on some architectures. > #include > > #ifdef CONFIG_DEBUG_KMEMLEAK > @@ -109,4 +110,29 @@ static inline void kmemleak_no_scan(const void *ptr) > > #endif /* CONFIG_DEBUG_KMEMLEAK */ > > +static inline void kmemleak_alloc_phys(phys_addr_t phys, size_t size, > +int min_count, gfp_t gfp) > +{ > + if (!IS_ENABLED(CONFIG_HIGHMEM) || phys < __pa(high_memory)) > + kmemleak_alloc(__va(phys), size, min_count, gfp); > +} > + > +static inline void kmemleak_free_part_phys(phys_addr_t phys, size_t size) > +{ > + if (!IS_ENABLED(CONFIG_HIGHMEM) || phys < __pa(high_memory)) > + kmemleak_free_part(__va(phys), size); > +} > + > +static inline void kmemleak_not_leak_phys(phys_addr_t phys) > +{ > + if (!IS_ENABLED(CONFIG_HIGHMEM) || phys < __pa(high_memory)) > + kmemleak_not_leak(__va(phys)); > +} > + > +static inline void kmemleak_ignore_phys(phys_addr_t phys) > +{ > + if (!IS_ENABLED(CONFIG_HIGHMEM) || phys < __pa(high_memory)) > + kmemleak_ignore(__va(phys)); > +} I'll move these functions out of line and re-post the patch. -- Catalin
Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
On Wed, Aug 17, 2016 at 01:15:53AM +0800, kbuild test robot wrote: > [auto build test ERROR on mmotm/master] > [also build test ERROR on v4.8-rc2 next-20160816] > [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/Catalin-Marinas/mm-kmemleak-Avoid-using-__va-on-addresses-that-don-t-have-a-lowmem-mapping/20160816-232733 > base: git://git.cmpxchg.org/linux-mmotm.git master > config: tile-tilegx_defconfig (attached as .config) > compiler: tilegx-linux-gcc (GCC) 4.6.2 > reproduce: > wget > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=tile > > All error/warnings (new ones prefixed by >>): > >In file included from include/linux/kmemleak.h:24:0, >from include/linux/slab.h:117, >from arch/tile/include/asm/pgtable.h:27, >from mm/init-mm.c:9: >include/linux/mm.h: In function 'is_vmalloc_addr': >include/linux/mm.h:486:17: error: 'VMALLOC_START' undeclared (first use in > this function) >include/linux/mm.h:486:17: note: each undeclared identifier is reported > only once for each function it appears in >include/linux/mm.h:486:41: error: 'VMALLOC_END' undeclared (first use in > this function) >include/linux/mm.h: In function 'maybe_mkwrite': >include/linux/mm.h:624:3: error: implicit declaration of function > 'pte_mkwrite' >include/linux/mm.h:624:7: error: incompatible types when assigning to type > 'pte_t' from type 'int' >In file included from include/linux/kmemleak.h:24:0, >from include/linux/slab.h:117, >from arch/tile/include/asm/pgtable.h:27, >from mm/init-mm.c:9: It looks like some architectures don't really like including linux/mm.h from linux/kmemleak.h. I'll change the patch to avoid this include and explicitly declare high_memory in kmemleak.h -- Catalin
Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
On Wed, Aug 17, 2016 at 01:15:53AM +0800, kbuild test robot wrote: > [auto build test ERROR on mmotm/master] > [also build test ERROR on v4.8-rc2 next-20160816] > [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/Catalin-Marinas/mm-kmemleak-Avoid-using-__va-on-addresses-that-don-t-have-a-lowmem-mapping/20160816-232733 > base: git://git.cmpxchg.org/linux-mmotm.git master > config: tile-tilegx_defconfig (attached as .config) > compiler: tilegx-linux-gcc (GCC) 4.6.2 > reproduce: > wget > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=tile > > All error/warnings (new ones prefixed by >>): > >In file included from include/linux/kmemleak.h:24:0, >from include/linux/slab.h:117, >from arch/tile/include/asm/pgtable.h:27, >from mm/init-mm.c:9: >include/linux/mm.h: In function 'is_vmalloc_addr': >include/linux/mm.h:486:17: error: 'VMALLOC_START' undeclared (first use in > this function) >include/linux/mm.h:486:17: note: each undeclared identifier is reported > only once for each function it appears in >include/linux/mm.h:486:41: error: 'VMALLOC_END' undeclared (first use in > this function) >include/linux/mm.h: In function 'maybe_mkwrite': >include/linux/mm.h:624:3: error: implicit declaration of function > 'pte_mkwrite' >include/linux/mm.h:624:7: error: incompatible types when assigning to type > 'pte_t' from type 'int' >In file included from include/linux/kmemleak.h:24:0, >from include/linux/slab.h:117, >from arch/tile/include/asm/pgtable.h:27, >from mm/init-mm.c:9: It looks like some architectures don't really like including linux/mm.h from linux/kmemleak.h. I'll change the patch to avoid this include and explicitly declare high_memory in kmemleak.h -- Catalin
Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
Hi Catalin, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.8-rc2 next-20160816] [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/Catalin-Marinas/mm-kmemleak-Avoid-using-__va-on-addresses-that-don-t-have-a-lowmem-mapping/20160816-232733 base: git://git.cmpxchg.org/linux-mmotm.git master config: mn10300-asb2364_defconfig (attached as .config) compiler: am33_2.0-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=mn10300 All error/warnings (new ones prefixed by >>): In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/mn10300/include/asm/pgtable.h:33, from mm/init-mm.c:9: include/linux/mm.h: In function 'is_vmalloc_addr': >> include/linux/mm.h:486:17: error: 'VMALLOC_START' undeclared (first use in >> this function) return addr >= VMALLOC_START && addr < VMALLOC_END; ^ include/linux/mm.h:486:17: note: each undeclared identifier is reported only once for each function it appears in >> include/linux/mm.h:486:41: error: 'VMALLOC_END' undeclared (first use in >> this function) return addr >= VMALLOC_START && addr < VMALLOC_END; ^ include/linux/mm.h: In function 'maybe_mkwrite': >> include/linux/mm.h:624:3: error: implicit declaration of function >> 'pte_mkwrite' [-Werror=implicit-function-declaration] pte = pte_mkwrite(pte); ^ >> include/linux/mm.h:624:7: error: incompatible types when assigning to type >> 'pte_t' from type 'int' pte = pte_mkwrite(pte); ^ In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/mn10300/include/asm/pgtable.h:33, from mm/init-mm.c:9: include/linux/mm.h: In function 'pgtable_init': >> include/linux/mm.h:1690:2: error: implicit declaration of function >> 'pgtable_cache_init' [-Werror=implicit-function-declaration] pgtable_cache_init(); ^ In file included from mm/init-mm.c:9:0: arch/mn10300/include/asm/pgtable.h: At top level: >> arch/mn10300/include/asm/pgtable.h:47:13: warning: conflicting types for >> 'pgtable_cache_init' extern void pgtable_cache_init(void); ^ In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/mn10300/include/asm/pgtable.h:33, from mm/init-mm.c:9: include/linux/mm.h:1690:2: note: previous implicit declaration of 'pgtable_cache_init' was here pgtable_cache_init(); ^ In file included from mm/init-mm.c:9:0: >> arch/mn10300/include/asm/pgtable.h:272:21: error: conflicting types for >> 'pte_mkwrite' static inline pte_t pte_mkwrite(pte_t pte) ^ In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/mn10300/include/asm/pgtable.h:33, from mm/init-mm.c:9: include/linux/mm.h:624:9: note: previous implicit declaration of 'pte_mkwrite' was here pte = pte_mkwrite(pte); ^ cc1: some warnings being treated as errors vim +/VMALLOC_START +486 include/linux/mm.h 0738c4bb8 Paul Mundt 2008-03-12 480 */ bb00a789e Yaowei Bai 2016-05-19 481 static inline bool is_vmalloc_addr(const void *x) 9e2779fa2 Christoph Lameter 2008-02-04 482 { 0738c4bb8 Paul Mundt 2008-03-12 483 #ifdef CONFIG_MMU 9e2779fa2 Christoph Lameter 2008-02-04 484unsigned long addr = (unsigned long)x; 9e2779fa2 Christoph Lameter 2008-02-04 485 9e2779fa2 Christoph Lameter 2008-02-04 @486return addr >= VMALLOC_START && addr < VMALLOC_END; 0738c4bb8 Paul Mundt 2008-03-12 487 #else bb00a789e Yaowei Bai 2016-05-19 488return false; 8ca3ed87d David Howells 2008-02-23 489 #endif 0738c4bb8 Paul Mundt 2008-03-12 490 } 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 491 #ifdef CONFIG_MMU 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 492 extern int is_vmalloc_or_module_addr(const void *x); 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 493 #else 934831d06 David Howells 2009-09-24 494 static inline int is_vmalloc_or_module_addr(const void *x) 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 495 { 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 496return 0; 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 497 } 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 498 #endif 9e2779fa2 Christoph Lameter 2008-02-04
Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
Hi Catalin, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.8-rc2 next-20160816] [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/Catalin-Marinas/mm-kmemleak-Avoid-using-__va-on-addresses-that-don-t-have-a-lowmem-mapping/20160816-232733 base: git://git.cmpxchg.org/linux-mmotm.git master config: mn10300-asb2364_defconfig (attached as .config) compiler: am33_2.0-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=mn10300 All error/warnings (new ones prefixed by >>): In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/mn10300/include/asm/pgtable.h:33, from mm/init-mm.c:9: include/linux/mm.h: In function 'is_vmalloc_addr': >> include/linux/mm.h:486:17: error: 'VMALLOC_START' undeclared (first use in >> this function) return addr >= VMALLOC_START && addr < VMALLOC_END; ^ include/linux/mm.h:486:17: note: each undeclared identifier is reported only once for each function it appears in >> include/linux/mm.h:486:41: error: 'VMALLOC_END' undeclared (first use in >> this function) return addr >= VMALLOC_START && addr < VMALLOC_END; ^ include/linux/mm.h: In function 'maybe_mkwrite': >> include/linux/mm.h:624:3: error: implicit declaration of function >> 'pte_mkwrite' [-Werror=implicit-function-declaration] pte = pte_mkwrite(pte); ^ >> include/linux/mm.h:624:7: error: incompatible types when assigning to type >> 'pte_t' from type 'int' pte = pte_mkwrite(pte); ^ In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/mn10300/include/asm/pgtable.h:33, from mm/init-mm.c:9: include/linux/mm.h: In function 'pgtable_init': >> include/linux/mm.h:1690:2: error: implicit declaration of function >> 'pgtable_cache_init' [-Werror=implicit-function-declaration] pgtable_cache_init(); ^ In file included from mm/init-mm.c:9:0: arch/mn10300/include/asm/pgtable.h: At top level: >> arch/mn10300/include/asm/pgtable.h:47:13: warning: conflicting types for >> 'pgtable_cache_init' extern void pgtable_cache_init(void); ^ In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/mn10300/include/asm/pgtable.h:33, from mm/init-mm.c:9: include/linux/mm.h:1690:2: note: previous implicit declaration of 'pgtable_cache_init' was here pgtable_cache_init(); ^ In file included from mm/init-mm.c:9:0: >> arch/mn10300/include/asm/pgtable.h:272:21: error: conflicting types for >> 'pte_mkwrite' static inline pte_t pte_mkwrite(pte_t pte) ^ In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/mn10300/include/asm/pgtable.h:33, from mm/init-mm.c:9: include/linux/mm.h:624:9: note: previous implicit declaration of 'pte_mkwrite' was here pte = pte_mkwrite(pte); ^ cc1: some warnings being treated as errors vim +/VMALLOC_START +486 include/linux/mm.h 0738c4bb8 Paul Mundt 2008-03-12 480 */ bb00a789e Yaowei Bai 2016-05-19 481 static inline bool is_vmalloc_addr(const void *x) 9e2779fa2 Christoph Lameter 2008-02-04 482 { 0738c4bb8 Paul Mundt 2008-03-12 483 #ifdef CONFIG_MMU 9e2779fa2 Christoph Lameter 2008-02-04 484unsigned long addr = (unsigned long)x; 9e2779fa2 Christoph Lameter 2008-02-04 485 9e2779fa2 Christoph Lameter 2008-02-04 @486return addr >= VMALLOC_START && addr < VMALLOC_END; 0738c4bb8 Paul Mundt 2008-03-12 487 #else bb00a789e Yaowei Bai 2016-05-19 488return false; 8ca3ed87d David Howells 2008-02-23 489 #endif 0738c4bb8 Paul Mundt 2008-03-12 490 } 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 491 #ifdef CONFIG_MMU 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 492 extern int is_vmalloc_or_module_addr(const void *x); 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 493 #else 934831d06 David Howells 2009-09-24 494 static inline int is_vmalloc_or_module_addr(const void *x) 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 495 { 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 496return 0; 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 497 } 81ac3ad90 KAMEZAWA Hiroyuki 2009-09-22 498 #endif 9e2779fa2 Christoph Lameter 2008-02-04
Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
Hi Catalin, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.8-rc2 next-20160816] [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/Catalin-Marinas/mm-kmemleak-Avoid-using-__va-on-addresses-that-don-t-have-a-lowmem-mapping/20160816-232733 base: git://git.cmpxchg.org/linux-mmotm.git master config: tile-tilegx_defconfig (attached as .config) compiler: tilegx-linux-gcc (GCC) 4.6.2 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=tile All error/warnings (new ones prefixed by >>): In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/tile/include/asm/pgtable.h:27, from mm/init-mm.c:9: include/linux/mm.h: In function 'is_vmalloc_addr': include/linux/mm.h:486:17: error: 'VMALLOC_START' undeclared (first use in this function) include/linux/mm.h:486:17: note: each undeclared identifier is reported only once for each function it appears in include/linux/mm.h:486:41: error: 'VMALLOC_END' undeclared (first use in this function) include/linux/mm.h: In function 'maybe_mkwrite': include/linux/mm.h:624:3: error: implicit declaration of function 'pte_mkwrite' include/linux/mm.h:624:7: error: incompatible types when assigning to type 'pte_t' from type 'int' In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/tile/include/asm/pgtable.h:27, from mm/init-mm.c:9: include/linux/mm.h: At top level: >> include/linux/mm.h:1572:39: error: unknown type name 'pud_t' include/linux/mm.h:1603:1: error: unknown type name 'pud_t' include/linux/mm.h: In function 'pud_alloc': include/linux/mm.h:1605:2: error: implicit declaration of function 'pgd_none' include/linux/mm.h:1606:3: error: implicit declaration of function 'pud_offset' include/linux/mm.h:1606:7: warning: pointer/integer type mismatch in conditional expression [enabled by default] include/linux/mm.h: At top level: include/linux/mm.h:1609:54: error: unknown type name 'pud_t' include/linux/mm.h: In function 'pte_lockptr': >> include/linux/mm.h:1648:2: error: implicit declaration of function 'pmd_page' >> include/linux/mm.h:1648:2: warning: passing argument 1 of 'ptlock_ptr' makes >> pointer from integer without a cast [enabled by default] include/linux/mm.h:1640:27: note: expected 'struct page but argument is of type 'int' include/linux/mm.h: In function 'pgtable_init': include/linux/mm.h:1690:2: error: implicit declaration of function 'pgtable_cache_init' In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/tile/include/asm/pgtable.h:27, from mm/init-mm.c:9: include/linux/mm.h: At top level: include/linux/mm.h:2330:1: error: unknown type name 'pud_t' include/linux/mm.h:2331:29: error: unknown type name 'pud_t' In file included from mm/init-mm.c:9:0: >> arch/tile/include/asm/pgtable.h:66:13: warning: conflicting types for >> 'pgtable_cache_init' [enabled by default] include/linux/mm.h:1690:2: note: previous implicit declaration of 'pgtable_cache_init' was here In file included from arch/tile/include/asm/pgtable_64.h:62:0, from arch/tile/include/asm/pgtable.h:359, from mm/init-mm.c:9: >> include/asm-generic/pgtable-nopud.h:25:19: error: static declaration of >> 'pgd_none' follows non-static declaration include/linux/mm.h:1605:10: note: previous implicit declaration of 'pgd_none' was here >> include/asm-generic/pgtable-nopud.h:38:23: error: conflicting types for >> 'pud_offset' include/linux/mm.h:1606:9: note: previous implicit declaration of 'pud_offset' was here cc1: some warnings being treated as errors vim +/pud_t +1572 include/linux/mm.h dc6c9a35 Kirill A. Shutemov 2015-02-11 1566 } dc6c9a35 Kirill A. Shutemov 2015-02-11 1567 dc6c9a35 Kirill A. Shutemov 2015-02-11 1568 static inline void mm_inc_nr_pmds(struct mm_struct *mm) {} dc6c9a35 Kirill A. Shutemov 2015-02-11 1569 static inline void mm_dec_nr_pmds(struct mm_struct *mm) {} dc6c9a35 Kirill A. Shutemov 2015-02-11 1570 5f22df00 Nick Piggin2007-05-06 1571 #else 1bb3630e Hugh Dickins 2005-10-29 @1572 int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); dc6c9a35 Kirill A. Shutemov 2015-02-11 1573 2d2f5119 Kirill A. Shutemov 2015-02-12 1574 static inline void mm_nr_pmds_init(struct mm_struct *mm) 2d2f5119 Kirill A. Shutemov 2015-02-12 1575 { 2d2f5119 Kirill A. Shutemov 2015-02-12 1576atomic_long_set(>nr_pmds, 0); 2d2f5119 Kirill A. Shutemov 2015-02-12 1577 } 2d2f5119 Kirill A. Shutemov 2015-02-12 1578 dc6c9a35 Kirill A. Shutemov 2015-02-11 1579 static inline unsigned long
Re: [PATCH] mm: kmemleak: Avoid using __va() on addresses that don't have a lowmem mapping
Hi Catalin, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.8-rc2 next-20160816] [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/Catalin-Marinas/mm-kmemleak-Avoid-using-__va-on-addresses-that-don-t-have-a-lowmem-mapping/20160816-232733 base: git://git.cmpxchg.org/linux-mmotm.git master config: tile-tilegx_defconfig (attached as .config) compiler: tilegx-linux-gcc (GCC) 4.6.2 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=tile All error/warnings (new ones prefixed by >>): In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/tile/include/asm/pgtable.h:27, from mm/init-mm.c:9: include/linux/mm.h: In function 'is_vmalloc_addr': include/linux/mm.h:486:17: error: 'VMALLOC_START' undeclared (first use in this function) include/linux/mm.h:486:17: note: each undeclared identifier is reported only once for each function it appears in include/linux/mm.h:486:41: error: 'VMALLOC_END' undeclared (first use in this function) include/linux/mm.h: In function 'maybe_mkwrite': include/linux/mm.h:624:3: error: implicit declaration of function 'pte_mkwrite' include/linux/mm.h:624:7: error: incompatible types when assigning to type 'pte_t' from type 'int' In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/tile/include/asm/pgtable.h:27, from mm/init-mm.c:9: include/linux/mm.h: At top level: >> include/linux/mm.h:1572:39: error: unknown type name 'pud_t' include/linux/mm.h:1603:1: error: unknown type name 'pud_t' include/linux/mm.h: In function 'pud_alloc': include/linux/mm.h:1605:2: error: implicit declaration of function 'pgd_none' include/linux/mm.h:1606:3: error: implicit declaration of function 'pud_offset' include/linux/mm.h:1606:7: warning: pointer/integer type mismatch in conditional expression [enabled by default] include/linux/mm.h: At top level: include/linux/mm.h:1609:54: error: unknown type name 'pud_t' include/linux/mm.h: In function 'pte_lockptr': >> include/linux/mm.h:1648:2: error: implicit declaration of function 'pmd_page' >> include/linux/mm.h:1648:2: warning: passing argument 1 of 'ptlock_ptr' makes >> pointer from integer without a cast [enabled by default] include/linux/mm.h:1640:27: note: expected 'struct page but argument is of type 'int' include/linux/mm.h: In function 'pgtable_init': include/linux/mm.h:1690:2: error: implicit declaration of function 'pgtable_cache_init' In file included from include/linux/kmemleak.h:24:0, from include/linux/slab.h:117, from arch/tile/include/asm/pgtable.h:27, from mm/init-mm.c:9: include/linux/mm.h: At top level: include/linux/mm.h:2330:1: error: unknown type name 'pud_t' include/linux/mm.h:2331:29: error: unknown type name 'pud_t' In file included from mm/init-mm.c:9:0: >> arch/tile/include/asm/pgtable.h:66:13: warning: conflicting types for >> 'pgtable_cache_init' [enabled by default] include/linux/mm.h:1690:2: note: previous implicit declaration of 'pgtable_cache_init' was here In file included from arch/tile/include/asm/pgtable_64.h:62:0, from arch/tile/include/asm/pgtable.h:359, from mm/init-mm.c:9: >> include/asm-generic/pgtable-nopud.h:25:19: error: static declaration of >> 'pgd_none' follows non-static declaration include/linux/mm.h:1605:10: note: previous implicit declaration of 'pgd_none' was here >> include/asm-generic/pgtable-nopud.h:38:23: error: conflicting types for >> 'pud_offset' include/linux/mm.h:1606:9: note: previous implicit declaration of 'pud_offset' was here cc1: some warnings being treated as errors vim +/pud_t +1572 include/linux/mm.h dc6c9a35 Kirill A. Shutemov 2015-02-11 1566 } dc6c9a35 Kirill A. Shutemov 2015-02-11 1567 dc6c9a35 Kirill A. Shutemov 2015-02-11 1568 static inline void mm_inc_nr_pmds(struct mm_struct *mm) {} dc6c9a35 Kirill A. Shutemov 2015-02-11 1569 static inline void mm_dec_nr_pmds(struct mm_struct *mm) {} dc6c9a35 Kirill A. Shutemov 2015-02-11 1570 5f22df00 Nick Piggin2007-05-06 1571 #else 1bb3630e Hugh Dickins 2005-10-29 @1572 int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); dc6c9a35 Kirill A. Shutemov 2015-02-11 1573 2d2f5119 Kirill A. Shutemov 2015-02-12 1574 static inline void mm_nr_pmds_init(struct mm_struct *mm) 2d2f5119 Kirill A. Shutemov 2015-02-12 1575 { 2d2f5119 Kirill A. Shutemov 2015-02-12 1576atomic_long_set(>nr_pmds, 0); 2d2f5119 Kirill A. Shutemov 2015-02-12 1577 } 2d2f5119 Kirill A. Shutemov 2015-02-12 1578 dc6c9a35 Kirill A. Shutemov 2015-02-11 1579 static inline unsigned long