All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v10 9/9] fsdax: set a CoW flag when associate reflink mappings
Date: Sat, 29 Jan 2022 05:03:24 +0800	[thread overview]
Message-ID: <202201290206.TU7AHhWg-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 15118 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220127124058.1172422-10-ruansy.fnst@fujitsu.com>
References: <20220127124058.1172422-10-ruansy.fnst@fujitsu.com>
TO: Shiyang Ruan <ruansy.fnst@fujitsu.com>
TO: linux-kernel(a)vger.kernel.org
TO: linux-xfs(a)vger.kernel.org
TO: nvdimm(a)lists.linux.dev
TO: linux-mm(a)kvack.org
TO: linux-fsdevel(a)vger.kernel.org
CC: djwong(a)kernel.org
CC: dan.j.williams(a)intel.com
CC: david(a)fromorbit.com
CC: hch(a)infradead.org
CC: jane.chu(a)oracle.com

Hi Shiyang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.17-rc1]
[cannot apply to xfs-linux/for-next hnaz-mm/master next-20220128]
[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/Shiyang-Ruan/fsdax-introduce-fs-query-to-support-reflink/20220127-204239
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2c271fe77d52a0555161926c232cd5bc07178b39
:::::: branch date: 30 hours ago
:::::: commit date: 30 hours ago
config: x86_64-randconfig-c007-20220124 (https://download.01.org/0day-ci/archive/20220129/202201290206.TU7AHhWg-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f32dccb9a43b02ce4e540d6ba5dbbdb188f2dc7d)
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://github.com/0day-ci/linux/commit/26822296a70d211de3c5f4ef903d4c4cf29179bd
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Shiyang-Ruan/fsdax-introduce-fs-query-to-support-reflink/20220127-204239
        git checkout 26822296a70d211de3c5f4ef903d4c4cf29179bd
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
                           *op++ = (u8) u;
                           ~~~~~~^~~~~~~~
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 with check filters).
   2 warnings generated.
   arch/x86/kernel/cpu/intel.c:925:4: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
                           intel_tlb_lookup(desc[j]);
                           ^                ~~~~~~~
   arch/x86/kernel/cpu/intel.c:909:6: note: Assuming field 'cpuid_level' is >= 2
           if (c->cpuid_level < 2)
               ^~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/intel.c:909:2: note: Taking false branch
           if (c->cpuid_level < 2)
           ^
   arch/x86/kernel/cpu/intel.c:915:15: note: Assuming 'i' is < 'n'
           for (i = 0 ; i < n ; i++) {
                        ^~~~~
   arch/x86/kernel/cpu/intel.c:915:2: note: Loop condition is true.  Entering loop body
           for (i = 0 ; i < n ; i++) {
           ^
   arch/x86/kernel/cpu/intel.c:916:3: note: Calling 'cpuid'
                   cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/processor.h:604:2: note: Calling 'native_cpuid'
           __cpuid(eax, ebx, ecx, edx);
           ^
   arch/x86/include/asm/processor.h:579:19: note: expanded from macro '__cpuid'
   #define __cpuid                 native_cpuid
                                   ^
   arch/x86/include/asm/processor.h:604:2: note: Returning from 'native_cpuid'
           __cpuid(eax, ebx, ecx, edx);
           ^
   arch/x86/include/asm/processor.h:579:19: note: expanded from macro '__cpuid'
   #define __cpuid                 native_cpuid
                                   ^
   arch/x86/kernel/cpu/intel.c:916:3: note: Returning from 'cpuid'
                   cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is true.  Entering loop body
                   for (j = 0 ; j < 3 ; j++)
                   ^
   arch/x86/kernel/cpu/intel.c:920:8: note: Assuming the condition is false
                           if (regs[j] & (1 << 31))
                               ^~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/intel.c:920:4: note: Taking false branch
                           if (regs[j] & (1 << 31))
                           ^
   arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is true.  Entering loop body
                   for (j = 0 ; j < 3 ; j++)
                   ^
   arch/x86/kernel/cpu/intel.c:920:8: note: Assuming the condition is false
                           if (regs[j] & (1 << 31))
                               ^~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/intel.c:920:4: note: Taking false branch
                           if (regs[j] & (1 << 31))
                           ^
   arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is true.  Entering loop body
                   for (j = 0 ; j < 3 ; j++)
                   ^
   arch/x86/kernel/cpu/intel.c:920:8: note: Assuming the condition is false
                           if (regs[j] & (1 << 31))
                               ^~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/intel.c:920:4: note: Taking false branch
                           if (regs[j] & (1 << 31))
                           ^
   arch/x86/kernel/cpu/intel.c:919:3: note: Loop condition is false. Execution continues on line 924
                   for (j = 0 ; j < 3 ; j++)
                   ^
   arch/x86/kernel/cpu/intel.c:924:8: note: The value 1 is assigned to 'j'
                   for (j = 1 ; j < 16 ; j++)
                        ^~~~~
   arch/x86/kernel/cpu/intel.c:924:3: note: Loop condition is true.  Entering loop body
                   for (j = 1 ; j < 16 ; j++)
                   ^
   arch/x86/kernel/cpu/intel.c:925:4: note: 1st function call argument is an uninitialized value
                           intel_tlb_lookup(desc[j]);
                           ^                ~~~~~~~
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
>> fs/dax.c:339:2: warning: Value stored to 'mapping' is never read [clang-analyzer-deadcode.DeadStores]
           mapping = (struct address_space *)PAGE_MAPPING_DAX_COW;
           ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/dax.c:339:2: note: Value stored to 'mapping' is never read
           mapping = (struct address_space *)PAGE_MAPPING_DAX_COW;
           ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/dax.c:1813:25: warning: The result of the left shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult]
           size_t len = PAGE_SIZE << order;
                                  ^  ~~~~~
   fs/dax.c:1812:23: note: Calling 'pe_order'
           unsigned int order = pe_order(pe_size);
                                ^~~~~~~~~~~~~~~~~
   fs/dax.c:35:6: note: Assuming 'pe_size' is not equal to PE_SIZE_PTE
           if (pe_size == PE_SIZE_PTE)
               ^~~~~~~~~~~~~~~~~~~~~~
   fs/dax.c:35:2: note: Taking false branch
           if (pe_size == PE_SIZE_PTE)
           ^
   fs/dax.c:37:6: note: Assuming 'pe_size' is not equal to PE_SIZE_PMD
           if (pe_size == PE_SIZE_PMD)
               ^~~~~~~~~~~~~~~~~~~~~~
   fs/dax.c:37:2: note: Taking false branch
           if (pe_size == PE_SIZE_PMD)
           ^
   fs/dax.c:39:6: note: Assuming 'pe_size' is not equal to PE_SIZE_PUD
           if (pe_size == PE_SIZE_PUD)
               ^~~~~~~~~~~~~~~~~~~~~~
   fs/dax.c:39:2: note: Taking false branch
           if (pe_size == PE_SIZE_PUD)
           ^
   fs/dax.c:41:2: note: Returning the value 4294967295
           return ~0;
           ^~~~~~~~~
   fs/dax.c:1812:23: note: Returning from 'pe_order'
           unsigned int order = pe_order(pe_size);
                                ^~~~~~~~~~~~~~~~~
   fs/dax.c:1812:2: note: 'order' initialized to 4294967295
           unsigned int order = pe_order(pe_size);
           ^~~~~~~~~~~~~~~~~~
   fs/dax.c:1813:25: note: The result of the left shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'unsigned long'
           size_t len = PAGE_SIZE << order;
                                  ^  ~~~~~
   Suppressed 2 warnings (1 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   fs/crypto/fname.c:209:18: warning: The right operand of '|' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
                   ac = (ac << 8) | src[i];
                                  ^
   fs/crypto/fname.c:346:2: note: Taking false branch
           if (fscrypt_is_dot_dotdot(&qname)) {
           ^
   fs/crypto/fname.c:353:6: note: Assuming field 'len' is >= FS_CRYPTO_BLOCK_SIZE
           if (iname->len < FS_CRYPTO_BLOCK_SIZE)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/crypto/fname.c:353:2: note: Taking false branch
           if (iname->len < FS_CRYPTO_BLOCK_SIZE)
           ^
   fs/crypto/fname.c:356:2: note: Taking false branch
           if (fscrypt_has_encryption_key(inode))
           ^
   fs/crypto/fname.c:363:2: note: Taking false branch
           BUILD_BUG_ON(offsetofend(struct fscrypt_nokey_name, dirhash) !=
           ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
           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'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ^
   include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ^
   include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:326:3: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                   ^
   fs/crypto/fname.c:363:2: note: Loop condition is false.  Exiting loop
           BUILD_BUG_ON(offsetofend(struct fscrypt_nokey_name, dirhash) !=
           ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
           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'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ^
   include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ^
   include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:318:2: note: expanded from macro '__compiletime_assert'
           do {                                                            \
           ^
   fs/crypto/fname.c:365:2: note: Taking false branch
           BUILD_BUG_ON(offsetofend(struct fscrypt_nokey_name, bytes) !=

vim +/mapping +339 fs/dax.c

d2c997c0f14535 Dan Williams   2017-12-22  328  
d2c997c0f14535 Dan Williams   2017-12-22  329  /*
d2c997c0f14535 Dan Williams   2017-12-22  330   * Iterate through all mapped pfns represented by an entry, i.e. skip
d2c997c0f14535 Dan Williams   2017-12-22  331   * 'empty' and 'zero' entries.
d2c997c0f14535 Dan Williams   2017-12-22  332   */
d2c997c0f14535 Dan Williams   2017-12-22  333  #define for_each_mapped_pfn(entry, pfn) \
a77d19f46a37c0 Matthew Wilcox 2018-03-27  334  	for (pfn = dax_to_pfn(entry); \
a77d19f46a37c0 Matthew Wilcox 2018-03-27  335  			pfn < dax_end_pfn(entry); pfn++)
d2c997c0f14535 Dan Williams   2017-12-22  336  
26822296a70d21 Shiyang Ruan   2022-01-27  337  static inline void dax_mapping_set_cow_flag(struct address_space *mapping)
26822296a70d21 Shiyang Ruan   2022-01-27  338  {
26822296a70d21 Shiyang Ruan   2022-01-27 @339  	mapping = (struct address_space *)PAGE_MAPPING_DAX_COW;
26822296a70d21 Shiyang Ruan   2022-01-27  340  }
26822296a70d21 Shiyang Ruan   2022-01-27  341  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

             reply	other threads:[~2022-01-28 21:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 21:03 kernel test robot [this message]
2022-01-30  3:32 ` [PATCH v10 9/9] fsdax: set a CoW flag when associate reflink mappings kernel test robot
2022-01-30  3:32   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-01-27 12:40 [PATCH v10 0/9] fsdax: introduce fs query to support reflink Shiyang Ruan
2022-01-27 12:40 ` [PATCH v10 9/9] fsdax: set a CoW flag when associate reflink mappings Shiyang Ruan
2022-02-16  2:09   ` Dan Williams
2022-02-16  2:55     ` Shiyang Ruan
2022-02-16  3:09       ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202201290206.TU7AHhWg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.