tree:
https://github.com/weiny2/linux-kernel.git tip-pks-v4.3-5.12-rc
head: 12193a5eaa93574ad2abd5e21cf03266e79c0fee
commit: 13bd8321d6e376da6a5ecda33fddee7a2c6db7ea [12/16] kmap: Add stray access protection
for device pages
config: csky-defconfig (attached as .config)
compiler: csky-linux-gcc (GCC) 9.3.0
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/weiny2/linux-kernel/commit/13bd8321d6e376da6a5ecda33fd...
git remote add weiny2
https://github.com/weiny2/linux-kernel.git
git fetch --no-tags weiny2 tip-pks-v4.3-5.12-rc
git checkout 13bd8321d6e376da6a5ecda33fddee7a2c6db7ea
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=csky
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/phy/phy.h:17,
from include/linux/usb/otg.h:13,
from include/linux/usb/of.h:12,
from drivers/usb/phy/of.c:9:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
--
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/fscache.h:19,
from include/linux/fscache-cache.h:17,
from fs/fscache/internal.h:27,
from fs/fscache/object.c:15:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
fs/fscache/object.c: In function 'fscache_object_work_func':
fs/fscache/object.c:280:16: warning: variable 'start' set but not used
[-Wunused-but-set-variable]
280 | unsigned long start;
| ^~~~~
At top level:
fs/fscache/object.c:31:25: warning: 'fscache_osm_CREATE_OBJECT' defined but not
used [-Wunused-const-variable=]
31 | #define __STATE_NAME(n) fscache_osm_##n
| ^~~~~~~~~~~~
fs/fscache/object.c:42:29: note: in expansion of macro '__STATE_NAME'
42 | const struct fscache_state __STATE_NAME(n) = { \
| ^~~~~~~~~~~~
fs/fscache/object.c:80:8: note: in expansion of macro 'WORK_STATE'
80 | static WORK_STATE(CREATE_OBJECT, "CRTO", fscache_look_up_object);
| ^~~~~~~~~~
--
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/fscache.h:19,
from include/linux/fscache-cache.h:17,
from fs/fscache/internal.h:27,
from fs/fscache/operation.c:14:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
fs/fscache/operation.c: In function 'fscache_op_work_func':
fs/fscache/operation.c:619:16: warning: variable 'start' set but not used
[-Wunused-but-set-variable]
619 | unsigned long start;
| ^~~~~
--
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/fscache.h:19,
from include/linux/fscache-cache.h:17,
from fs/fscache/page.c:10:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
fs/fscache/page.c: In function 'fscache_wait_for_deferred_lookup':
fs/fscache/page.c:343:16: warning: variable 'jif' set but not used
[-Wunused-but-set-variable]
343 | unsigned long jif;
| ^~~
--
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/fscache.h:19,
from include/linux/fscache-cache.h:17,
from fs/cachefiles/internal.h:15,
from fs/cachefiles/namei.c:19:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
fs/cachefiles/namei.c: In function 'cachefiles_walk_to_object':
fs/cachefiles/namei.c:499:16: warning: variable 'start' set but not used
[-Wunused-but-set-variable]
499 | unsigned long start;
| ^~~~~
fs/cachefiles/namei.c: In function 'cachefiles_get_directory':
fs/cachefiles/namei.c:768:16: warning: variable 'start' set but not used
[-Wunused-but-set-variable]
768 | unsigned long start;
| ^~~~~
fs/cachefiles/namei.c: In function 'cachefiles_check_active':
fs/cachefiles/namei.c:879:16: warning: variable 'start' set but not used
[-Wunused-but-set-variable]
879 | unsigned long start;
| ^~~~~
--
In file included from include/linux/highmem.h:14,
from net/socket.c:74:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
net/socket.c: In function '__sys_getsockopt':
net/socket.c:2143:6: warning: variable 'max_optlen' set but not used
[-Wunused-but-set-variable]
2143 | int max_optlen;
| ^~~~~~~~~~
--
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/net/sock.h:53,
from include/linux/tcp.h:19,
from include/linux/ipv6.h:88,
from include/net/addrconf.h:50,
from lib/vsprintf.c:40:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
lib/vsprintf.c: In function 'va_format':
lib/vsprintf.c:1663:2: warning: function 'va_format' might be a candidate for
'gnu_printf' format attribute [-Wsuggest-attribute=format]
1663 | buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
| ^~~
--
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from fs/proc/meminfo.c:12:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
fs/proc/meminfo.c: At top level:
fs/proc/meminfo.c:22:28: warning: no previous prototype for
'arch_report_meminfo' [-Wmissing-prototypes]
22 | void __attribute__((weak)) arch_report_meminfo(struct seq_file *m)
| ^~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/net/sock.h:53,
from include/linux/mroute_base.h:8,
from include/linux/mroute.h:10,
from net/ipv4/route.c:82:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
net/ipv4/route.c: In function 'ip_rt_send_redirect':
net/ipv4/route.c:880:6: warning: variable 'log_martians' set but not used
[-Wunused-but-set-variable]
880 | int log_martians;
| ^~~~~~~~~~~~
--
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/trace/events/random.h:8,
from drivers/char/random.c:348:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
drivers/char/random.c: At top level:
drivers/char/random.c:2283:6: warning: no previous prototype for
'add_hwgenerator_randomness' [-Wmissing-prototypes]
2283 | void add_hwgenerator_randomness(const char *buffer, size_t count,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/highmem.h:14,
from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from fs/ext4/ext4.h:21,
from fs/ext4/fast_commit.c:10:
include/linux/highmem-internal.h: In function 'kmap_local_pfn':
> include/linux/highmem-internal.h:106:24: error: 'page'
undeclared (first use in this function)
106 | dev_page_mk_readwrite(page,
false);
| ^~~~
include/linux/highmem-internal.h:106:24: note: each undeclared identifier is reported
only once for each function it appears in
include/linux/highmem-internal.h: In function 'kmap_atomic_pfn':
include/linux/highmem-internal.h:133:24: error: 'page' undeclared (first use in
this function)
133 | dev_page_mk_readwrite(page, false);
| ^~~~
include/linux/highmem-internal.h: In function '__kunmap_atomic':
> include/linux/highmem-internal.h:140:36: error: 'vaddr'
undeclared (first use in this function); did you mean 'addr'?
140 |
dev_page_mk_noaccess(kmap_to_page(vaddr), false);
| ^~~~~
| addr
fs/ext4/fast_commit.c: In function 'ext4_fc_replay_del_range':
fs/ext4/fast_commit.c:1807:51: warning: suggest braces around empty body in an
'if' statement [-Wempty-body]
1807 | jbd_debug(1, "ext4_punch_hole returned %d", ret);
| ^
..
vim +/page +106 include/linux/highmem-internal.h
103
104 static inline void *kmap_local_pfn(unsigned long pfn)
105 {
106 dev_page_mk_readwrite(page, false);
107 return
__kmap_local_pfn_prot(pfn, kmap_prot);
108 }
109
110 static inline void __kunmap_local(void *vaddr)
111 {
112 kunmap_local_indexed(vaddr);
113 dev_page_mk_noaccess(kmap_to_page(vaddr), false);
114 }
115
116 static inline void *kmap_atomic_prot(struct page *page, pgprot_t prot)
117 {
118 preempt_disable();
119 pagefault_disable();
120 dev_page_mk_readwrite(page, false);
121 return __kmap_local_page_prot(page, prot);
122 }
123
124 static inline void *kmap_atomic(struct page *page)
125 {
126 return kmap_atomic_prot(page, kmap_prot);
127 }
128
129 static inline void *kmap_atomic_pfn(unsigned long pfn)
130 {
131 preempt_disable();
132 pagefault_disable();
133 dev_page_mk_readwrite(page, false);
134 return __kmap_local_pfn_prot(pfn, kmap_prot);
135 }
136
137 static inline void __kunmap_atomic(void *addr)
138 {
139 kunmap_local_indexed(addr);
140 dev_page_mk_noaccess(kmap_to_page(vaddr), false);
141 pagefault_enable();
142 preempt_enable();
143 }
144
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org