* [davidhildenbrand:unshare_new 3/4] mm/gup.c:39:6: error: conflicting types for 'gup_must_unshare'
@ 2021-12-21 19:54 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-12-21 19:54 UTC (permalink / raw)
To: David Hildenbrand
Cc: llvm, kbuild-all, linux-kernel, Andrea Arcangeli, Peter Xu
tree: git://github.com/davidhildenbrand/linux unshare_new
head: 0b0d58f51fe2675e4dcfb11263ad4cbec053711f
commit: d3eb6d68346c3d9e89ae68461e0eabb5bc7def17 [3/4] mm: gup: trigger unsharing via FAULT_FLAG_UNSHARE when required (!hugetlb)
config: hexagon-randconfig-r045-20211220 (https://download.01.org/0day-ci/archive/20211222/202112220333.iWZqSzKw-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 555eacf75f21cd1dfc6363d73ad187b730349543)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/davidhildenbrand/linux/commit/d3eb6d68346c3d9e89ae68461e0eabb5bc7def17
git remote add davidhildenbrand git://github.com/davidhildenbrand/linux
git fetch --no-tags davidhildenbrand unshare_new
git checkout d3eb6d68346c3d9e89ae68461e0eabb5bc7def17
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from mm/gup.c:7:
include/linux/mm.h:1384:24: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageAnon(page) && PageAnonUnshared(page)) {
^
include/linux/mm.h:1386:4: error: implicit declaration of function 'ClearPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
ClearPageAnonUnshared(page);
^
include/linux/mm.h:1386:4: note: did you mean 'PageAnonUnshared'?
include/linux/mm.h:1384:24: note: 'PageAnonUnshared' declared here
if (PageAnon(page) && PageAnonUnshared(page)) {
^
>> mm/gup.c:39:6: error: conflicting types for 'gup_must_unshare'
bool gup_must_unshare(unsigned int flags, struct page *page)
^
include/linux/mm.h:3086:13: note: previous declaration is here
extern bool gup_must_unshare(unsigned int flags, struct page *page,
^
>> mm/gup.c:593:34: error: too few arguments to function call, expected 3, have 2
if (gup_must_unshare(flags, page)) {
~~~~~~~~~~~~~~~~ ^
include/linux/mm.h:3086:13: note: 'gup_must_unshare' declared here
extern bool gup_must_unshare(unsigned int flags, struct page *page,
^
>> mm/gup.c:595:7: error: implicit declaration of function 'mark_anon_page_exclusive' [-Werror,-Wimplicit-function-declaration]
if (mark_anon_page_exclusive(page, pte_write(pte))) {
^
5 errors generated.
--
In file included from mm/memory.c:43:
include/linux/mm.h:1384:24: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageAnon(page) && PageAnonUnshared(page)) {
^
include/linux/mm.h:1386:4: error: implicit declaration of function 'ClearPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
ClearPageAnonUnshared(page);
^
include/linux/mm.h:1386:4: note: did you mean 'PageAnonUnshared'?
include/linux/mm.h:1384:24: note: 'PageAnonUnshared' declared here
if (PageAnon(page) && PageAnonUnshared(page)) {
^
mm/memory.c:3018:3: error: implicit declaration of function '__SetPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
__SetPageAnonUnshared(new_page);
^
mm/memory.c:3191:24: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageKsm(page) || PageAnonUnshared(page))
^
mm/memory.c:3207:4: error: implicit declaration of function 'SetPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
SetPageAnonUnshared(page);
^
mm/memory.c:3207:4: note: did you mean 'PageAnonUnshared'?
include/linux/mm.h:1384:24: note: 'PageAnonUnshared' declared here
if (PageAnon(page) && PageAnonUnshared(page)) {
^
mm/memory.c:3215:10: error: implicit declaration of function 'wp_page_unshare' [-Werror,-Wimplicit-function-declaration]
return wp_page_unshare(vmf);
^
mm/memory.c:3215:10: note: did you mean 'do_wp_page_unshare'?
mm/memory.c:3177:19: note: 'do_wp_page_unshare' declared here
static vm_fault_t do_wp_page_unshare(struct vm_fault *vmf)
^
>> mm/memory.c:3247:3: error: implicit declaration of function 'SetPageExclusive' [-Werror,-Wimplicit-function-declaration]
SetPageExclusive(page);
^
mm/memory.c:3247:3: note: did you mean 'SetPageAnonExclusive'?
include/linux/page-flags.h:952:29: note: 'SetPageAnonExclusive' declared here
static __always_inline void SetPageAnonExclusive(struct page *page)
^
mm/memory.c:3255:3: error: implicit declaration of function 'SetPageExclusive' [-Werror,-Wimplicit-function-declaration]
SetPageExclusive(page);
^
>> mm/memory.c:3240:5: warning: no previous prototype for function 'mark_anon_page_exclusive' [-Wmissing-prototypes]
int mark_anon_page_exclusive(struct page *page, bool mapped_writable)
^
mm/memory.c:3240:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mark_anon_page_exclusive(struct page *page, bool mapped_writable)
^
static
mm/memory.c:3376:29: error: use of undeclared identifier 'page'
return do_wp_page_unshare(page);
^
mm/memory.c:3415:7: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageAnonUnshared(page))
^
mm/memory.c:4591:8: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageAnonUnshared(page))
^
mm/memory.c:4591:25: error: use of undeclared identifier 'page'
if (PageAnonUnshared(page))
^
mm/memory.c:4593:19: error: use of undeclared identifier 'page'
if (page_count(page) == 1) {
^
mm/memory.c:4594:5: error: implicit declaration of function 'SetPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
SetPageAnonUnshared(page);
^
mm/memory.c:4594:25: error: use of undeclared identifier 'page'
SetPageAnonUnshared(page);
^
1 warning and 15 errors generated.
vim +/gup_must_unshare +39 mm/gup.c
31
32 /*
33 * Indicates for which pages we have to trigger unsharing first to make
34 * anonymous pages exclusive to the MM. Once exlusive, only fork() can
35 * turn the pages !exclusive -- and only if there are no additional references.
36 *
37 * This function is safe to be called in IRQ context.
38 */
> 39 bool gup_must_unshare(unsigned int flags, struct page *page)
40 {
41 if (flags & FOLL_NOUNSHARE)
42 return false;
43 else if (!(flags & FOLL_UNSHARE)) {
44 /*
45 * As a default, unshare only for FOLL_PIN. The corner cases
46 * that cannot use FOLL_PIN right now and have to use FOLL_GET
47 * (i.e., O_DIRECT), although they are reading/writing page
48 * content should manually set FOLL_UNSHARE with FOLL_GET.
49 */
50 if (!(flags & FOLL_PIN))
51 return false;
52 }
53 /*
54 * All of the following properties should be stable also during
55 * gup-fast-only, whereby we hold a reference to the compound page.
56 * (similarly to the page_is_secretmem() check) and require a proper
57 * sync on unmap from the page table to avoid use-after-free.
58 */
59 if (!PageAnon(page))
60 return false;
61 if (PageKsm(page))
62 return false;
63 if (PageHuge(page))
64 /* TODO: handle hugetlb as well. */
65 return false;
66 /*
67 * Without the mmap_lock, this can change during fork(). gup-fast-only
68 * is handled properly via the mm->write_protect_seq and undos the
69 * pinning in case we detect that fork() might have changed this.
70 */
71 return !PageAnonExclusive(page);
72 }
73
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [davidhildenbrand:unshare_new 3/4] mm/gup.c:39:6: error: conflicting types for 'gup_must_unshare'
@ 2021-12-21 19:54 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-12-21 19:54 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9349 bytes --]
tree: git://github.com/davidhildenbrand/linux unshare_new
head: 0b0d58f51fe2675e4dcfb11263ad4cbec053711f
commit: d3eb6d68346c3d9e89ae68461e0eabb5bc7def17 [3/4] mm: gup: trigger unsharing via FAULT_FLAG_UNSHARE when required (!hugetlb)
config: hexagon-randconfig-r045-20211220 (https://download.01.org/0day-ci/archive/20211222/202112220333.iWZqSzKw-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 555eacf75f21cd1dfc6363d73ad187b730349543)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/davidhildenbrand/linux/commit/d3eb6d68346c3d9e89ae68461e0eabb5bc7def17
git remote add davidhildenbrand git://github.com/davidhildenbrand/linux
git fetch --no-tags davidhildenbrand unshare_new
git checkout d3eb6d68346c3d9e89ae68461e0eabb5bc7def17
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from mm/gup.c:7:
include/linux/mm.h:1384:24: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageAnon(page) && PageAnonUnshared(page)) {
^
include/linux/mm.h:1386:4: error: implicit declaration of function 'ClearPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
ClearPageAnonUnshared(page);
^
include/linux/mm.h:1386:4: note: did you mean 'PageAnonUnshared'?
include/linux/mm.h:1384:24: note: 'PageAnonUnshared' declared here
if (PageAnon(page) && PageAnonUnshared(page)) {
^
>> mm/gup.c:39:6: error: conflicting types for 'gup_must_unshare'
bool gup_must_unshare(unsigned int flags, struct page *page)
^
include/linux/mm.h:3086:13: note: previous declaration is here
extern bool gup_must_unshare(unsigned int flags, struct page *page,
^
>> mm/gup.c:593:34: error: too few arguments to function call, expected 3, have 2
if (gup_must_unshare(flags, page)) {
~~~~~~~~~~~~~~~~ ^
include/linux/mm.h:3086:13: note: 'gup_must_unshare' declared here
extern bool gup_must_unshare(unsigned int flags, struct page *page,
^
>> mm/gup.c:595:7: error: implicit declaration of function 'mark_anon_page_exclusive' [-Werror,-Wimplicit-function-declaration]
if (mark_anon_page_exclusive(page, pte_write(pte))) {
^
5 errors generated.
--
In file included from mm/memory.c:43:
include/linux/mm.h:1384:24: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageAnon(page) && PageAnonUnshared(page)) {
^
include/linux/mm.h:1386:4: error: implicit declaration of function 'ClearPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
ClearPageAnonUnshared(page);
^
include/linux/mm.h:1386:4: note: did you mean 'PageAnonUnshared'?
include/linux/mm.h:1384:24: note: 'PageAnonUnshared' declared here
if (PageAnon(page) && PageAnonUnshared(page)) {
^
mm/memory.c:3018:3: error: implicit declaration of function '__SetPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
__SetPageAnonUnshared(new_page);
^
mm/memory.c:3191:24: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageKsm(page) || PageAnonUnshared(page))
^
mm/memory.c:3207:4: error: implicit declaration of function 'SetPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
SetPageAnonUnshared(page);
^
mm/memory.c:3207:4: note: did you mean 'PageAnonUnshared'?
include/linux/mm.h:1384:24: note: 'PageAnonUnshared' declared here
if (PageAnon(page) && PageAnonUnshared(page)) {
^
mm/memory.c:3215:10: error: implicit declaration of function 'wp_page_unshare' [-Werror,-Wimplicit-function-declaration]
return wp_page_unshare(vmf);
^
mm/memory.c:3215:10: note: did you mean 'do_wp_page_unshare'?
mm/memory.c:3177:19: note: 'do_wp_page_unshare' declared here
static vm_fault_t do_wp_page_unshare(struct vm_fault *vmf)
^
>> mm/memory.c:3247:3: error: implicit declaration of function 'SetPageExclusive' [-Werror,-Wimplicit-function-declaration]
SetPageExclusive(page);
^
mm/memory.c:3247:3: note: did you mean 'SetPageAnonExclusive'?
include/linux/page-flags.h:952:29: note: 'SetPageAnonExclusive' declared here
static __always_inline void SetPageAnonExclusive(struct page *page)
^
mm/memory.c:3255:3: error: implicit declaration of function 'SetPageExclusive' [-Werror,-Wimplicit-function-declaration]
SetPageExclusive(page);
^
>> mm/memory.c:3240:5: warning: no previous prototype for function 'mark_anon_page_exclusive' [-Wmissing-prototypes]
int mark_anon_page_exclusive(struct page *page, bool mapped_writable)
^
mm/memory.c:3240:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mark_anon_page_exclusive(struct page *page, bool mapped_writable)
^
static
mm/memory.c:3376:29: error: use of undeclared identifier 'page'
return do_wp_page_unshare(page);
^
mm/memory.c:3415:7: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageAnonUnshared(page))
^
mm/memory.c:4591:8: error: implicit declaration of function 'PageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
if (PageAnonUnshared(page))
^
mm/memory.c:4591:25: error: use of undeclared identifier 'page'
if (PageAnonUnshared(page))
^
mm/memory.c:4593:19: error: use of undeclared identifier 'page'
if (page_count(page) == 1) {
^
mm/memory.c:4594:5: error: implicit declaration of function 'SetPageAnonUnshared' [-Werror,-Wimplicit-function-declaration]
SetPageAnonUnshared(page);
^
mm/memory.c:4594:25: error: use of undeclared identifier 'page'
SetPageAnonUnshared(page);
^
1 warning and 15 errors generated.
vim +/gup_must_unshare +39 mm/gup.c
31
32 /*
33 * Indicates for which pages we have to trigger unsharing first to make
34 * anonymous pages exclusive to the MM. Once exlusive, only fork() can
35 * turn the pages !exclusive -- and only if there are no additional references.
36 *
37 * This function is safe to be called in IRQ context.
38 */
> 39 bool gup_must_unshare(unsigned int flags, struct page *page)
40 {
41 if (flags & FOLL_NOUNSHARE)
42 return false;
43 else if (!(flags & FOLL_UNSHARE)) {
44 /*
45 * As a default, unshare only for FOLL_PIN. The corner cases
46 * that cannot use FOLL_PIN right now and have to use FOLL_GET
47 * (i.e., O_DIRECT), although they are reading/writing page
48 * content should manually set FOLL_UNSHARE with FOLL_GET.
49 */
50 if (!(flags & FOLL_PIN))
51 return false;
52 }
53 /*
54 * All of the following properties should be stable also during
55 * gup-fast-only, whereby we hold a reference to the compound page.
56 * (similarly to the page_is_secretmem() check) and require a proper
57 * sync on unmap from the page table to avoid use-after-free.
58 */
59 if (!PageAnon(page))
60 return false;
61 if (PageKsm(page))
62 return false;
63 if (PageHuge(page))
64 /* TODO: handle hugetlb as well. */
65 return false;
66 /*
67 * Without the mmap_lock, this can change during fork(). gup-fast-only
68 * is handled properly via the mm->write_protect_seq and undos the
69 * pinning in case we detect that fork() might have changed this.
70 */
71 return !PageAnonExclusive(page);
72 }
73
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [davidhildenbrand:unshare_new 3/4] mm/gup.c:39:6: error: conflicting types for 'gup_must_unshare'
@ 2021-12-21 4:06 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-12-21 4:06 UTC (permalink / raw)
To: David Hildenbrand; +Cc: kbuild-all, linux-kernel, Andrea Arcangeli, Peter Xu
tree: git://github.com/davidhildenbrand/linux unshare_new
head: 0b0d58f51fe2675e4dcfb11263ad4cbec053711f
commit: d3eb6d68346c3d9e89ae68461e0eabb5bc7def17 [3/4] mm: gup: trigger unsharing via FAULT_FLAG_UNSHARE when required (!hugetlb)
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20211221/202112211124.akx29yxL-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/davidhildenbrand/linux/commit/d3eb6d68346c3d9e89ae68461e0eabb5bc7def17
git remote add davidhildenbrand git://github.com/davidhildenbrand/linux
git fetch --no-tags davidhildenbrand unshare_new
git checkout d3eb6d68346c3d9e89ae68461e0eabb5bc7def17
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from mm/gup.c:7:
include/linux/mm.h: In function 'page_needs_cow_for_dma':
include/linux/mm.h:1384:24: error: implicit declaration of function 'PageAnonUnshared' [-Werror=implicit-function-declaration]
1384 | if (PageAnon(page) && PageAnonUnshared(page)) {
| ^~~~~~~~~~~~~~~~
include/linux/mm.h:1386:4: error: implicit declaration of function 'ClearPageAnonUnshared' [-Werror=implicit-function-declaration]
1386 | ClearPageAnonUnshared(page);
| ^~~~~~~~~~~~~~~~~~~~~
mm/gup.c: At top level:
>> mm/gup.c:39:6: error: conflicting types for 'gup_must_unshare'
39 | bool gup_must_unshare(unsigned int flags, struct page *page)
| ^~~~~~~~~~~~~~~~
In file included from mm/gup.c:7:
include/linux/mm.h:3086:13: note: previous declaration of 'gup_must_unshare' was here
3086 | extern bool gup_must_unshare(unsigned int flags, struct page *page,
| ^~~~~~~~~~~~~~~~
mm/gup.c: In function 'follow_page_pte':
mm/gup.c:595:7: error: implicit declaration of function 'mark_anon_page_exclusive' [-Werror=implicit-function-declaration]
595 | if (mark_anon_page_exclusive(page, pte_write(pte))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/gup_must_unshare +39 mm/gup.c
6
> 7 #include <linux/mm.h>
8 #include <linux/memremap.h>
9 #include <linux/pagemap.h>
10 #include <linux/rmap.h>
11 #include <linux/swap.h>
12 #include <linux/swapops.h>
13 #include <linux/secretmem.h>
14
15 #include <linux/sched/signal.h>
16 #include <linux/rwsem.h>
17 #include <linux/hugetlb.h>
18 #include <linux/migrate.h>
19 #include <linux/mm_inline.h>
20 #include <linux/sched/mm.h>
21
22 #include <asm/mmu_context.h>
23 #include <asm/tlbflush.h>
24
25 #include "internal.h"
26
27 struct follow_page_context {
28 struct dev_pagemap *pgmap;
29 unsigned int page_mask;
30 };
31
32 /*
33 * Indicates for which pages we have to trigger unsharing first to make
34 * anonymous pages exclusive to the MM. Once exlusive, only fork() can
35 * turn the pages !exclusive -- and only if there are no additional references.
36 *
37 * This function is safe to be called in IRQ context.
38 */
> 39 bool gup_must_unshare(unsigned int flags, struct page *page)
40 {
41 if (flags & FOLL_NOUNSHARE)
42 return false;
43 else if (!(flags & FOLL_UNSHARE)) {
44 /*
45 * As a default, unshare only for FOLL_PIN. The corner cases
46 * that cannot use FOLL_PIN right now and have to use FOLL_GET
47 * (i.e., O_DIRECT), although they are reading/writing page
48 * content should manually set FOLL_UNSHARE with FOLL_GET.
49 */
50 if (!(flags & FOLL_PIN))
51 return false;
52 }
53 /*
54 * All of the following properties should be stable also during
55 * gup-fast-only, whereby we hold a reference to the compound page.
56 * (similarly to the page_is_secretmem() check) and require a proper
57 * sync on unmap from the page table to avoid use-after-free.
58 */
59 if (!PageAnon(page))
60 return false;
61 if (PageKsm(page))
62 return false;
63 if (PageHuge(page))
64 /* TODO: handle hugetlb as well. */
65 return false;
66 /*
67 * Without the mmap_lock, this can change during fork(). gup-fast-only
68 * is handled properly via the mm->write_protect_seq and undos the
69 * pinning in case we detect that fork() might have changed this.
70 */
71 return !PageAnonExclusive(page);
72 }
73
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [davidhildenbrand:unshare_new 3/4] mm/gup.c:39:6: error: conflicting types for 'gup_must_unshare'
@ 2021-12-21 4:06 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-12-21 4:06 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5025 bytes --]
tree: git://github.com/davidhildenbrand/linux unshare_new
head: 0b0d58f51fe2675e4dcfb11263ad4cbec053711f
commit: d3eb6d68346c3d9e89ae68461e0eabb5bc7def17 [3/4] mm: gup: trigger unsharing via FAULT_FLAG_UNSHARE when required (!hugetlb)
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20211221/202112211124.akx29yxL-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/davidhildenbrand/linux/commit/d3eb6d68346c3d9e89ae68461e0eabb5bc7def17
git remote add davidhildenbrand git://github.com/davidhildenbrand/linux
git fetch --no-tags davidhildenbrand unshare_new
git checkout d3eb6d68346c3d9e89ae68461e0eabb5bc7def17
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from mm/gup.c:7:
include/linux/mm.h: In function 'page_needs_cow_for_dma':
include/linux/mm.h:1384:24: error: implicit declaration of function 'PageAnonUnshared' [-Werror=implicit-function-declaration]
1384 | if (PageAnon(page) && PageAnonUnshared(page)) {
| ^~~~~~~~~~~~~~~~
include/linux/mm.h:1386:4: error: implicit declaration of function 'ClearPageAnonUnshared' [-Werror=implicit-function-declaration]
1386 | ClearPageAnonUnshared(page);
| ^~~~~~~~~~~~~~~~~~~~~
mm/gup.c: At top level:
>> mm/gup.c:39:6: error: conflicting types for 'gup_must_unshare'
39 | bool gup_must_unshare(unsigned int flags, struct page *page)
| ^~~~~~~~~~~~~~~~
In file included from mm/gup.c:7:
include/linux/mm.h:3086:13: note: previous declaration of 'gup_must_unshare' was here
3086 | extern bool gup_must_unshare(unsigned int flags, struct page *page,
| ^~~~~~~~~~~~~~~~
mm/gup.c: In function 'follow_page_pte':
mm/gup.c:595:7: error: implicit declaration of function 'mark_anon_page_exclusive' [-Werror=implicit-function-declaration]
595 | if (mark_anon_page_exclusive(page, pte_write(pte))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/gup_must_unshare +39 mm/gup.c
6
> 7 #include <linux/mm.h>
8 #include <linux/memremap.h>
9 #include <linux/pagemap.h>
10 #include <linux/rmap.h>
11 #include <linux/swap.h>
12 #include <linux/swapops.h>
13 #include <linux/secretmem.h>
14
15 #include <linux/sched/signal.h>
16 #include <linux/rwsem.h>
17 #include <linux/hugetlb.h>
18 #include <linux/migrate.h>
19 #include <linux/mm_inline.h>
20 #include <linux/sched/mm.h>
21
22 #include <asm/mmu_context.h>
23 #include <asm/tlbflush.h>
24
25 #include "internal.h"
26
27 struct follow_page_context {
28 struct dev_pagemap *pgmap;
29 unsigned int page_mask;
30 };
31
32 /*
33 * Indicates for which pages we have to trigger unsharing first to make
34 * anonymous pages exclusive to the MM. Once exlusive, only fork() can
35 * turn the pages !exclusive -- and only if there are no additional references.
36 *
37 * This function is safe to be called in IRQ context.
38 */
> 39 bool gup_must_unshare(unsigned int flags, struct page *page)
40 {
41 if (flags & FOLL_NOUNSHARE)
42 return false;
43 else if (!(flags & FOLL_UNSHARE)) {
44 /*
45 * As a default, unshare only for FOLL_PIN. The corner cases
46 * that cannot use FOLL_PIN right now and have to use FOLL_GET
47 * (i.e., O_DIRECT), although they are reading/writing page
48 * content should manually set FOLL_UNSHARE with FOLL_GET.
49 */
50 if (!(flags & FOLL_PIN))
51 return false;
52 }
53 /*
54 * All of the following properties should be stable also during
55 * gup-fast-only, whereby we hold a reference to the compound page.
56 * (similarly to the page_is_secretmem() check) and require a proper
57 * sync on unmap from the page table to avoid use-after-free.
58 */
59 if (!PageAnon(page))
60 return false;
61 if (PageKsm(page))
62 return false;
63 if (PageHuge(page))
64 /* TODO: handle hugetlb as well. */
65 return false;
66 /*
67 * Without the mmap_lock, this can change during fork(). gup-fast-only
68 * is handled properly via the mm->write_protect_seq and undos the
69 * pinning in case we detect that fork() might have changed this.
70 */
71 return !PageAnonExclusive(page);
72 }
73
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-21 19:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21 19:54 [davidhildenbrand:unshare_new 3/4] mm/gup.c:39:6: error: conflicting types for 'gup_must_unshare' kernel test robot
2021-12-21 19:54 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-12-21 4:06 kernel test robot
2021-12-21 4:06 ` kernel test robot
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.