Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [davidhildenbrand:device_private 11/12] mm/memory.c:730:2: error: use of undeclared identifier 'entry'
@ 2025-01-25  7:49 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-25  7:49 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/davidhildenbrand/linux device_private
head:   1693aa537b530ade1b82a54169a772386b4b7af7
commit: 838bd156d6fb55c5fd169934f349829386bc28d7 [11/12] mm/memory: detect writability in restore_exclusive_pte() through can_change_pte_writable()
config: arm-randconfig-004-20250125 (https://download.01.org/0day-ci/archive/20250125/202501251554.1DXJI1g3-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 19306351a2c45e266fa11b41eb1362b20b6ca56d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250125/202501251554.1DXJI1g3-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501251554.1DXJI1g3-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from mm/memory.c:44:
   include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      47 |         __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
         |                                    ~~~~~~~~~~~ ^ ~~~
   include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      49 |                                 NR_ZONE_LRU_BASE + lru, nr_pages);
         |                                 ~~~~~~~~~~~~~~~~ ^ ~~~
>> mm/memory.c:730:2: error: use of undeclared identifier 'entry'
     730 |         entry = pte_to_swp_entry(orig_pte);
         |         ^
>> mm/memory.c:737:25: error: too few arguments to function call, expected 2, have 1
     737 |                         pte = pte_mkwrite(pte);
         |                               ~~~~~~~~~~~    ^
   include/linux/pgtable.h:839:21: note: 'pte_mkwrite' declared here
     839 | static inline pte_t pte_mkwrite(pte_t pte, struct vm_area_struct *vma)
         |                     ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 warnings and 2 errors generated.


vim +/entry +730 mm/memory.c

28093f9f34cede Gerald Schaefer   2016-04-28  717  
b756a3b5e7ead8 Alistair Popple   2021-06-30  718  static void restore_exclusive_pte(struct vm_area_struct *vma,
f7fd4c350285c7 David Hildenbrand 2025-01-22  719  		struct folio *folio, struct page *page, unsigned long address,
f7fd4c350285c7 David Hildenbrand 2025-01-22  720  		pte_t *ptep, pte_t orig_pte)
b756a3b5e7ead8 Alistair Popple   2021-06-30  721  {
b756a3b5e7ead8 Alistair Popple   2021-06-30  722  	pte_t pte;
b756a3b5e7ead8 Alistair Popple   2021-06-30  723  
f7fd4c350285c7 David Hildenbrand 2025-01-22  724  	VM_WARN_ON_FOLIO(!folio_test_locked(folio), folio);
f7fd4c350285c7 David Hildenbrand 2025-01-22  725  
b756a3b5e7ead8 Alistair Popple   2021-06-30  726  	pte = pte_mkold(mk_pte(page, READ_ONCE(vma->vm_page_prot)));
c33c794828f212 Ryan Roberts      2023-06-12  727  	if (pte_swp_soft_dirty(orig_pte))
b756a3b5e7ead8 Alistair Popple   2021-06-30  728  		pte = pte_mksoft_dirty(pte);
b756a3b5e7ead8 Alistair Popple   2021-06-30  729  
c33c794828f212 Ryan Roberts      2023-06-12 @730  	entry = pte_to_swp_entry(orig_pte);
c33c794828f212 Ryan Roberts      2023-06-12  731  	if (pte_swp_uffd_wp(orig_pte))
b756a3b5e7ead8 Alistair Popple   2021-06-30  732  		pte = pte_mkuffd_wp(pte);
838bd156d6fb55 David Hildenbrand 2025-01-24  733  
838bd156d6fb55 David Hildenbrand 2025-01-24  734  	if ((vma->vm_flags & VM_WRITE) &&
838bd156d6fb55 David Hildenbrand 2025-01-24  735  	    can_change_pte_writable(vma, address, pte)) {
838bd156d6fb55 David Hildenbrand 2025-01-24  736  		if (folio_test_dirty(folio))
838bd156d6fb55 David Hildenbrand 2025-01-24 @737  			pte = pte_mkwrite(pte);
838bd156d6fb55 David Hildenbrand 2025-01-24  738  		pte = pte_mkwrite(pte, vma);
838bd156d6fb55 David Hildenbrand 2025-01-24  739  	}
b756a3b5e7ead8 Alistair Popple   2021-06-30  740  
b832a354d787bf David Hildenbrand 2023-12-20  741  	VM_BUG_ON_FOLIO(pte_write(pte) && (!folio_test_anon(folio) &&
b832a354d787bf David Hildenbrand 2023-12-20  742  					   PageAnonExclusive(page)), folio);
1eba86c096e35e Pasha Tatashin    2022-01-14  743  	set_pte_at(vma->vm_mm, address, ptep, pte);
1eba86c096e35e Pasha Tatashin    2022-01-14  744  
b756a3b5e7ead8 Alistair Popple   2021-06-30  745  	/*
b756a3b5e7ead8 Alistair Popple   2021-06-30  746  	 * No need to invalidate - it was non-present before. However
b756a3b5e7ead8 Alistair Popple   2021-06-30  747  	 * secondary CPUs may have mappings that need invalidating.
b756a3b5e7ead8 Alistair Popple   2021-06-30  748  	 */
b756a3b5e7ead8 Alistair Popple   2021-06-30  749  	update_mmu_cache(vma, address, ptep);
b756a3b5e7ead8 Alistair Popple   2021-06-30  750  }
b756a3b5e7ead8 Alistair Popple   2021-06-30  751  

:::::: The code at line 730 was first introduced by commit
:::::: c33c794828f21217f72ce6fc140e0d34e0d56bff mm: ptep_get() conversion

:::::: TO: Ryan Roberts <ryan.roberts@arm.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>

-- 
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:[~2025-01-25  7:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-25  7:49 [davidhildenbrand:device_private 11/12] mm/memory.c:730:2: error: use of undeclared identifier 'entry' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox