Messages in this thread | | | Date | Fri, 27 May 2022 11:30:09 +0800 | From | kernel test robot <> | Subject | [rppt:cet/kvm 12/51] arch/x86/include/asm/pgtable.h:1312:13: error: invalid output size for constraint '+a' |
| |
Hi Yu-cheng,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git cet/kvm head: 6c13d37e6c4ff3a7f86c5490b3d0f4f12d0a40da commit: b20ff701175a81ee3517a5f2bca5bbac90529892 [12/51] x86/mm: Update ptep_set_wrprotect() and pmdp_set_wrprotect() for transition from _PAGE_DIRTY to _PAGE_COW config: i386-randconfig-a006 (https://download.01.org/0day-ci/archive/20220527/202205271127.dwkWLBxL-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6f4644d194da594562027a5d458d9fb7a20ebc39) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/commit/?id=b20ff701175a81ee3517a5f2bca5bbac90529892 git remote add rppt https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git git fetch --no-tags rppt cet/kvm git checkout b20ff701175a81ee3517a5f2bca5bbac90529892 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 prepare
If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/kernel/asm-offsets.c:13: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:20: In file included from include/linux/mm.h:33: In file included from include/linux/pgtable.h:6: >> arch/x86/include/asm/pgtable.h:1312:13: error: invalid output size for constraint '+a' } while (!try_cmpxchg(&ptep->pte, &old_pte.pte, new_pte.pte)); ^ include/linux/atomic/atomic-instrumented.h:1978:2: note: expanded from macro 'try_cmpxchg' arch_try_cmpxchg(__ai_ptr, __ai_oldp, __VA_ARGS__); \ ^ arch/x86/include/asm/cmpxchg.h:225:2: note: expanded from macro 'arch_try_cmpxchg' __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr))) ^ arch/x86/include/asm/cmpxchg.h:222:2: note: expanded from macro '__try_cmpxchg' __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX) ^ arch/x86/include/asm/cmpxchg.h:172:23: note: expanded from macro '__raw_try_cmpxchg' [old] "+a" (__old) \ ^ In file included from arch/x86/kernel/asm-offsets.c:13: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:20: In file included from include/linux/mm.h:33: In file included from include/linux/pgtable.h:6: >> arch/x86/include/asm/pgtable.h:1312:13: error: invalid output size for constraint '+a' include/linux/atomic/atomic-instrumented.h:1978:2: note: expanded from macro 'try_cmpxchg' arch_try_cmpxchg(__ai_ptr, __ai_oldp, __VA_ARGS__); \ ^ arch/x86/include/asm/cmpxchg.h:225:2: note: expanded from macro 'arch_try_cmpxchg' __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr))) ^ arch/x86/include/asm/cmpxchg.h:222:2: note: expanded from macro '__try_cmpxchg' __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX) ^ arch/x86/include/asm/cmpxchg.h:184:23: note: expanded from macro '__raw_try_cmpxchg' [old] "+a" (__old) \ ^ In file included from arch/x86/kernel/asm-offsets.c:13: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:20: In file included from include/linux/mm.h:33: In file included from include/linux/pgtable.h:6: >> arch/x86/include/asm/pgtable.h:1312:13: error: invalid output size for constraint '+a' include/linux/atomic/atomic-instrumented.h:1978:2: note: expanded from macro 'try_cmpxchg' arch_try_cmpxchg(__ai_ptr, __ai_oldp, __VA_ARGS__); \ ^ arch/x86/include/asm/cmpxchg.h:225:2: note: expanded from macro 'arch_try_cmpxchg' __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr))) ^ arch/x86/include/asm/cmpxchg.h:222:2: note: expanded from macro '__try_cmpxchg' __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX) ^ arch/x86/include/asm/cmpxchg.h:196:23: note: expanded from macro '__raw_try_cmpxchg' [old] "+a" (__old) \ ^ In file included from arch/x86/kernel/asm-offsets.c:13: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:20: In file included from include/linux/mm.h:33: In file included from include/linux/pgtable.h:6: >> arch/x86/include/asm/pgtable.h:1312:13: error: invalid output size for constraint '+a' include/linux/atomic/atomic-instrumented.h:1978:2: note: expanded from macro 'try_cmpxchg' arch_try_cmpxchg(__ai_ptr, __ai_oldp, __VA_ARGS__); \ ^ arch/x86/include/asm/cmpxchg.h:225:2: note: expanded from macro 'arch_try_cmpxchg' __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr))) ^ arch/x86/include/asm/cmpxchg.h:222:2: note: expanded from macro '__try_cmpxchg' __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX) ^ arch/x86/include/asm/cmpxchg.h:208:23: note: expanded from macro '__raw_try_cmpxchg' [old] "+a" (__old) \ ^ In file included from arch/x86/kernel/asm-offsets.c:13: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:20: In file included from include/linux/mm.h:33: In file included from include/linux/pgtable.h:6: arch/x86/include/asm/pgtable.h:1383:13: error: invalid output size for constraint '+a' } while (!try_cmpxchg(&pmdp->pmd, &old_pmd.pmd, new_pmd.pmd)); ^ include/linux/atomic/atomic-instrumented.h:1978:2: note: expanded from macro 'try_cmpxchg' arch_try_cmpxchg(__ai_ptr, __ai_oldp, __VA_ARGS__); \ ^ arch/x86/include/asm/cmpxchg.h:225:2: note: expanded from macro 'arch_try_cmpxchg' __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr))) ^ arch/x86/include/asm/cmpxchg.h:222:2: note: expanded from macro '__try_cmpxchg' __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX) ^ arch/x86/include/asm/cmpxchg.h:172:23: note: expanded from macro '__raw_try_cmpxchg' [old] "+a" (__old) \ ^ In file included from arch/x86/kernel/asm-offsets.c:13: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:20: In file included from include/linux/mm.h:33: In file included from include/linux/pgtable.h:6: arch/x86/include/asm/pgtable.h:1383:13: error: invalid output size for constraint '+a' include/linux/atomic/atomic-instrumented.h:1978:2: note: expanded from macro 'try_cmpxchg' arch_try_cmpxchg(__ai_ptr, __ai_oldp, __VA_ARGS__); \ ^ arch/x86/include/asm/cmpxchg.h:225:2: note: expanded from macro 'arch_try_cmpxchg' __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr))) ^ arch/x86/include/asm/cmpxchg.h:222:2: note: expanded from macro '__try_cmpxchg' __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX) ^ arch/x86/include/asm/cmpxchg.h:184:23: note: expanded from macro '__raw_try_cmpxchg' [old] "+a" (__old) \ ^ In file included from arch/x86/kernel/asm-offsets.c:13: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:20: In file included from include/linux/mm.h:33: In file included from include/linux/pgtable.h:6: arch/x86/include/asm/pgtable.h:1383:13: error: invalid output size for constraint '+a' include/linux/atomic/atomic-instrumented.h:1978:2: note: expanded from macro 'try_cmpxchg' arch_try_cmpxchg(__ai_ptr, __ai_oldp, __VA_ARGS__); \ ^ arch/x86/include/asm/cmpxchg.h:225:2: note: expanded from macro 'arch_try_cmpxchg' __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr))) ^ arch/x86/include/asm/cmpxchg.h:222:2: note: expanded from macro '__try_cmpxchg' __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX) ^ arch/x86/include/asm/cmpxchg.h:196:23: note: expanded from macro '__raw_try_cmpxchg' [old] "+a" (__old) \ ^ In file included from arch/x86/kernel/asm-offsets.c:13: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:20: In file included from include/linux/mm.h:33: In file included from include/linux/pgtable.h:6: arch/x86/include/asm/pgtable.h:1383:13: error: invalid output size for constraint '+a' include/linux/atomic/atomic-instrumented.h:1978:2: note: expanded from macro 'try_cmpxchg' arch_try_cmpxchg(__ai_ptr, __ai_oldp, __VA_ARGS__); \ ^ arch/x86/include/asm/cmpxchg.h:225:2: note: expanded from macro 'arch_try_cmpxchg' __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr))) ^ arch/x86/include/asm/cmpxchg.h:222:2: note: expanded from macro '__try_cmpxchg' __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX) ^ arch/x86/include/asm/cmpxchg.h:208:23: note: expanded from macro '__raw_try_cmpxchg' [old] "+a" (__old) \ ^ 8 errors generated. make[2]: *** [scripts/Makefile.build:121: arch/x86/kernel/asm-offsets.s] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [Makefile:1191: prepare0] Error 2 make[1]: Target 'prepare' not remade because of errors. make: *** [Makefile:219: __sub-make] Error 2 make: Target 'prepare' not remade because of errors.
vim +1312 arch/x86/include/asm/pgtable.h
1293 1294 #define __HAVE_ARCH_PTEP_SET_WRPROTECT 1295 static inline void ptep_set_wrprotect(struct mm_struct *mm, 1296 unsigned long addr, pte_t *ptep) 1297 { 1298 /* 1299 * If Shadow Stack is enabled, pte_wrprotect() moves _PAGE_DIRTY 1300 * to _PAGE_COW (see comments at pte_wrprotect()). 1301 * When a thread reads a RW=1, Dirty=0 PTE and before changing it 1302 * to RW=0, Dirty=0, another thread could have written to the page 1303 * and the PTE is RW=1, Dirty=1 now. Use try_cmpxchg() to detect 1304 * PTE changes and update old_pte, then try again. 1305 */ 1306 if (cpu_feature_enabled(X86_FEATURE_SHSTK)) { 1307 pte_t old_pte, new_pte; 1308 1309 old_pte = READ_ONCE(*ptep); 1310 do { 1311 new_pte = pte_wrprotect(old_pte); > 1312 } while (!try_cmpxchg(&ptep->pte, &old_pte.pte, new_pte.pte)); 1313 1314 return; 1315 } 1316 clear_bit(_PAGE_BIT_RW, (unsigned long *)&ptep->pte); 1317 } 1318
-- 0-DAY CI Kernel Test Service https://01.org/lkp
| |