[alexshi:pr/17 1/2] arch/x86/kernel/ptrace.c:245:2: error: call to '__compiletime_assert_297' declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct pt_regs, r15) != 0
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] TO: [email protected] Hi Alex, FYI, the error/warning still remains. tree: https://github.com/alexshi/linux.git pr/17 head: 521ce3b68fcc0aae09370fcfe3aad3c45a6e9d0d commit: 80997c8b66fd8d73a96cd681a473bacaf75b7d98 [1/2] x86/ptrace: move down unused registers :::::: branch date: 18 hours ago :::::: commit date: 2 years, 6 months ago config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20260712/[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/20260712/[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 >>): In file included from arch/x86/kernel/ptrace.c:11: In file included from include/linux/mm.h:2188: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> arch/x86/kernel/ptrace.c:245:2: error: call to '__compiletime_assert_297' declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct pt_regs, r15) != 0 245 | BUILD_BUG_ON(offsetof(struct pt_regs, r15) != 0); | ^ include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^ include/linux/compiler_types.h:435:2: note: expanded from macro 'compiletime_assert' 435 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert' 423 | __compiletime_assert(condition, msg, prefix, suffix) | ^ include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert' 416 | prefix ## suffix(); \ | ^ <scratch space>:5:1: note: expanded from here 5 | __compiletime_assert_297 | ^ >> arch/x86/kernel/ptrace.c:245:2: error: call to '__compiletime_assert_297' declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct pt_regs, r15) != 0 include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^ include/linux/compiler_types.h:435:2: note: expanded from macro 'compiletime_assert' 435 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert' 423 | __compiletime_assert(condition, msg, prefix, suffix) | ^ include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert' 416 | prefix ## suffix(); \ | ^ <scratch space>:5:1: note: expanded from here 5 | __compiletime_assert_297 | ^ >> arch/x86/kernel/ptrace.c:245:2: error: call to '__compiletime_assert_297' declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct pt_regs, r15) != 0 include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^ include/linux/compiler_types.h:435:2: note: expanded from macro 'compiletime_assert' 435 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert' 423 | __compiletime_assert(condition, msg, prefix, suffix) | ^ include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert' 416 | prefix ## suffix(); \ | ^ <scratch space>:5:1: note: expanded from here 5 | __compiletime_assert_297 | ^ 1 warning and 3 errors generated. vim +245 arch/x86/kernel/ptrace.c 2047b08be67b70 Roland McGrath 2008-01-30 242 2047b08be67b70 Roland McGrath 2008-01-30 243 static unsigned long *pt_regs_access(struct pt_regs *regs, unsigned long offset) 2047b08be67b70 Roland McGrath 2008-01-30 244 { 2047b08be67b70 Roland McGrath 2008-01-30 @245 BUILD_BUG_ON(offsetof(struct pt_regs, r15) != 0); 2047b08be67b70 Roland McGrath 2008-01-30 246 return ®s->r15 + (offset / sizeof(regs->r15)); 2047b08be67b70 Roland McGrath 2008-01-30 247 } 2047b08be67b70 Roland McGrath 2008-01-30 248 :::::: The code at line 245 was first introduced by commit :::::: 2047b08be67b70875d8765fc81d34ce28041bec3 x86: x86 ptrace getreg/putreg merge :::::: TO: Roland McGrath <[email protected]> :::::: CC: Ingo Molnar <[email protected]> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki