[davidhildenbrand:folded_pgtable 28/32] arch/x86/mm/pgtable.c:434:3: error: call to '__compiletime_assert_476' declared with 'error' attribute: BUILD_BUG failed
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild |
|---|---|
| Message-ID | <[email protected]> |
:::::: :::::: Manual check reason: "__compiletime_assert_NNN" :::::: BCC: [email protected] CC: [email protected] CC: [email protected] TO: "David Hildenbrand (Arm)" <[email protected]> tree: https://github.com/davidhildenbrand/linux folded_pgtable head: 0551ca68b7552b7d71f1d2882635809a573d6c79 commit: 4d449742015c33fd18a4aebf1ee795675c2b532f [28/32] mm/pgtable: disallow calling folded set_pgd/set_p4d/set_pud :::::: branch date: 22 hours ago :::::: commit date: 22 hours ago config: i386-randconfig-003-20260709 (https://download.01.org/0day-ci/archive/20260709/[email protected]/config) compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/ All errors (new ones prefixed by >>): >> arch/x86/mm/pgtable.c:434:3: error: call to '__compiletime_assert_476' declared with 'error' attribute: BUILD_BUG failed 434 | set_pud(pudp, entry); | ^ include/asm-generic/pgtable-nopmd.h:41:35: note: expanded from macro 'set_pud' 41 | #define set_pud(pudptr, pudval) BUILD_BUG() | ^ include/linux/build_bug.h:60:21: note: expanded from macro 'BUILD_BUG' 60 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | ^ include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG' 40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ^ include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert' 683 | prefix ## suffix(); \ | ^ <scratch space>:231:1: note: expanded from here 231 | __compiletime_assert_476 | ^ 1 error generated. -- arch/x86/platform/olpc/olpc_ofw.c:26:16: warning: variable 'ofw_pde' set but not used [-Wunused-but-set-variable] 26 | pgd_t *base, *ofw_pde; | ^ >> arch/x86/platform/olpc/olpc_ofw.c:41:2: error: call to '__compiletime_assert_133' declared with 'error' attribute: BUILD_BUG failed 41 | set_pgd(&swapper_pg_dir[OLPC_OFW_PDE_NR], *ofw_pde); | ^ include/asm-generic/pgtable-nop4d.h:32:35: note: expanded from macro 'set_pgd' 32 | #define set_pgd(pgdptr, pgdval) BUILD_BUG() | ^ include/linux/build_bug.h:60:21: note: expanded from macro 'BUILD_BUG' 60 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | ^ include/linux/build_bug.h:40:37: note: expanded from macro 'BUILD_BUG_ON_MSG' 40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert' 690 | __compiletime_assert(condition, msg, prefix, suffix) | ^ include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert' 683 | prefix ## suffix(); \ | ^ <scratch space>:194:1: note: expanded from here 194 | __compiletime_assert_133 | ^ 1 warning and 1 error generated. vim +434 arch/x86/mm/pgtable.c a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 425 a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 426 int pudp_set_access_flags(struct vm_area_struct *vma, unsigned long address, a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 427 pud_t *pudp, pud_t entry, int dirty) a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 428 { a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 429 int changed = !pud_same(*pudp, entry); a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 430 a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 431 VM_BUG_ON(address & ~HPAGE_PUD_MASK); a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 432 a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 433 if (changed && dirty) { 9bc4f28af75a91a Nadav Amit 2018-09-02 @434 set_pud(pudp, entry); a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 435 /* a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 436 * We had a write-protection fault here and changed the pud a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 437 * to to more permissive. No need to flush the TLB for that, a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 438 * #PF is architecturally guaranteed to do that and in the a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 439 * worst-case we'll generate a spurious fault. a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 440 */ a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 441 } a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 442 a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 443 return changed; a00cc7d9dd93d66 Matthew Wilcox 2017-02-24 444 } db3eb96f4e6281b Andrea Arcangeli 2011-01-13 445 #endif db3eb96f4e6281b Andrea Arcangeli 2011-01-13 446 :::::: The code at line 434 was first introduced by commit :::::: 9bc4f28af75a91aea0ae383f50b0a430c4509303 x86/mm: Use WRITE_ONCE() when setting PTEs :::::: TO: Nadav Amit <[email protected]> :::::: CC: Thomas Gleixner <[email protected]> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki