From: kernel test robot <lkp@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [davidhildenbrand:device_private 11/12] mm/memory.c:730:2: error: use of undeclared identifier 'entry'
Date: Sat, 25 Jan 2025 15:49:32 +0800 [thread overview]
Message-ID: <202501251554.1DXJI1g3-lkp@intel.com> (raw)
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
reply other threads:[~2025-01-25 7:50 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=202501251554.1DXJI1g3-lkp@intel.com \
--to=lkp@intel.com \
--cc=david@redhat.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox