From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06AFDEE14C3 for ; Sun, 10 Sep 2023 00:32:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F07B6B00F3; Sat, 9 Sep 2023 20:32:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A09E6B0122; Sat, 9 Sep 2023 20:32:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EAA416B0123; Sat, 9 Sep 2023 20:32:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id DE6016B00F3 for ; Sat, 9 Sep 2023 20:32:10 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id A9B121CA1BD for ; Sun, 10 Sep 2023 00:32:10 +0000 (UTC) X-FDA: 81218810820.11.F9C52D8 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by imf05.hostedemail.com (Postfix) with ESMTP id DDFB510000C for ; Sun, 10 Sep 2023 00:32:07 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=UJswxeIW; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf05.hostedemail.com: domain of lkp@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694305928; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WVMHJtdSnzene9Leu6JXJVHJ9+YuPoIq3bYcuTT+HVs=; b=c5LCNdjPqJptgrz4Na/eUD2tXLznZ1TmZ3g3xBhN8vi86l3YUPW9yxPAm22Qgn/D20K0tS vqYy90ERGfhlGYRe5ppfLIyUXJcWsQLrikRfd/1BZJRBFtHJS9jBxFgHu4BjgMSlP4N4C5 zr7J1v1HFDdDKRJd5a6XTK8j/58MC+k= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=UJswxeIW; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf05.hostedemail.com: domain of lkp@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694305928; a=rsa-sha256; cv=none; b=dCxcHhbMcit9i/ctTvBBxBzq6tZuBIDr6rcQ4WXAWoUjoc71A9t4PCRDooPN28DW2cHVFG PNxho9Fz0ndu+zu0hj5tqyrj/YIzNuEbH4CYjZp4NKknypHOWaIQDBM+ZoT2r0RO4vOkcF Jf3i0jj+bDTL9SC94tfeTJa5zT1zZUk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694305927; x=1725841927; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ogKDOjx2dSxZbUXxCQ9VmGzjND6gVaC8vCUMG/dlN7o=; b=UJswxeIWiKn92Bf/oUCIXaUIQ6tDFdJd3/TP9rlKbFaRUfinXDeW89Yy E/bk80JZoIE82XVmW7xfAgEIeYe8h/CcOfc7AwrjVDEd3OJPp+I1+WPMb Jex3pOnzjyjcONcBpznYikjjN1Jt7RpTs6Vm6yfzj5QFdamh8HsIMJ6yX JbVeIy5bBMnwqMDYkJftlUDUnJkYISoEvtTFc5cHxmftk9FkEEJKTnHc4 OADBdPkIeg8ZwJp5ZPg0QQ1LCjTHdAnU1sX7ST0vOVIw/BbADZL/KpOSJ 9OdXE2yG7v7gMrRFv5VwlyNMT8CibA2VSNCYUz6F87U4LrFZ7qaPfnB7d A==; X-IronPort-AV: E=McAfee;i="6600,9927,10827"; a="368119146" X-IronPort-AV: E=Sophos;i="6.02,240,1688454000"; d="scan'208";a="368119146" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2023 17:32:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10827"; a="916583516" X-IronPort-AV: E=Sophos;i="6.02,240,1688454000"; d="scan'208";a="916583516" Received: from lkp-server01.sh.intel.com (HELO 59b3c6e06877) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 09 Sep 2023 17:32:03 -0700 Received: from kbuild by 59b3c6e06877 with local (Exim 4.96) (envelope-from ) id 1qf8Mr-000464-0J; Sun, 10 Sep 2023 00:32:01 +0000 Date: Sun, 10 Sep 2023 08:31:44 +0800 From: kernel test robot To: Alexander Potapenko , dvyukov@google.com, elver@google.com, akpm@linux-foundation.org, linux-mm@kvack.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com Subject: Re: [PATCH 2/2] kmsan: prevent optimizations in memcpy tests Message-ID: <202309100805.cRHktAYd-lkp@intel.com> References: <20230907130642.245222-2-glider@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230907130642.245222-2-glider@google.com> X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: DDFB510000C X-Stat-Signature: eapcxqrtywng9m8xgd7qqaukd65atxdq X-Rspam-User: X-HE-Tag: 1694305927-745930 X-HE-Meta: U2FsdGVkX19sBUSIufAPqh90Pix0PXQ1nKNJ1j6txck1l/DGPVv4Cc5JYbdJVBHXEvHipmVNXGKUR6HJzWhEbpF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4mIjn0V2WkfYNXMxGzPpYxhShO0+TVqWfcHIPiXz1qM9rDac8iX7rGupVWA0u+1BV7Vq0toNuvOx2LC8f20sihxtCztWgR3J6bKxo6Oi3MWkrDP0VcevnUBK1RiXgXctK83vGmp7FbD5OeK/9ycPXwTzpfeFE+pjFX+fZGIbVIXETO/gaI8XoAnIPvz/eqnXe31yLT4nd0xh7O3uZ0NtiFKGXeyCY= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Alexander, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on linus/master v6.5 next-20230908] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Alexander-Potapenko/kmsan-prevent-optimizations-in-memcpy-tests/20230907-210817 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20230907130642.245222-2-glider%40google.com patch subject: [PATCH 2/2] kmsan: prevent optimizations in memcpy tests config: x86_64-buildonly-randconfig-006-20230910 (https://download.01.org/0day-ci/archive/20230910/202309100805.cRHktAYd-lkp@intel.com/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230910/202309100805.cRHktAYd-lkp@intel.com/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 | Closes: https://lore.kernel.org/oe-kbuild-all/202309100805.cRHktAYd-lkp@intel.com/ All errors (new ones prefixed by >>): >> mm/kmsan/kmsan_test.c:414:16: error: passing 'volatile void *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] return memcpy(dst, src, size); ^~~ arch/x86/include/asm/string_64.h:18:27: note: passing argument to parameter 'to' here extern void *memcpy(void *to, const void *from, size_t len); ^ >> mm/kmsan/kmsan_test.c:414:21: error: passing 'const volatile void *' to parameter of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] return memcpy(dst, src, size); ^~~ arch/x86/include/asm/string_64.h:18:43: note: passing argument to parameter 'from' here extern void *memcpy(void *to, const void *from, size_t len); ^ >> mm/kmsan/kmsan_test.c:468:21: error: passing 'volatile int *' to parameter of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] kmsan_check_memory(&uninit_src, sizeof(uninit_src)); ^~~~~~~~~~~ include/linux/kmsan-checks.h:47:37: note: passing argument to parameter 'address' here void kmsan_check_memory(const void *address, size_t size); ^ 3 errors generated. vim +414 mm/kmsan/kmsan_test.c 409 410 /* Prevent the compiler from inlining a memcpy() call. */ 411 static noinline void *memcpy_noinline(volatile void *dst, 412 const volatile void *src, size_t size) 413 { > 414 return memcpy(dst, src, size); 415 } 416 417 /* Test case: ensure that memcpy() correctly copies initialized values. */ 418 static void test_init_memcpy(struct kunit *test) 419 { 420 EXPECTATION_NO_REPORT(expect); 421 volatile int src; 422 volatile int dst = 0; 423 424 src = 1; 425 kunit_info( 426 test, 427 "memcpy()ing aligned initialized src to aligned dst (no reports)\n"); 428 memcpy_noinline((void *)&dst, (void *)&src, sizeof(src)); 429 kmsan_check_memory((void *)&dst, sizeof(dst)); 430 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); 431 } 432 433 /* 434 * Test case: ensure that memcpy() correctly copies uninitialized values between 435 * aligned `src` and `dst`. 436 */ 437 static void test_memcpy_aligned_to_aligned(struct kunit *test) 438 { 439 EXPECTATION_UNINIT_VALUE_FN(expect, "test_memcpy_aligned_to_aligned"); 440 volatile int uninit_src; 441 volatile int dst = 0; 442 443 kunit_info( 444 test, 445 "memcpy()ing aligned uninit src to aligned dst (UMR report)\n"); 446 memcpy_noinline((void *)&dst, (void *)&uninit_src, sizeof(uninit_src)); 447 kmsan_check_memory((void *)&dst, sizeof(dst)); 448 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); 449 } 450 451 /* 452 * Test case: ensure that memcpy() correctly copies uninitialized values between 453 * aligned `src` and unaligned `dst`. 454 * 455 * Copying aligned 4-byte value to an unaligned one leads to touching two 456 * aligned 4-byte values. This test case checks that KMSAN correctly reports an 457 * error on the first of the two values. 458 */ 459 static void test_memcpy_aligned_to_unaligned(struct kunit *test) 460 { 461 EXPECTATION_UNINIT_VALUE_FN(expect, "test_memcpy_aligned_to_unaligned"); 462 volatile int uninit_src; 463 volatile char dst[8] = { 0 }; 464 465 kunit_info( 466 test, 467 "memcpy()ing aligned uninit src to unaligned dst (UMR report)\n"); > 468 kmsan_check_memory(&uninit_src, sizeof(uninit_src)); 469 memcpy_noinline((void *)&dst[1], (void *)&uninit_src, 470 sizeof(uninit_src)); 471 kmsan_check_memory((void *)dst, 4); 472 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); 473 } 474 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki