From: kbuild test robot <lkp@intel.com>
To: Sergey Dyasli <sergey.dyasli@citrix.com>
Cc: kbuild-all@lists.01.org, xen-devel@lists.xen.org,
kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Juergen Gross <jgross@suse.com>,
Stefano Stabellini <sstabellini@kernel.org>,
George Dunlap <george.dunlap@citrix.com>,
Ross Lagerwall <ross.lagerwall@citrix.com>,
Andrew Morton <akpm@linux-foundation.org>,
Sergey Dyasli <sergey.dyasli@citrix.com>
Subject: Re: [PATCH v1 1/4] kasan: introduce set_pmd_early_shadow()
Date: Fri, 10 Jan 2020 22:41:39 +0800 [thread overview]
Message-ID: <202001102201.gnR04QZ3%lkp@intel.com> (raw)
In-Reply-To: <20200108152100.7630-2-sergey.dyasli@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 8332 bytes --]
Hi Sergey,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[also build test ERROR on net/master linus/master v5.5-rc5 next-20200109]
[cannot apply to xen-tip/linux-next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Sergey-Dyasli/basic-KASAN-support-for-Xen-PV-domains/20200110-042623
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4a4a52d49d11f5c4a0df8b9806c8c5563801f753
config: arm64-randconfig-a001-20200109 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/arm64/include/asm/kasan.h:9:0,
from arch/arm64/include/asm/processor.h:34,
from include/asm-generic/qrwlock.h:14,
from ./arch/arm64/include/generated/asm/qrwlock.h:1,
from arch/arm64/include/asm/spinlock.h:8,
from include/linux/spinlock.h:89,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/memblock.h:13,
from mm/kasan/init.c:14:
mm/kasan/init.c: In function 'set_pmd_early_shadow':
>> mm/kasan/init.c:90:43: error: '_PAGE_TABLE' undeclared (first use in this function); did you mean 'NR_PAGETABLE'?
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
>> mm/kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
mm/kasan/init.c:90:43: note: each undeclared identifier is reported only once for each function it appears in
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
>> mm/kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
--
In file included from arch/arm64/include/asm/kasan.h:9:0,
from arch/arm64/include/asm/processor.h:34,
from include/asm-generic/qrwlock.h:14,
from ./arch/arm64/include/generated/asm/qrwlock.h:1,
from arch/arm64/include/asm/spinlock.h:8,
from include/linux/spinlock.h:89,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/memblock.h:13,
from mm//kasan/init.c:14:
mm//kasan/init.c: In function 'set_pmd_early_shadow':
mm//kasan/init.c:90:43: error: '_PAGE_TABLE' undeclared (first use in this function); did you mean 'NR_PAGETABLE'?
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
mm//kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
mm//kasan/init.c:90:43: note: each undeclared identifier is reported only once for each function it appears in
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
mm//kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
vim +90 mm/kasan/init.c
> 14 #include <linux/memblock.h>
15 #include <linux/init.h>
16 #include <linux/kasan.h>
17 #include <linux/kernel.h>
18 #include <linux/mm.h>
19 #include <linux/pfn.h>
20 #include <linux/slab.h>
21
22 #include <asm/page.h>
23 #include <asm/pgalloc.h>
24
25 #include "kasan.h"
26
27 /*
28 * This page serves two purposes:
29 * - It used as early shadow memory. The entire shadow region populated
30 * with this page, before we will be able to setup normal shadow memory.
31 * - Latter it reused it as zero shadow to cover large ranges of memory
32 * that allowed to access, but not handled by kasan (vmalloc/vmemmap ...).
33 */
34 unsigned char kasan_early_shadow_page[PAGE_SIZE] __page_aligned_bss;
35
36 #if CONFIG_PGTABLE_LEVELS > 4
37 p4d_t kasan_early_shadow_p4d[MAX_PTRS_PER_P4D] __page_aligned_bss;
38 static inline bool kasan_p4d_table(pgd_t pgd)
39 {
40 return pgd_page(pgd) == virt_to_page(lm_alias(kasan_early_shadow_p4d));
41 }
42 #else
43 static inline bool kasan_p4d_table(pgd_t pgd)
44 {
45 return false;
46 }
47 #endif
48 #if CONFIG_PGTABLE_LEVELS > 3
49 pud_t kasan_early_shadow_pud[PTRS_PER_PUD] __page_aligned_bss;
50 static inline bool kasan_pud_table(p4d_t p4d)
51 {
52 return p4d_page(p4d) == virt_to_page(lm_alias(kasan_early_shadow_pud));
53 }
54 #else
55 static inline bool kasan_pud_table(p4d_t p4d)
56 {
57 return false;
58 }
59 #endif
60 #if CONFIG_PGTABLE_LEVELS > 2
61 pmd_t kasan_early_shadow_pmd[PTRS_PER_PMD] __page_aligned_bss;
62 static inline bool kasan_pmd_table(pud_t pud)
63 {
64 return pud_page(pud) == virt_to_page(lm_alias(kasan_early_shadow_pmd));
65 }
66 #else
67 static inline bool kasan_pmd_table(pud_t pud)
68 {
69 return false;
70 }
71 #endif
72 pte_t kasan_early_shadow_pte[PTRS_PER_PTE] __page_aligned_bss;
73
74 static inline bool kasan_pte_table(pmd_t pmd)
75 {
76 return pmd_page(pmd) == virt_to_page(lm_alias(kasan_early_shadow_pte));
77 }
78
79 static inline bool kasan_early_shadow_page_entry(pte_t pte)
80 {
81 return pte_page(pte) == virt_to_page(lm_alias(kasan_early_shadow_page));
82 }
83
84 static inline void set_pmd_early_shadow(pmd_t *pmd)
85 {
86 static bool pmd_populated = false;
87 pte_t *early_shadow = lm_alias(kasan_early_shadow_pte);
88
89 if (likely(pmd_populated)) {
> 90 set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
91 } else {
92 pmd_populate_kernel(&init_mm, pmd, early_shadow);
93 pmd_populated = true;
94 }
95 }
96
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32377 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Sergey Dyasli <sergey.dyasli@citrix.com>
Cc: Juergen Gross <jgross@suse.com>,
Sergey Dyasli <sergey.dyasli@citrix.com>,
Stefano Stabellini <sstabellini@kernel.org>,
kbuild-all@lists.01.org,
Ross Lagerwall <ross.lagerwall@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
xen-devel@lists.xen.org, linux-mm@kvack.org,
Alexander Potapenko <glider@google.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [Xen-devel] [PATCH v1 1/4] kasan: introduce set_pmd_early_shadow()
Date: Fri, 10 Jan 2020 22:41:39 +0800 [thread overview]
Message-ID: <202001102201.gnR04QZ3%lkp@intel.com> (raw)
In-Reply-To: <20200108152100.7630-2-sergey.dyasli@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 8332 bytes --]
Hi Sergey,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[also build test ERROR on net/master linus/master v5.5-rc5 next-20200109]
[cannot apply to xen-tip/linux-next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Sergey-Dyasli/basic-KASAN-support-for-Xen-PV-domains/20200110-042623
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4a4a52d49d11f5c4a0df8b9806c8c5563801f753
config: arm64-randconfig-a001-20200109 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/arm64/include/asm/kasan.h:9:0,
from arch/arm64/include/asm/processor.h:34,
from include/asm-generic/qrwlock.h:14,
from ./arch/arm64/include/generated/asm/qrwlock.h:1,
from arch/arm64/include/asm/spinlock.h:8,
from include/linux/spinlock.h:89,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/memblock.h:13,
from mm/kasan/init.c:14:
mm/kasan/init.c: In function 'set_pmd_early_shadow':
>> mm/kasan/init.c:90:43: error: '_PAGE_TABLE' undeclared (first use in this function); did you mean 'NR_PAGETABLE'?
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
>> mm/kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
mm/kasan/init.c:90:43: note: each undeclared identifier is reported only once for each function it appears in
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
>> mm/kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
--
In file included from arch/arm64/include/asm/kasan.h:9:0,
from arch/arm64/include/asm/processor.h:34,
from include/asm-generic/qrwlock.h:14,
from ./arch/arm64/include/generated/asm/qrwlock.h:1,
from arch/arm64/include/asm/spinlock.h:8,
from include/linux/spinlock.h:89,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/memblock.h:13,
from mm//kasan/init.c:14:
mm//kasan/init.c: In function 'set_pmd_early_shadow':
mm//kasan/init.c:90:43: error: '_PAGE_TABLE' undeclared (first use in this function); did you mean 'NR_PAGETABLE'?
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
mm//kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
mm//kasan/init.c:90:43: note: each undeclared identifier is reported only once for each function it appears in
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
mm//kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
vim +90 mm/kasan/init.c
> 14 #include <linux/memblock.h>
15 #include <linux/init.h>
16 #include <linux/kasan.h>
17 #include <linux/kernel.h>
18 #include <linux/mm.h>
19 #include <linux/pfn.h>
20 #include <linux/slab.h>
21
22 #include <asm/page.h>
23 #include <asm/pgalloc.h>
24
25 #include "kasan.h"
26
27 /*
28 * This page serves two purposes:
29 * - It used as early shadow memory. The entire shadow region populated
30 * with this page, before we will be able to setup normal shadow memory.
31 * - Latter it reused it as zero shadow to cover large ranges of memory
32 * that allowed to access, but not handled by kasan (vmalloc/vmemmap ...).
33 */
34 unsigned char kasan_early_shadow_page[PAGE_SIZE] __page_aligned_bss;
35
36 #if CONFIG_PGTABLE_LEVELS > 4
37 p4d_t kasan_early_shadow_p4d[MAX_PTRS_PER_P4D] __page_aligned_bss;
38 static inline bool kasan_p4d_table(pgd_t pgd)
39 {
40 return pgd_page(pgd) == virt_to_page(lm_alias(kasan_early_shadow_p4d));
41 }
42 #else
43 static inline bool kasan_p4d_table(pgd_t pgd)
44 {
45 return false;
46 }
47 #endif
48 #if CONFIG_PGTABLE_LEVELS > 3
49 pud_t kasan_early_shadow_pud[PTRS_PER_PUD] __page_aligned_bss;
50 static inline bool kasan_pud_table(p4d_t p4d)
51 {
52 return p4d_page(p4d) == virt_to_page(lm_alias(kasan_early_shadow_pud));
53 }
54 #else
55 static inline bool kasan_pud_table(p4d_t p4d)
56 {
57 return false;
58 }
59 #endif
60 #if CONFIG_PGTABLE_LEVELS > 2
61 pmd_t kasan_early_shadow_pmd[PTRS_PER_PMD] __page_aligned_bss;
62 static inline bool kasan_pmd_table(pud_t pud)
63 {
64 return pud_page(pud) == virt_to_page(lm_alias(kasan_early_shadow_pmd));
65 }
66 #else
67 static inline bool kasan_pmd_table(pud_t pud)
68 {
69 return false;
70 }
71 #endif
72 pte_t kasan_early_shadow_pte[PTRS_PER_PTE] __page_aligned_bss;
73
74 static inline bool kasan_pte_table(pmd_t pmd)
75 {
76 return pmd_page(pmd) == virt_to_page(lm_alias(kasan_early_shadow_pte));
77 }
78
79 static inline bool kasan_early_shadow_page_entry(pte_t pte)
80 {
81 return pte_page(pte) == virt_to_page(lm_alias(kasan_early_shadow_page));
82 }
83
84 static inline void set_pmd_early_shadow(pmd_t *pmd)
85 {
86 static bool pmd_populated = false;
87 pte_t *early_shadow = lm_alias(kasan_early_shadow_pte);
88
89 if (likely(pmd_populated)) {
> 90 set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
91 } else {
92 pmd_populate_kernel(&init_mm, pmd, early_shadow);
93 pmd_populated = true;
94 }
95 }
96
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32377 bytes --]
[-- Attachment #3: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v1 1/4] kasan: introduce set_pmd_early_shadow()
Date: Fri, 10 Jan 2020 22:41:39 +0800 [thread overview]
Message-ID: <202001102201.gnR04QZ3%lkp@intel.com> (raw)
In-Reply-To: <20200108152100.7630-2-sergey.dyasli@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 8523 bytes --]
Hi Sergey,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[also build test ERROR on net/master linus/master v5.5-rc5 next-20200109]
[cannot apply to xen-tip/linux-next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Sergey-Dyasli/basic-KASAN-support-for-Xen-PV-domains/20200110-042623
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4a4a52d49d11f5c4a0df8b9806c8c5563801f753
config: arm64-randconfig-a001-20200109 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/arm64/include/asm/kasan.h:9:0,
from arch/arm64/include/asm/processor.h:34,
from include/asm-generic/qrwlock.h:14,
from ./arch/arm64/include/generated/asm/qrwlock.h:1,
from arch/arm64/include/asm/spinlock.h:8,
from include/linux/spinlock.h:89,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/memblock.h:13,
from mm/kasan/init.c:14:
mm/kasan/init.c: In function 'set_pmd_early_shadow':
>> mm/kasan/init.c:90:43: error: '_PAGE_TABLE' undeclared (first use in this function); did you mean 'NR_PAGETABLE'?
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
>> mm/kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
mm/kasan/init.c:90:43: note: each undeclared identifier is reported only once for each function it appears in
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
>> mm/kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
--
In file included from arch/arm64/include/asm/kasan.h:9:0,
from arch/arm64/include/asm/processor.h:34,
from include/asm-generic/qrwlock.h:14,
from ./arch/arm64/include/generated/asm/qrwlock.h:1,
from arch/arm64/include/asm/spinlock.h:8,
from include/linux/spinlock.h:89,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/memblock.h:13,
from mm//kasan/init.c:14:
mm//kasan/init.c: In function 'set_pmd_early_shadow':
mm//kasan/init.c:90:43: error: '_PAGE_TABLE' undeclared (first use in this function); did you mean 'NR_PAGETABLE'?
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
mm//kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
mm//kasan/init.c:90:43: note: each undeclared identifier is reported only once for each function it appears in
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^
arch/arm64/include/asm/pgtable-types.h:40:30: note: in definition of macro '__pgd'
#define __pgd(x) ((pgd_t) { (x) } )
^
>> include/asm-generic/pgtable-nopmd.h:50:32: note: in expansion of macro '__pud'
#define __pmd(x) ((pmd_t) { __pud(x) } )
^~~~~
mm//kasan/init.c:90:16: note: in expansion of macro '__pmd'
set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
^~~~~
vim +90 mm/kasan/init.c
> 14 #include <linux/memblock.h>
15 #include <linux/init.h>
16 #include <linux/kasan.h>
17 #include <linux/kernel.h>
18 #include <linux/mm.h>
19 #include <linux/pfn.h>
20 #include <linux/slab.h>
21
22 #include <asm/page.h>
23 #include <asm/pgalloc.h>
24
25 #include "kasan.h"
26
27 /*
28 * This page serves two purposes:
29 * - It used as early shadow memory. The entire shadow region populated
30 * with this page, before we will be able to setup normal shadow memory.
31 * - Latter it reused it as zero shadow to cover large ranges of memory
32 * that allowed to access, but not handled by kasan (vmalloc/vmemmap ...).
33 */
34 unsigned char kasan_early_shadow_page[PAGE_SIZE] __page_aligned_bss;
35
36 #if CONFIG_PGTABLE_LEVELS > 4
37 p4d_t kasan_early_shadow_p4d[MAX_PTRS_PER_P4D] __page_aligned_bss;
38 static inline bool kasan_p4d_table(pgd_t pgd)
39 {
40 return pgd_page(pgd) == virt_to_page(lm_alias(kasan_early_shadow_p4d));
41 }
42 #else
43 static inline bool kasan_p4d_table(pgd_t pgd)
44 {
45 return false;
46 }
47 #endif
48 #if CONFIG_PGTABLE_LEVELS > 3
49 pud_t kasan_early_shadow_pud[PTRS_PER_PUD] __page_aligned_bss;
50 static inline bool kasan_pud_table(p4d_t p4d)
51 {
52 return p4d_page(p4d) == virt_to_page(lm_alias(kasan_early_shadow_pud));
53 }
54 #else
55 static inline bool kasan_pud_table(p4d_t p4d)
56 {
57 return false;
58 }
59 #endif
60 #if CONFIG_PGTABLE_LEVELS > 2
61 pmd_t kasan_early_shadow_pmd[PTRS_PER_PMD] __page_aligned_bss;
62 static inline bool kasan_pmd_table(pud_t pud)
63 {
64 return pud_page(pud) == virt_to_page(lm_alias(kasan_early_shadow_pmd));
65 }
66 #else
67 static inline bool kasan_pmd_table(pud_t pud)
68 {
69 return false;
70 }
71 #endif
72 pte_t kasan_early_shadow_pte[PTRS_PER_PTE] __page_aligned_bss;
73
74 static inline bool kasan_pte_table(pmd_t pmd)
75 {
76 return pmd_page(pmd) == virt_to_page(lm_alias(kasan_early_shadow_pte));
77 }
78
79 static inline bool kasan_early_shadow_page_entry(pte_t pte)
80 {
81 return pte_page(pte) == virt_to_page(lm_alias(kasan_early_shadow_page));
82 }
83
84 static inline void set_pmd_early_shadow(pmd_t *pmd)
85 {
86 static bool pmd_populated = false;
87 pte_t *early_shadow = lm_alias(kasan_early_shadow_pte);
88
89 if (likely(pmd_populated)) {
> 90 set_pmd(pmd, __pmd(__pa(early_shadow) | _PAGE_TABLE));
91 } else {
92 pmd_populate_kernel(&init_mm, pmd, early_shadow);
93 pmd_populated = true;
94 }
95 }
96
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32377 bytes --]
next prev parent reply other threads:[~2020-01-10 14:42 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 15:20 [PATCH v1 0/4] basic KASAN support for Xen PV domains Sergey Dyasli
2020-01-08 15:20 ` [Xen-devel] " Sergey Dyasli
2020-01-08 15:20 ` [PATCH v1 1/4] kasan: introduce set_pmd_early_shadow() Sergey Dyasli
2020-01-08 15:20 ` [Xen-devel] " Sergey Dyasli
2020-01-10 14:41 ` kbuild test robot [this message]
2020-01-10 14:41 ` kbuild test robot
2020-01-10 14:41 ` [Xen-devel] " kbuild test robot
2020-01-11 5:21 ` kbuild test robot
2020-01-11 5:21 ` kbuild test robot
2020-01-11 5:21 ` [Xen-devel] " kbuild test robot
2020-01-15 10:54 ` Sergey Dyasli
2020-01-15 10:54 ` [Xen-devel] " Sergey Dyasli
2020-01-15 10:54 ` Sergey Dyasli
2020-01-15 11:09 ` Jürgen Groß
2020-01-15 11:09 ` [Xen-devel] " Jürgen Groß
2020-01-15 16:32 ` Sergey Dyasli
2020-01-15 16:32 ` [Xen-devel] " Sergey Dyasli
2020-01-15 16:32 ` Sergey Dyasli
2020-01-16 7:54 ` Jürgen Groß
2020-01-16 7:54 ` [Xen-devel] " Jürgen Groß
2020-01-08 15:20 ` [PATCH v1 2/4] x86/xen: add basic KASAN support for PV kernel Sergey Dyasli
2020-01-08 15:20 ` [Xen-devel] " Sergey Dyasli
2020-01-09 9:15 ` Jürgen Groß
2020-01-09 9:15 ` [Xen-devel] " Jürgen Groß
2020-01-10 11:07 ` Sergey Dyasli
2020-01-10 11:07 ` [Xen-devel] " Sergey Dyasli
2020-01-10 11:07 ` Sergey Dyasli
2020-01-09 23:27 ` Boris Ostrovsky
2020-01-09 23:27 ` [Xen-devel] " Boris Ostrovsky
2020-01-10 11:46 ` Sergey Dyasli
2020-01-10 11:46 ` [Xen-devel] " Sergey Dyasli
2020-01-10 11:46 ` Sergey Dyasli
2020-01-10 13:05 ` kbuild test robot
2020-01-10 13:05 ` kbuild test robot
2020-01-10 13:05 ` [Xen-devel] " kbuild test robot
2020-01-10 17:19 ` kbuild test robot
2020-01-10 17:19 ` kbuild test robot
2020-01-10 17:19 ` [Xen-devel] " kbuild test robot
2020-01-08 15:20 ` [PATCH v1 3/4] xen: teach KASAN about grant tables Sergey Dyasli
2020-01-08 15:20 ` [Xen-devel] " Sergey Dyasli
2020-01-08 15:21 ` [PATCH v1 4/4] xen/netback: Fix grant copy across page boundary with KASAN Sergey Dyasli
2020-01-08 15:21 ` [Xen-devel] " Sergey Dyasli
2020-01-09 10:33 ` Vlastimil Babka
2020-01-09 10:33 ` [Xen-devel] " Vlastimil Babka
2020-01-15 11:02 ` Sergey Dyasli
2020-01-15 11:02 ` [Xen-devel] " Sergey Dyasli
2020-01-15 11:02 ` Sergey Dyasli
2020-01-09 13:36 ` Paul Durrant
2020-01-09 13:36 ` [Xen-devel] " Paul Durrant
2020-01-09 13:36 ` Paul Durrant
2020-01-10 14:27 ` Sergey Dyasli
2020-01-10 14:27 ` [Xen-devel] " Sergey Dyasli
2020-01-10 14:27 ` Sergey Dyasli
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=202001102201.gnR04QZ3%lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=boris.ostrovsky@oracle.com \
--cc=dvyukov@google.com \
--cc=george.dunlap@citrix.com \
--cc=glider@google.com \
--cc=jgross@suse.com \
--cc=kasan-dev@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ross.lagerwall@citrix.com \
--cc=sergey.dyasli@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.org \
/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.