Message ID | be8f68bbfc608d9edba17d74971e33c24294db39.1551098214.git.christophe.leroy@c-s.fr (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KASAN for powerpc/32 | expand |
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.0-rc8] [cannot apply to next-20190225] [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/Christophe-Leroy/KASAN-for-powerpc-32/20190226-052610 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-acadia_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 8.2.0-11) 8.2.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=8.2.0 make.cross ARCH=powerpc All errors (new ones prefixed by >>): In file included from arch/powerpc/include/asm/nohash/pgtable.h:8, from arch/powerpc/include/asm/pgtable.h:20, from include/linux/mm.h:98, from include/linux/highmem.h:8, from arch/powerpc/mm/dma-noncoherent.c:31: >> arch/powerpc/include/asm/nohash/32/pgtable.h:75:19: error: 'FIXADDR_START' undeclared here (not in a function); did you mean 'XAS_RESTART'? #define KVIRT_TOP FIXADDR_START ^~~~~~~~~~~~~ arch/powerpc/include/asm/nohash/32/pgtable.h:84:23: note: in expansion of macro 'KVIRT_TOP' #define IOREMAP_TOP ((KVIRT_TOP - CONFIG_CONSISTENT_SIZE) & PAGE_MASK) ^~~~~~~~~ arch/powerpc/mm/dma-noncoherent.c:47:27: note: in expansion of macro 'IOREMAP_TOP' #define CONSISTENT_BASE (IOREMAP_TOP) ^~~~~~~~~~~ arch/powerpc/mm/dma-noncoherent.c:93:14: note: in expansion of macro 'CONSISTENT_BASE' .vm_start = CONSISTENT_BASE, ^~~~~~~~~~~~~~~ vim +75 arch/powerpc/include/asm/nohash/32/pgtable.h 60 61 #define pte_ERROR(e) \ 62 pr_err("%s:%d: bad pte %llx.\n", __FILE__, __LINE__, \ 63 (unsigned long long)pte_val(e)) 64 #define pgd_ERROR(e) \ 65 pr_err("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e)) 66 67 /* 68 * This is the bottom of the PKMAP area with HIGHMEM or an arbitrary 69 * value (for now) on others, from where we can start layout kernel 70 * virtual space that goes below PKMAP and FIXMAP 71 */ 72 #ifdef CONFIG_HIGHMEM 73 #define KVIRT_TOP PKMAP_BASE 74 #else > 75 #define KVIRT_TOP FIXADDR_START 76 #endif 77 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h index aa8406b8f7ba..008e6237a1b2 100644 --- a/arch/powerpc/include/asm/book3s/32/pgtable.h +++ b/arch/powerpc/include/asm/book3s/32/pgtable.h @@ -142,7 +142,7 @@ static inline bool pte_user(pte_t pte) #ifdef CONFIG_HIGHMEM #define KVIRT_TOP PKMAP_BASE #else -#define KVIRT_TOP (0xfe000000UL) /* for now, could be FIXMAP_BASE ? */ +#define KVIRT_TOP FIXADDR_START #endif /* diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h index bed433358260..6c4acd842a3e 100644 --- a/arch/powerpc/include/asm/nohash/32/pgtable.h +++ b/arch/powerpc/include/asm/nohash/32/pgtable.h @@ -72,7 +72,7 @@ extern int icache_44x_need_flush; #ifdef CONFIG_HIGHMEM #define KVIRT_TOP PKMAP_BASE #else -#define KVIRT_TOP (0xfe000000UL) /* for now, could be FIXMAP_BASE ? */ +#define KVIRT_TOP FIXADDR_START #endif /* diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 41a3513cadc9..c077ab1a63ea 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c @@ -34,6 +34,7 @@ #include <linux/slab.h> #include <linux/hugetlb.h> +#include <asm/fixmap.h> #include <asm/pgalloc.h> #include <asm/prom.h> #include <asm/io.h>
When we add KASAN shadow area, KVIRT_TOP can't be anymore fixed at 0xfe000000. This patch uses FIXADDR_START to define KVIRT_TOP. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> --- arch/powerpc/include/asm/book3s/32/pgtable.h | 2 +- arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +- arch/powerpc/mm/init_32.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-)