Content-Type: multipart/mixed; boundary="===============0642170399045811300==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 13/43] kmsan: add KMSAN runtime core Date: Wed, 15 Dec 2021 06:23:02 +0800 Message-ID: <202112150609.r62ffy1Q-lkp@intel.com> In-Reply-To: <20211214162050.660953-14-glider@google.com> List-Id: --===============0642170399045811300== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Alexander, I love your patch! Yet something to improve: [auto build test ERROR on tip/x86/mm] [also build test ERROR on linus/master v5.16-rc5] [cannot apply to tip/x86/core hnaz-mm/master next-20211213] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Alexander-Potapenko/Add-Ke= rnelMemorySanitizer-infrastructure/20211215-003033 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 35fa745= 286ac44ee26ed100c2bd2553368ad193b config: arm64-randconfig-r024-20211214 (https://download.01.org/0day-ci/arc= hive/20211215/202112150609.r62ffy1Q-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2dd= b6c8ac29412b1361810972e15221fa021c) reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/0day-ci/linux/commit/ddf3096bf6806b512d7bf5489= f2100b46add643a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Alexander-Potapenko/Add-KernelMemo= rySanitizer-infrastructure/20211215-003033 git checkout ddf3096bf6806b512d7bf5489f2100b46add643a # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Darm64 prepare If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from arch/arm64/kernel/asm-offsets.c:10: In file included from include/linux/arm_sdei.h:8: In file included from include/acpi/ghes.h:5: In file included from include/acpi/apei.h:9: In file included from include/linux/acpi.h:15: In file included from include/linux/device.h:15: In file included from include/linux/dev_printk.h:16: In file included from include/linux/ratelimit.h:6: In file included from include/linux/sched.h:17: In file included from include/linux/kmsan.h:17: In file included from include/linux/vmalloc.h:13: In file included from arch/arm64/include/asm/vmalloc.h:5: >> arch/arm64/include/asm/pgtable.h:299:19: error: incomplete definition of= type 'struct task_struct' if (mm !=3D current->active_mm && atomic_read(&mm->mm_users) <= =3D 1) ~~~~~~~^ arch/arm64/include/asm/current.h:9:8: note: forward declaration of 'stru= ct task_struct' struct task_struct; ^ 1 error generated. make[2]: *** [scripts/Makefile.build:121: arch/arm64/kernel/asm-offsets.= s] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [Makefile:1198: 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 +299 arch/arm64/include/asm/pgtable.h 4f04d8f0054511 Catalin Marinas 2012-03-05 270 = 2f4b829c625ec3 Catalin Marinas 2015-07-10 271 /* 2f4b829c625ec3 Catalin Marinas 2015-07-10 272 * PTE bits configuration i= n the presence of hardware Dirty Bit Management 2f4b829c625ec3 Catalin Marinas 2015-07-10 273 * (PTE_WRITE =3D=3D PTE_DB= M): 2f4b829c625ec3 Catalin Marinas 2015-07-10 274 * 2f4b829c625ec3 Catalin Marinas 2015-07-10 275 * Dirty Writable | PTE_RD= ONLY PTE_WRITE PTE_DIRTY (sw) 2f4b829c625ec3 Catalin Marinas 2015-07-10 276 * 0 0 | 1 = 0 0 2f4b829c625ec3 Catalin Marinas 2015-07-10 277 * 0 1 | 1 = 1 0 2f4b829c625ec3 Catalin Marinas 2015-07-10 278 * 1 0 | 1 = 0 1 2f4b829c625ec3 Catalin Marinas 2015-07-10 279 * 1 1 | 0 = 1 x 2f4b829c625ec3 Catalin Marinas 2015-07-10 280 * 2f4b829c625ec3 Catalin Marinas 2015-07-10 281 * When hardware DBM is not= present, the sofware PTE_DIRTY bit is updated via 2f4b829c625ec3 Catalin Marinas 2015-07-10 282 * the page fault mechanism= . Checking the dirty status of a pte becomes: 2f4b829c625ec3 Catalin Marinas 2015-07-10 283 * b847415ce96efe Catalin Marinas 2015-09-11 284 * PTE_DIRTY || (PTE_WRIT= E && !PTE_RDONLY) 2f4b829c625ec3 Catalin Marinas 2015-07-10 285 */ 9b604722059039 Mark Rutland 2019-06-10 286 = 9b604722059039 Mark Rutland 2019-06-10 287 static inline void __check_= racy_pte_update(struct mm_struct *mm, pte_t *ptep, 9b604722059039 Mark Rutland 2019-06-10 288 pte_t pte) 4f04d8f0054511 Catalin Marinas 2012-03-05 289 { 20a004e7b017cc Will Deacon 2018-02-15 290 pte_t old_pte; 20a004e7b017cc Will Deacon 2018-02-15 291 = 9b604722059039 Mark Rutland 2019-06-10 292 if (!IS_ENABLED(CONFIG_DEB= UG_VM)) 9b604722059039 Mark Rutland 2019-06-10 293 return; 9b604722059039 Mark Rutland 2019-06-10 294 = 9b604722059039 Mark Rutland 2019-06-10 295 old_pte =3D READ_ONCE(*pte= p); 9b604722059039 Mark Rutland 2019-06-10 296 = 9b604722059039 Mark Rutland 2019-06-10 297 if (!pte_valid(old_pte) ||= !pte_valid(pte)) 9b604722059039 Mark Rutland 2019-06-10 298 return; 9b604722059039 Mark Rutland 2019-06-10 @299 if (mm !=3D current->activ= e_mm && atomic_read(&mm->mm_users) <=3D 1) 9b604722059039 Mark Rutland 2019-06-10 300 return; 02522463c84748 Will Deacon 2013-01-09 301 = 2f4b829c625ec3 Catalin Marinas 2015-07-10 302 /* 9b604722059039 Mark Rutland 2019-06-10 303 * Check for potential rac= e with hardware updates of the pte 9b604722059039 Mark Rutland 2019-06-10 304 * (ptep_set_access_flags = safely changes valid ptes without going 9b604722059039 Mark Rutland 2019-06-10 305 * through an invalid entr= y). 2f4b829c625ec3 Catalin Marinas 2015-07-10 306 */ 82d340081b6f71 Catalin Marinas 2015-12-08 307 VM_WARN_ONCE(!pte_young(pt= e), 82d340081b6f71 Catalin Marinas 2015-12-08 308 "%s: racy access fla= g clearing: 0x%016llx -> 0x%016llx", 20a004e7b017cc Will Deacon 2018-02-15 309 __func__, pte_val(ol= d_pte), pte_val(pte)); 20a004e7b017cc Will Deacon 2018-02-15 310 VM_WARN_ONCE(pte_write(old= _pte) && !pte_dirty(pte), 82d340081b6f71 Catalin Marinas 2015-12-08 311 "%s: racy dirty stat= e clearing: 0x%016llx -> 0x%016llx", 20a004e7b017cc Will Deacon 2018-02-15 312 __func__, pte_val(ol= d_pte), pte_val(pte)); 2f4b829c625ec3 Catalin Marinas 2015-07-10 313 } 2f4b829c625ec3 Catalin Marinas 2015-07-10 314 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============0642170399045811300==--