Re: [PATCH] Use flush tlb last level when change protection
From: kbuild test robot
Date: Mon Feb 25 2019 - 10:03:12 EST
Hi Xuefeng,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.0-rc8 next-20190225]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Xuefeng-Wang/Use-flush-tlb-last-level-when-change-protection/20190225-214747
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
mm/mprotect.c: In function 'change_protection_range':
>> mm/mprotect.c:290:3: error: implicit declaration of function '__flush_tlb_range'; did you mean '__flush_tlb_page'? [-Werror=implicit-function-declaration]
__flush_tlb_range(vma, start, end, PAGE_SIZE, true);
^~~~~~~~~~~~~~~~~
__flush_tlb_page
cc1: some warnings being treated as errors
vim +290 mm/mprotect.c
265
266 static unsigned long change_protection_range(struct vm_area_struct *vma,
267 unsigned long addr, unsigned long end, pgprot_t newprot,
268 int dirty_accountable, int prot_numa)
269 {
270 struct mm_struct *mm = vma->vm_mm;
271 pgd_t *pgd;
272 unsigned long next;
273 unsigned long start = addr;
274 unsigned long pages = 0;
275
276 BUG_ON(addr >= end);
277 pgd = pgd_offset(mm, addr);
278 flush_cache_range(vma, addr, end);
279 inc_tlb_flush_pending(mm);
280 do {
281 next = pgd_addr_end(addr, end);
282 if (pgd_none_or_clear_bad(pgd))
283 continue;
284 pages += change_p4d_range(vma, pgd, addr, next, newprot,
285 dirty_accountable, prot_numa);
286 } while (pgd++, addr = next, addr != end);
287
288 /* Only flush the TLB if we actually modified any entries: */
289 if (pages)
> 290 __flush_tlb_range(vma, start, end, PAGE_SIZE, true);
291 dec_tlb_flush_pending(mm);
292
293 return pages;
294 }
295
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip