From: kernel test robot <lkp@intel.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: oe-kbuild-all@lists.linux.dev, Jarkko Sakkinen <jarkko@kernel.org>
Subject: [jarkko-tpmdd:lgp-v2 2/4] mm/madvise.c:1098:10: error: 'const struct mm_walk_ops' has no member named 'install_pte'
Date: Fri, 25 Oct 2024 10:17:54 +0800 [thread overview]
Message-ID: <202410251042.SfLMse1o-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git lgp-v2
head: 7ed651841db9f18744191e575637d69239102a73
commit: 94de21c76e54641539032105ccd3f36801fa9d85 [2/4] mm: madvise: implement lightweight guard page mechanism
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20241025/202410251042.SfLMse1o-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241025/202410251042.SfLMse1o-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/202410251042.SfLMse1o-lkp@intel.com/
All errors (new ones prefixed by >>):
>> mm/madvise.c:1098:10: error: 'const struct mm_walk_ops' has no member named 'install_pte'
1098 | .install_pte = guard_poison_install_pte,
| ^~~~~~~~~~~
>> mm/madvise.c:1098:35: error: initialization of 'int (*)(long unsigned int, long unsigned int, int, struct mm_walk *)' from incompatible pointer type 'int (*)(long unsigned int, long unsigned int, pte_t *, struct mm_walk *)' [-Werror=incompatible-pointer-types]
1098 | .install_pte = guard_poison_install_pte,
| ^~~~~~~~~~~~~~~~~~~~~~~~
mm/madvise.c:1098:35: note: (near initialization for 'guard_poison_walk_ops.pte_hole')
mm/madvise.c: In function 'madvise_guard_poison':
>> mm/madvise.c:1130:23: error: implicit declaration of function 'walk_page_range_mm'; did you mean 'walk_page_range_vma'? [-Werror=implicit-function-declaration]
1130 | err = walk_page_range_mm(vma->vm_mm, start, end,
| ^~~~~~~~~~~~~~~~~~
| walk_page_range_vma
cc1: some warnings being treated as errors
vim +1098 mm/madvise.c
1093
1094 static const struct mm_walk_ops guard_poison_walk_ops = {
1095 .pud_entry = guard_poison_pud_entry,
1096 .pmd_entry = guard_poison_pmd_entry,
1097 .pte_entry = guard_poison_pte_entry,
> 1098 .install_pte = guard_poison_install_pte,
1099 .walk_lock = PGWALK_RDLOCK,
1100 };
1101
1102 static long madvise_guard_poison(struct vm_area_struct *vma,
1103 struct vm_area_struct **prev,
1104 unsigned long start, unsigned long end)
1105 {
1106 long err;
1107
1108 *prev = vma;
1109 if (!is_valid_guard_vma(vma, /* allow_locked = */false))
1110 return -EINVAL;
1111
1112 /*
1113 * If we install poison markers, then the range is no longer
1114 * empty from a page table perspective and therefore it's
1115 * appropriate to have an anon_vma.
1116 *
1117 * This ensures that on fork, we copy page tables correctly.
1118 */
1119 err = anon_vma_prepare(vma);
1120 if (err)
1121 return err;
1122
1123 /*
1124 * Optimistically try to install the guard poison pages first. If any
1125 * non-guard pages are encountered, give up and zap the range before
1126 * trying again.
1127 */
1128 while (true) {
1129 /* Returns < 0 on error, == 0 if success, > 0 if zap needed. */
> 1130 err = walk_page_range_mm(vma->vm_mm, start, end,
1131 &guard_poison_walk_ops, NULL);
1132 if (err <= 0)
1133 return err;
1134
1135 /*
1136 * OK some of the range have non-guard pages mapped, zap
1137 * them. This leaves existing guard pages in place.
1138 */
1139 zap_page_range_single(vma, start, end - start, NULL);
1140
1141 if (fatal_signal_pending(current))
1142 return -EINTR;
1143 cond_resched();
1144 }
1145 }
1146
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-10-25 2:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 2:17 kernel test robot [this message]
2024-10-25 6:48 ` [jarkko-tpmdd:lgp-v2 2/4] mm/madvise.c:1098:10: error: 'const struct mm_walk_ops' has no member named 'install_pte' Lorenzo Stoakes
2024-10-25 11:10 ` Philip Li
2024-10-25 14:50 ` Jarkko Sakkinen
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=202410251042.SfLMse1o-lkp@intel.com \
--to=lkp@intel.com \
--cc=jarkko@kernel.org \
--cc=lorenzo.stoakes@oracle.com \
--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 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.