* [kas:uffd/v2 7/14] include/linux/mm.h:4618 gup_can_follow_protnone() warn: bitwise AND condition is false here
@ 2026-05-09 17:47 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-09 17:47 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: "Kiryl Shutsemau (Meta)" <kas@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git uffd/v2
head: 0b6f87fd4809245f9eebee73f34e2fb14230330c
commit: c88e78ffb2cc5ca81f5a6319b7e3c4ffd8baefe1 [7/14] mm: handle VM_UFFD_RWP in khugepaged, rmap, and GUP
:::::: branch date: 26 hours ago
:::::: commit date: 26 hours ago
config: m68k-randconfig-r073-20260509 (https://download.01.org/0day-ci/archive/20260510/202605100132.U77SlLEg-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.5.0
smatch: v0.5.0-9065-ge9cc34fd
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/202605100132.U77SlLEg-lkp@intel.com/
smatch warnings:
include/linux/mm.h:4618 gup_can_follow_protnone() warn: bitwise AND condition is false here
vim +4618 include/linux/mm.h
9a291a7c9428155 James Morse 2017-06-02 4605
474098edac262ae David Hildenbrand 2022-08-25 4606 /*
474098edac262ae David Hildenbrand 2022-08-25 4607 * Indicates whether GUP can follow a PROT_NONE mapped page, or whether
c88e78ffb2cc5ca Kiryl Shutsemau (Meta 2026-04-22 4608) * a (NUMA hinting or userfaultfd RWP) fault is required.
474098edac262ae David Hildenbrand 2022-08-25 4609 */
da0045587d59d4f Max Kellermann 2025-09-01 4610 static inline bool gup_can_follow_protnone(const struct vm_area_struct *vma,
d74943a2f3cdade David Hildenbrand 2023-08-03 4611 unsigned int flags)
474098edac262ae David Hildenbrand 2022-08-25 4612 {
c88e78ffb2cc5ca Kiryl Shutsemau (Meta 2026-04-22 4613) /*
c88e78ffb2cc5ca Kiryl Shutsemau (Meta 2026-04-22 4614) * VM_UFFD_RWP uses protnone as an access-tracking marker, not for
c88e78ffb2cc5ca Kiryl Shutsemau (Meta 2026-04-22 4615) * NUMA hinting. GUP must always take a fault so the access is
c88e78ffb2cc5ca Kiryl Shutsemau (Meta 2026-04-22 4616) * delivered to userfaultfd, regardless of FOLL_HONOR_NUMA_FAULT.
c88e78ffb2cc5ca Kiryl Shutsemau (Meta 2026-04-22 4617) */
c88e78ffb2cc5ca Kiryl Shutsemau (Meta 2026-04-22 @4618) if (vma->vm_flags & VM_UFFD_RWP)
c88e78ffb2cc5ca Kiryl Shutsemau (Meta 2026-04-22 4619) return false;
c88e78ffb2cc5ca Kiryl Shutsemau (Meta 2026-04-22 4620)
474098edac262ae David Hildenbrand 2022-08-25 4621 /*
d74943a2f3cdade David Hildenbrand 2023-08-03 4622 * If callers don't want to honor NUMA hinting faults, no need to
d74943a2f3cdade David Hildenbrand 2023-08-03 4623 * determine if we would actually have to trigger a NUMA hinting fault.
474098edac262ae David Hildenbrand 2022-08-25 4624 */
d74943a2f3cdade David Hildenbrand 2023-08-03 4625 if (!(flags & FOLL_HONOR_NUMA_FAULT))
d74943a2f3cdade David Hildenbrand 2023-08-03 4626 return true;
d74943a2f3cdade David Hildenbrand 2023-08-03 4627
d74943a2f3cdade David Hildenbrand 2023-08-03 4628 /*
d74943a2f3cdade David Hildenbrand 2023-08-03 4629 * NUMA hinting faults don't apply in inaccessible (PROT_NONE) VMAs.
d74943a2f3cdade David Hildenbrand 2023-08-03 4630 *
d74943a2f3cdade David Hildenbrand 2023-08-03 4631 * Requiring a fault here even for inaccessible VMAs would mean that
d74943a2f3cdade David Hildenbrand 2023-08-03 4632 * FOLL_FORCE cannot make any progress, because handle_mm_fault()
d74943a2f3cdade David Hildenbrand 2023-08-03 4633 * refuses to process NUMA hinting faults in inaccessible VMAs.
d74943a2f3cdade David Hildenbrand 2023-08-03 4634 */
d74943a2f3cdade David Hildenbrand 2023-08-03 4635 return !vma_is_accessible(vma);
474098edac262ae David Hildenbrand 2022-08-25 4636 }
474098edac262ae David Hildenbrand 2022-08-25 4637
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-09 17:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09 17:47 [kas:uffd/v2 7/14] include/linux/mm.h:4618 gup_can_follow_protnone() warn: bitwise AND condition is false here kernel test robot
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.