[arm-integrator:kernel-in-vmalloc-v6.2-rc3 8/25] fs/cifs/cifsglob.h:2217:48: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast
kernel test robot
lkp at intel.com
Wed Feb 1 10:13:19 PST 2023
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc-v6.2-rc3
head: ac3cfb78163256f2febd47ebd017d9f5b75820dd
commit: a1d2a5262341eafc84074a0688f37fe4020cd65f [8/25] ARC: mm: Make virt_to_pfn() a static inline
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20230202/202302020226.XF4SDEoW-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git/commit/?id=a1d2a5262341eafc84074a0688f37fe4020cd65f
git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
git fetch --no-tags arm-integrator kernel-in-vmalloc-v6.2-rc3
git checkout a1d2a5262341eafc84074a0688f37fe4020cd65f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arc/include/asm/page.h:137,
from arch/arc/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:56,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/namei.h:5,
from fs/cifs/dfs.c:6:
fs/cifs/cifsglob.h: In function 'cifs_sg_set_buf':
>> fs/cifs/cifsglob.h:2217:48: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
fs/cifs/cifsglob.h:2217:35: note: in expansion of macro 'virt_to_page'
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~~~~~~~~~
arch/arc/include/asm/page.h:124:53: note: expected 'const void *' but argument is of type 'long unsigned int'
124 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
--
In file included from arch/arc/include/asm/page.h:137,
from arch/arc/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:56,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/cifs/smb2pdu.c:18:
fs/cifs/cifsglob.h: In function 'cifs_sg_set_buf':
>> fs/cifs/cifsglob.h:2217:48: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
fs/cifs/cifsglob.h:2217:35: note: in expansion of macro 'virt_to_page'
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~~~~~~~~~
arch/arc/include/asm/page.h:124:53: note: expected 'const void *' but argument is of type 'long unsigned int'
124 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
during RTL pass: mach
fs/cifs/smb2pdu.c: In function 'smb2_reconnect':
fs/cifs/smb2pdu.c:350:1: internal compiler error: in arc_ifcvt, at config/arc/arc.cc:9642
350 | }
| ^
0x59b7d9 arc_ifcvt
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:9642
0xdeaf74 arc_reorg
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:8424
0xaaab69 execute
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/reorg.cc:3927
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
--
In file included from arch/arc/include/asm/page.h:137,
from arch/arc/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from include/linux/pagemap.h:8,
from fs/cifs/smb1ops.c:8:
fs/cifs/cifsglob.h: In function 'cifs_sg_set_buf':
>> fs/cifs/cifsglob.h:2217:48: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
fs/cifs/cifsglob.h:2217:35: note: in expansion of macro 'virt_to_page'
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~~~~~~~~~
arch/arc/include/asm/page.h:124:53: note: expected 'const void *' but argument is of type 'long unsigned int'
124 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
during RTL pass: mach
fs/cifs/smb1ops.c: In function 'check2ndT2':
fs/cifs/smb1ops.c:284:1: internal compiler error: in arc_ifcvt, at config/arc/arc.cc:9642
284 | }
| ^
0x59b7d9 arc_ifcvt
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:9642
0xdeaf74 arc_reorg
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:8424
0xaaab69 execute
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/reorg.cc:3927
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
--
In file included from arch/arc/include/asm/page.h:137,
from arch/arc/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:56,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/cifs/cifssmb.c:17:
fs/cifs/cifsglob.h: In function 'cifs_sg_set_buf':
>> fs/cifs/cifsglob.h:2217:48: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
fs/cifs/cifsglob.h:2217:35: note: in expansion of macro 'virt_to_page'
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~~~~~~~~~
arch/arc/include/asm/page.h:124:53: note: expected 'const void *' but argument is of type 'long unsigned int'
124 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
during RTL pass: mach
fs/cifs/cifssmb.c: In function 'SMBOldQFSInfo':
fs/cifs/cifssmb.c:4594:1: internal compiler error: in arc_ifcvt, at config/arc/arc.cc:9642
4594 | }
| ^
0x59b7d9 arc_ifcvt
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:9642
0xdeaf74 arc_reorg
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:8424
0xaaab69 execute
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/reorg.cc:3927
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
--
In file included from arch/arc/include/asm/page.h:137,
from arch/arc/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:56,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/cifs/smb2file.c:9:
fs/cifs/cifsglob.h: In function 'cifs_sg_set_buf':
>> fs/cifs/cifsglob.h:2217:48: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
fs/cifs/cifsglob.h:2217:35: note: in expansion of macro 'virt_to_page'
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~~~~~~~~~
arch/arc/include/asm/page.h:124:53: note: expected 'const void *' but argument is of type 'long unsigned int'
124 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
during RTL pass: mach
fs/cifs/smb2file.c: In function 'smb2_push_mandatory_locks':
fs/cifs/smb2file.c:371:1: internal compiler error: in arc_ifcvt, at config/arc/arc.cc:9642
371 | }
| ^
0x59b7d9 arc_ifcvt
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:9642
0xdeaf74 arc_reorg
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:8424
0xaaab69 execute
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/reorg.cc:3927
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
--
In file included from arch/arc/include/asm/page.h:137,
from arch/arc/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:56,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/cifs/cifsacl.c:11:
fs/cifs/cifsglob.h: In function 'cifs_sg_set_buf':
>> fs/cifs/cifsglob.h:2217:48: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
fs/cifs/cifsglob.h:2217:35: note: in expansion of macro 'virt_to_page'
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~~~~~~~~~
arch/arc/include/asm/page.h:124:53: note: expected 'const void *' but argument is of type 'long unsigned int'
124 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
during RTL pass: mach
fs/cifs/cifsacl.c: In function 'parse_sid':
fs/cifs/cifsacl.c:1189:1: internal compiler error: in arc_ifcvt, at config/arc/arc.cc:9642
1189 | }
| ^
0x59b7d9 arc_ifcvt
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:9642
0xdeaf74 arc_reorg
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:8424
0xaaab69 execute
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/reorg.cc:3927
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
--
In file included from arch/arc/include/asm/page.h:137,
from include/linux/mm_types_task.h:16,
from include/linux/mm_types.h:5,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from fs/cifs/cifsfs.c:13:
fs/cifs/cifsglob.h: In function 'cifs_sg_set_buf':
>> fs/cifs/cifsglob.h:2217:48: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
fs/cifs/cifsglob.h:2217:35: note: in expansion of macro 'virt_to_page'
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~~~~~~~~~
arch/arc/include/asm/page.h:124:53: note: expected 'const void *' but argument is of type 'long unsigned int'
124 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
during RTL pass: mach
fs/cifs/cifsfs.c: In function 'cifs_init_request_bufs':
fs/cifs/cifsfs.c:1589:1: internal compiler error: in arc_ifcvt, at config/arc/arc.cc:9642
1589 | }
| ^
0x59b7d9 arc_ifcvt
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:9642
0xdeaf74 arc_reorg
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:8424
0xaaab69 execute
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/reorg.cc:3927
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
--
In file included from arch/arc/include/asm/page.h:137,
from arch/arc/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:56,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/cifs/connect.c:8:
fs/cifs/cifsglob.h: In function 'cifs_sg_set_buf':
>> fs/cifs/cifsglob.h:2217:48: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
fs/cifs/cifsglob.h:2217:35: note: in expansion of macro 'virt_to_page'
2217 | sg_set_page(sg++, virt_to_page(addr), buflen, off);
| ^~~~~~~~~~~~
arch/arc/include/asm/page.h:124:53: note: expected 'const void *' but argument is of type 'long unsigned int'
124 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
during RTL pass: mach
fs/cifs/connect.c: In function 'reconn_set_ipaddr_from_hostname':
fs/cifs/connect.c:129:1: internal compiler error: in arc_ifcvt, at config/arc/arc.cc:9642
129 | }
| ^
0x59b7d9 arc_ifcvt
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:9642
0xdeaf74 arc_reorg
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/config/arc/arc.cc:8424
0xaaab69 execute
/tmp/build-crosstools-gcc-12.1.0-binutils-2.38/gcc/gcc-12.1.0/gcc/reorg.cc:3927
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
..
vim +/virt_to_pfn +2217 fs/cifs/cifsglob.h
f7f291e14dde32 Paulo Alcantara 2022-12-11 2194
f7f291e14dde32 Paulo Alcantara 2022-12-11 2195 /* We can not use the normal sg_set_buf() as we will sometimes pass a
f7f291e14dde32 Paulo Alcantara 2022-12-11 2196 * stack object as buf.
f7f291e14dde32 Paulo Alcantara 2022-12-11 2197 */
f7f291e14dde32 Paulo Alcantara 2022-12-11 2198 static inline struct scatterlist *cifs_sg_set_buf(struct scatterlist *sg,
f7f291e14dde32 Paulo Alcantara 2022-12-11 2199 const void *buf,
f7f291e14dde32 Paulo Alcantara 2022-12-11 2200 unsigned int buflen)
f7f291e14dde32 Paulo Alcantara 2022-12-11 2201 {
f7f291e14dde32 Paulo Alcantara 2022-12-11 2202 unsigned long addr = (unsigned long)buf;
f7f291e14dde32 Paulo Alcantara 2022-12-11 2203 unsigned int off = offset_in_page(addr);
f7f291e14dde32 Paulo Alcantara 2022-12-11 2204
f7f291e14dde32 Paulo Alcantara 2022-12-11 2205 addr &= PAGE_MASK;
f7f291e14dde32 Paulo Alcantara 2022-12-11 2206 if (unlikely(is_vmalloc_addr((void *)addr))) {
f7f291e14dde32 Paulo Alcantara 2022-12-11 2207 do {
f7f291e14dde32 Paulo Alcantara 2022-12-11 2208 unsigned int len = min_t(unsigned int, buflen, PAGE_SIZE - off);
f7f291e14dde32 Paulo Alcantara 2022-12-11 2209
f7f291e14dde32 Paulo Alcantara 2022-12-11 2210 sg_set_page(sg++, vmalloc_to_page((void *)addr), len, off);
f7f291e14dde32 Paulo Alcantara 2022-12-11 2211
f7f291e14dde32 Paulo Alcantara 2022-12-11 2212 off = 0;
f7f291e14dde32 Paulo Alcantara 2022-12-11 2213 addr += PAGE_SIZE;
f7f291e14dde32 Paulo Alcantara 2022-12-11 2214 buflen -= len;
f7f291e14dde32 Paulo Alcantara 2022-12-11 2215 } while (buflen);
f7f291e14dde32 Paulo Alcantara 2022-12-11 2216 } else {
f7f291e14dde32 Paulo Alcantara 2022-12-11 @2217 sg_set_page(sg++, virt_to_page(addr), buflen, off);
f7f291e14dde32 Paulo Alcantara 2022-12-11 2218 }
f7f291e14dde32 Paulo Alcantara 2022-12-11 2219 return sg;
f7f291e14dde32 Paulo Alcantara 2022-12-11 2220 }
f7f291e14dde32 Paulo Alcantara 2022-12-11 2221
:::::: The code at line 2217 was first introduced by commit
:::::: f7f291e14dde32a07b1f0aa06921d28f875a7b54 cifs: fix oops during encryption
:::::: TO: Paulo Alcantara <pc at cjr.nz>
:::::: CC: Steve French <stfrench at microsoft.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
More information about the linux-snps-arc
mailing list