From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: include/linux/userfaultfd_k.h:221 vma_can_userfault() warn: bitwise AND condition is false here
Date: Sat, 5 Apr 2025 16:36:50 +0800 [thread overview]
Message-ID: <202504051652.tDFckPp0-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Jason A. Donenfeld" <zx2c4@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a8662bcd2ff152bfbc751cab20f33053d74d0963
commit: 9651fcedf7b92d3f7f1ab179e8ab55b85ee10fc1 mm: add MAP_DROPPABLE for designating always lazily freeable mappings
date: 9 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 9 months ago
config: i386-randconfig-r072-20250405 (https://download.01.org/0day-ci/archive/20250405/202504051652.tDFckPp0-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
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 <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202504051652.tDFckPp0-lkp@intel.com/
smatch warnings:
include/linux/userfaultfd_k.h:221 vma_can_userfault() warn: bitwise AND condition is false here
vim +221 include/linux/userfaultfd_k.h
932b18e0aec65a Andrea Arcangeli 2015-09-04 214
b1f9e876862d8f Peter Xu 2022-05-12 215 static inline bool vma_can_userfault(struct vm_area_struct *vma,
d61ea1cb009532 Peter Xu 2023-08-21 216 unsigned long vm_flags,
d61ea1cb009532 Peter Xu 2023-08-21 217 bool wp_async)
b1f9e876862d8f Peter Xu 2022-05-12 218 {
d61ea1cb009532 Peter Xu 2023-08-21 219 vm_flags &= __VM_UFFD_FLAGS;
d61ea1cb009532 Peter Xu 2023-08-21 220
9651fcedf7b92d Jason A. Donenfeld 2022-12-08 @221 if (vm_flags & VM_DROPPABLE)
9651fcedf7b92d Jason A. Donenfeld 2022-12-08 222 return false;
9651fcedf7b92d Jason A. Donenfeld 2022-12-08 223
67eae54bc227b3 Peter Xu 2022-10-24 224 if ((vm_flags & VM_UFFD_MINOR) &&
67eae54bc227b3 Peter Xu 2022-10-24 225 (!is_vm_hugetlb_page(vma) && !vma_is_shmem(vma)))
67eae54bc227b3 Peter Xu 2022-10-24 226 return false;
d61ea1cb009532 Peter Xu 2023-08-21 227
d61ea1cb009532 Peter Xu 2023-08-21 228 /*
d61ea1cb009532 Peter Xu 2023-08-21 229 * If wp async enabled, and WP is the only mode enabled, allow any
d61ea1cb009532 Peter Xu 2023-08-21 230 * memory type.
d61ea1cb009532 Peter Xu 2023-08-21 231 */
d61ea1cb009532 Peter Xu 2023-08-21 232 if (wp_async && (vm_flags == VM_UFFD_WP))
d61ea1cb009532 Peter Xu 2023-08-21 233 return true;
d61ea1cb009532 Peter Xu 2023-08-21 234
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-04-05 8:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202504051652.tDFckPp0-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.