linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: jglisse@redhat.com
Cc: kbuild-all@01.org, linux-mm@kvack.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	"Matthew Wilcox" <mawilcox@microsoft.com>,
	"Ross Zwisler" <zwisler@kernel.org>, "Jan Kara" <jack@suse.cz>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Michal Hocko" <mhocko@kernel.org>,
	"Christian Koenig" <christian.koenig@amd.com>,
	"Felix Kuehling" <felix.kuehling@amd.com>,
	"Ralph Campbell" <rcampbell@nvidia.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	kvm@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] mm/mmu_notifier: contextual information for event triggering invalidation
Date: Fri, 7 Dec 2018 04:53:41 +0800	[thread overview]
Message-ID: <201812070436.Z0VbPbfc%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181203201817.10759-4-jglisse@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4153 bytes --]

Hi J�r�me,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc5]
[cannot apply to next-20181206]
[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/jglisse-redhat-com/mmu-notifier-contextual-informations/20181207-031930
config: i386-randconfig-x007-201848 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   kernel/events/uprobes.c: In function '__replace_page':
   kernel/events/uprobes.c:174:28: error: storage size of 'range' isn't known
     struct mmu_notifier_range range;
                               ^~~~~
>> kernel/events/uprobes.c:177:16: error: 'MMU_NOTIFY_CLEAR' undeclared (first use in this function); did you mean 'VM_ARCH_CLEAR'?
     range.event = MMU_NOTIFY_CLEAR;
                   ^~~~~~~~~~~~~~~~
                   VM_ARCH_CLEAR
   kernel/events/uprobes.c:177:16: note: each undeclared identifier is reported only once for each function it appears in
   kernel/events/uprobes.c:174:28: warning: unused variable 'range' [-Wunused-variable]
     struct mmu_notifier_range range;
                               ^~~~~

vim +177 kernel/events/uprobes.c

   152	
   153	/**
   154	 * __replace_page - replace page in vma by new page.
   155	 * based on replace_page in mm/ksm.c
   156	 *
   157	 * @vma:      vma that holds the pte pointing to page
   158	 * @addr:     address the old @page is mapped at
   159	 * @page:     the cowed page we are replacing by kpage
   160	 * @kpage:    the modified page we replace page by
   161	 *
   162	 * Returns 0 on success, -EFAULT on failure.
   163	 */
   164	static int __replace_page(struct vm_area_struct *vma, unsigned long addr,
   165					struct page *old_page, struct page *new_page)
   166	{
   167		struct mm_struct *mm = vma->vm_mm;
   168		struct page_vma_mapped_walk pvmw = {
   169			.page = old_page,
   170			.vma = vma,
   171			.address = addr,
   172		};
   173		int err;
 > 174		struct mmu_notifier_range range;
   175		struct mem_cgroup *memcg;
   176	
 > 177		range.event = MMU_NOTIFY_CLEAR;
   178		range.start = addr;
   179		range.end = addr + PAGE_SIZE;
   180		range.mm = mm;
   181	
   182		VM_BUG_ON_PAGE(PageTransHuge(old_page), old_page);
   183	
   184		err = mem_cgroup_try_charge(new_page, vma->vm_mm, GFP_KERNEL, &memcg,
   185				false);
   186		if (err)
   187			return err;
   188	
   189		/* For try_to_free_swap() and munlock_vma_page() below */
   190		lock_page(old_page);
   191	
   192		mmu_notifier_invalidate_range_start(&range);
   193		err = -EAGAIN;
   194		if (!page_vma_mapped_walk(&pvmw)) {
   195			mem_cgroup_cancel_charge(new_page, memcg, false);
   196			goto unlock;
   197		}
   198		VM_BUG_ON_PAGE(addr != pvmw.address, old_page);
   199	
   200		get_page(new_page);
   201		page_add_new_anon_rmap(new_page, vma, addr, false);
   202		mem_cgroup_commit_charge(new_page, memcg, false, false);
   203		lru_cache_add_active_or_unevictable(new_page, vma);
   204	
   205		if (!PageAnon(old_page)) {
   206			dec_mm_counter(mm, mm_counter_file(old_page));
   207			inc_mm_counter(mm, MM_ANONPAGES);
   208		}
   209	
   210		flush_cache_page(vma, addr, pte_pfn(*pvmw.pte));
   211		ptep_clear_flush_notify(vma, addr, pvmw.pte);
   212		set_pte_at_notify(mm, addr, pvmw.pte,
   213				mk_pte(new_page, vma->vm_page_prot));
   214	
   215		page_remove_rmap(old_page, false);
   216		if (!page_mapped(old_page))
   217			try_to_free_swap(old_page);
   218		page_vma_mapped_walk_done(&pvmw);
   219	
   220		if (vma->vm_flags & VM_LOCKED)
   221			munlock_vma_page(old_page);
   222		put_page(old_page);
   223	
   224		err = 0;
   225	 unlock:
   226		mmu_notifier_invalidate_range_end(&range);
   227		unlock_page(old_page);
   228		return err;
   229	}
   230	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23952 bytes --]

  parent reply	other threads:[~2018-12-06 20:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03 20:18 [PATCH 0/3] mmu notifier contextual informations jglisse
2018-12-03 20:18 ` [PATCH 1/3] mm/mmu_notifier: use structure for invalidate_range_start/end callback jglisse
2018-12-03 20:18 ` [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls jglisse
2018-12-04  0:09   ` Jerome Glisse
2018-12-05 11:04   ` Jan Kara
2018-12-05 15:53     ` Jerome Glisse
2018-12-05 16:28       ` Jan Kara
2018-12-06 20:31   ` kbuild test robot
2018-12-06 20:35   ` kbuild test robot
2018-12-03 20:18 ` [PATCH 3/3] mm/mmu_notifier: contextual information for event triggering invalidation jglisse
2018-12-04  8:17   ` Mike Rapoport
2018-12-04 14:48     ` Jerome Glisse
2018-12-04 23:21   ` Andrew Morton
2018-12-06 20:53   ` kbuild test robot [this message]
2018-12-06 21:19   ` kbuild test robot
2018-12-06 21:51     ` Jerome Glisse
2018-12-04  7:35 ` [PATCH 0/3] mmu notifier contextual informations Koenig, Christian

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=201812070436.Z0VbPbfc%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.koenig@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felix.kuehling@amd.com \
    --cc=jack@suse.cz \
    --cc=jglisse@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=kbuild-all@01.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mawilcox@microsoft.com \
    --cc=mhocko@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rcampbell@nvidia.com \
    --cc=rkrcmar@redhat.com \
    --cc=zwisler@kernel.org \
    /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