[ti:ti-rt-linux-5.10.y 3375/3400] drivers/rpmsg/virtio_rpmsg_bus.c:893:58: sparse: sparse: incorrect type in argument 2 (different base types)
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 921d9bfc28005a87544f765199650381d0fb53b8
commit: 7e3ea0d62a4bf0ca04be9bc320d13f564aab0a92 [3375/3400] TEMP: rpmsg: add a description field
config: x86_64-randconfig-s022-20210313 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout 7e3ea0d62a4bf0ca04be9bc320d13f564aab0a92
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/rpmsg/virtio_rpmsg_bus.c:893:58: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __virtio32 [usertype] val @@ got unsigned int [usertype] addr @@
drivers/rpmsg/virtio_rpmsg_bus.c:893:58: sparse: expected restricted __virtio32 [usertype] val
drivers/rpmsg/virtio_rpmsg_bus.c:893:58: sparse: got unsigned int [usertype] addr
>> drivers/rpmsg/virtio_rpmsg_bus.c:894:59: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __virtio32 [usertype] val @@ got unsigned int [usertype] flags @@
drivers/rpmsg/virtio_rpmsg_bus.c:894:59: sparse: expected restricted __virtio32 [usertype] val
drivers/rpmsg/virtio_rpmsg_bus.c:894:59: sparse: got unsigned int [usertype] flags
vim +893 drivers/rpmsg/virtio_rpmsg_bus.c
887
888 if (len == sizeof(*msg)) {
889 addr = virtio32_to_cpu(vrp->vdev, msg->addr);
890 flags = virtio32_to_cpu(vrp->vdev, msg->flags);
891 chinfo.desc[0] = '\0';
892 } else if (len == sizeof(*msg_ext)) {
> 893 addr = virtio32_to_cpu(vrp->vdev, msg_ext->addr);
> 894 flags = virtio32_to_cpu(vrp->vdev, msg_ext->flags);
895 msg_ext->desc[RPMSG_NAME_SIZE - 1] = '\0';
896 strncpy(chinfo.desc, msg_ext->desc, sizeof(chinfo.desc));
897 } else {
898 dev_err(dev, "malformed ns msg (%d)\n", len);
899 return -EINVAL;
900 }
901
902 /*
903 * the name service ept does _not_ belong to a real rpmsg channel,
904 * and is handled by the rpmsg bus itself.
905 * for sanity reasons, make sure a valid rpdev has _not_ sneaked
906 * in somehow.
907 */
908 if (rpdev) {
909 dev_err(dev, "anomaly: ns ept has an rpdev handle\n");
910 return -EINVAL;
911 }
912
913 /* don't trust the remote processor for null terminating the name */
914 msg->name[RPMSG_NAME_SIZE - 1] = '\0';
915
916 strncpy(chinfo.name, msg->name, sizeof(chinfo.name));
917 chinfo.src = RPMSG_ADDR_ANY;
918 chinfo.dst = addr;
919
920 dev_info(dev, "%sing channel %s addr 0x%x\n",
921 flags & RPMSG_NS_DESTROY ?
922 "destroy" : "creat", msg->name, chinfo.dst);
923
924 if (flags & RPMSG_NS_DESTROY) {
925 ret = rpmsg_unregister_device(&vrp->vdev->dev, &chinfo);
926 if (ret)
927 dev_err(dev, "rpmsg_destroy_channel failed: %d\n", ret);
928 } else {
929 newch = rpmsg_create_channel(vrp, &chinfo);
930 if (!newch)
931 dev_err(dev, "rpmsg_create_channel failed\n");
932 }
933
934 return 0;
935 }
936
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-rt-devel:linux-5.12.y-rt-rebase 165/191] include/linux/entry-common.h:62:3: error: '_TIF_NEED_RESCHED_MASK' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.12.y-rt-rebase
head: ae0700ef2de03e51d49515f06447c1318a4f0843
commit: 9aaf36ff13a40708994eda539e935f4ee1be4442 [165/191] x86: Support for lazy preemption
config: s390-allyesconfig (attached as .config)
compiler: s390-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://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/com...
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.12.y-rt-rebase
git checkout 9aaf36ff13a40708994eda539e935f4ee1be4442
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
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 kernel/entry/common.c:4:
kernel/entry/common.c: In function 'exit_to_user_mode_loop':
>> include/linux/entry-common.h:62:3: error: '_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean 'TIF_NEED_RESCHED'?
62 | _TIF_NEED_RESCHED_MASK | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c:157:19: note: in expansion of macro 'EXIT_TO_USER_MODE_WORK'
157 | while (ti_work & EXIT_TO_USER_MODE_WORK) {
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:62:3: note: each undeclared identifier is reported only once for each function it appears in
62 | _TIF_NEED_RESCHED_MASK | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c:157:19: note: in expansion of macro 'EXIT_TO_USER_MODE_WORK'
157 | while (ti_work & EXIT_TO_USER_MODE_WORK) {
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/bits.h:22,
from arch/s390/include/asm/ptrace.h:10,
from arch/s390/include/asm/lowcore.h:13,
from arch/s390/include/asm/current.h:13,
from include/linux/sched.h:12,
from include/linux/context_tracking.h:5,
from kernel/entry/common.c:3:
kernel/entry/common.c: In function 'exit_to_user_mode_prepare':
>> include/linux/entry-common.h:62:3: error: '_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean 'TIF_NEED_RESCHED'?
62 | _TIF_NEED_RESCHED_MASK | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
kernel/entry/common.c:215:25: note: in expansion of macro 'EXIT_TO_USER_MODE_WORK'
215 | if (unlikely(ti_work & EXIT_TO_USER_MODE_WORK))
| ^~~~~~~~~~~~~~~~~~~~~~
vim +62 include/linux/entry-common.h
59
60 #define EXIT_TO_USER_MODE_WORK \
61 (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_UPROBE | \
> 62 _TIF_NEED_RESCHED_MASK | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \
63 ARCH_EXIT_TO_USER_MODE_WORK)
64
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-rt-devel:linux-5.12.y-rt-rebase 165/191] kernel/entry/common.c:157:19: error: use of undeclared identifier '_TIF_NEED_RESCHED_MASK'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.12.y-rt-rebase
head: ae0700ef2de03e51d49515f06447c1318a4f0843
commit: 9aaf36ff13a40708994eda539e935f4ee1be4442 [165/191] x86: Support for lazy preemption
config: s390-randconfig-r005-20210312 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7b153b43d3a14d76975039408c4b922beb576735)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/com...
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.12.y-rt-rebase
git checkout 9aaf36ff13a40708994eda539e935f4ee1be4442
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from kernel/entry/common.c:4:
In file included from include/linux/entry-common.h:6:
In file included from include/linux/tracehook.h:50:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from kernel/entry/common.c:4:
In file included from include/linux/entry-common.h:6:
In file included from include/linux/tracehook.h:50:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from kernel/entry/common.c:4:
In file included from include/linux/entry-common.h:6:
In file included from include/linux/tracehook.h:50:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from kernel/entry/common.c:4:
In file included from include/linux/entry-common.h:6:
In file included from include/linux/tracehook.h:50:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> kernel/entry/common.c:157:19: error: use of undeclared identifier '_TIF_NEED_RESCHED_MASK'
while (ti_work & EXIT_TO_USER_MODE_WORK) {
^
include/linux/entry-common.h:62:3: note: expanded from macro 'EXIT_TO_USER_MODE_WORK'
_TIF_NEED_RESCHED_MASK | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \
^
kernel/entry/common.c:161:17: error: use of undeclared identifier '_TIF_NEED_RESCHED_MASK'
if (ti_work & _TIF_NEED_RESCHED_MASK)
^
kernel/entry/common.c:215:25: error: use of undeclared identifier '_TIF_NEED_RESCHED_MASK'
if (unlikely(ti_work & EXIT_TO_USER_MODE_WORK))
^
include/linux/entry-common.h:62:3: note: expanded from macro 'EXIT_TO_USER_MODE_WORK'
_TIF_NEED_RESCHED_MASK | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \
^
20 warnings and 3 errors generated.
vim +/_TIF_NEED_RESCHED_MASK +157 kernel/entry/common.c
a9f3a74a29af09 Thomas Gleixner 2020-07-22 149
a9f3a74a29af09 Thomas Gleixner 2020-07-22 150 static unsigned long exit_to_user_mode_loop(struct pt_regs *regs,
a9f3a74a29af09 Thomas Gleixner 2020-07-22 151 unsigned long ti_work)
a9f3a74a29af09 Thomas Gleixner 2020-07-22 152 {
a9f3a74a29af09 Thomas Gleixner 2020-07-22 153 /*
a9f3a74a29af09 Thomas Gleixner 2020-07-22 154 * Before returning to user space ensure that all pending work
a9f3a74a29af09 Thomas Gleixner 2020-07-22 155 * items have been completed.
a9f3a74a29af09 Thomas Gleixner 2020-07-22 156 */
a9f3a74a29af09 Thomas Gleixner 2020-07-22 @157 while (ti_work & EXIT_TO_USER_MODE_WORK) {
a9f3a74a29af09 Thomas Gleixner 2020-07-22 158
a9f3a74a29af09 Thomas Gleixner 2020-07-22 159 local_irq_enable_exit_to_user(ti_work);
a9f3a74a29af09 Thomas Gleixner 2020-07-22 160
9aaf36ff13a407 Thomas Gleixner 2012-11-01 161 if (ti_work & _TIF_NEED_RESCHED_MASK)
a9f3a74a29af09 Thomas Gleixner 2020-07-22 162 schedule();
a9f3a74a29af09 Thomas Gleixner 2020-07-22 163
:::::: The code at line 157 was first introduced by commit
:::::: a9f3a74a29af095f3e1b89e9176f8127912ae0f0 entry: Provide generic syscall exit function
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[ardb:arm64-ro-page-tables-pkvm 25/26] mm/huge_memory.c:2031:35: error: 'pgtable_t' (aka 'pte_t and 'struct page are not pointers to compatible types
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm64-ro-page-tables-pkvm
head: 425e4c538636c6eee64a70caec0deadf0182c36d
commit: 94092d3df6c5818ae5cfed7e6ceda14c0799161d [25/26] mm: HACK provide target address when migrating a PMD entry
config: s390-randconfig-r032-20210312 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7b153b43d3a14d76975039408c4b922beb576735)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id...
git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm64-ro-page-tables-pkvm
git checkout 94092d3df6c5818ae5cfed7e6ceda14c0799161d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from mm/huge_memory.c:15:
In file included from include/linux/rmap.h:12:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from mm/huge_memory.c:15:
In file included from include/linux/rmap.h:12:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from mm/huge_memory.c:15:
In file included from include/linux/rmap.h:12:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from mm/huge_memory.c:15:
In file included from include/linux/rmap.h:12:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> mm/huge_memory.c:2031:35: error: 'pgtable_t' (aka 'pte_t *') and 'struct page *' are not pointers to compatible types
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/include/asm/page.h:173:40: note: expanded from macro 'page_to_phys'
#define page_to_phys(page) pfn_to_phys(page_to_pfn(page))
^~~~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: expanded from macro 'page_to_pfn'
#define page_to_pfn __page_to_pfn
^
include/asm-generic/memory_model.h:55:52: note: expanded from macro '__page_to_pfn'
#define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
^ ~~~~~~~
arch/s390/include/asm/page.h:170:28: note: expanded from macro 'pfn_to_phys'
#define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
^~~
arch/s390/include/asm/page.h:98:37: note: expanded from macro '__pmd'
#define __pmd(x) ((pmd_t) { (x) } )
^
mm/huge_memory.c:2031:59: error: use of undeclared identifier 'PMD_TYPE_TABLE'
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
^
mm/huge_memory.c:2198:35: error: 'pgtable_t' (aka 'pte_t *') and 'struct page *' are not pointers to compatible types
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/include/asm/page.h:173:40: note: expanded from macro 'page_to_phys'
#define page_to_phys(page) pfn_to_phys(page_to_pfn(page))
^~~~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: expanded from macro 'page_to_pfn'
#define page_to_pfn __page_to_pfn
^
include/asm-generic/memory_model.h:55:52: note: expanded from macro '__page_to_pfn'
#define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
^ ~~~~~~~
arch/s390/include/asm/page.h:170:28: note: expanded from macro 'pfn_to_phys'
#define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
^~~
arch/s390/include/asm/page.h:98:37: note: expanded from macro '__pmd'
#define __pmd(x) ((pmd_t) { (x) } )
^
mm/huge_memory.c:2198:59: error: use of undeclared identifier 'PMD_TYPE_TABLE'
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
^
20 warnings and 4 errors generated.
vim +2031 mm/huge_memory.c
1998
1999 static void __split_huge_zero_page_pmd(struct vm_area_struct *vma,
2000 unsigned long haddr, pmd_t *pmd)
2001 {
2002 struct mm_struct *mm = vma->vm_mm;
2003 pgtable_t pgtable;
2004 pmd_t _pmd;
2005 int i;
2006
2007 /*
2008 * Leave pmd empty until pte is filled note that it is fine to delay
2009 * notification until mmu_notifier_invalidate_range_end() as we are
2010 * replacing a zero pmd write protected page with a zero pte write
2011 * protected page.
2012 *
2013 * See Documentation/vm/mmu_notifier.rst
2014 */
2015 pmdp_huge_clear_flush(vma, haddr, pmd);
2016
2017 pgtable = pgtable_trans_huge_withdraw(mm, pmd);
2018 pmd_populate(mm, &_pmd, pgtable);
2019
2020 for (i = 0; i < HPAGE_PMD_NR; i++, haddr += PAGE_SIZE) {
2021 pte_t *pte, entry;
2022 entry = pfn_pte(my_zero_pfn(haddr), vma->vm_page_prot);
2023 entry = pte_mkspecial(entry);
2024 pte = pte_offset_map(&_pmd, haddr);
2025 VM_BUG_ON(!pte_none(*pte));
2026 set_pte_at(mm, haddr, pte, entry);
2027 pte_unmap(pte);
2028 }
2029 smp_wmb(); /* make pte visible before pmd */
2030 //pmd_populate(mm, pmd, pgtable);
> 2031 set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
2032 }
2033
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
arch/arm64/kvm/vgic/vgic.c:476 kvm_vgic_inject_irq() warn: inconsistent returns '&irq->irq_lock'.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f78d76e72a4671ea52d12752d92077788b4f5d50
commit: 9ed24f4b712b855dcf7be3025b75b051cb73a2b7 KVM: arm64: Move virt/kvm/arm to arch/arm64
date: 10 months ago
config: arm64-randconfig-m031-20210312 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
arch/arm64/kvm/vgic/vgic.c:476 kvm_vgic_inject_irq() warn: inconsistent returns '&irq->irq_lock'.
arch/arm64/kvm/vgic/vgic.c:476 kvm_vgic_inject_irq() warn: inconsistent returns 'flags'.
arch/arm64/kvm/vgic/vgic-v3.c:394 vgic_v3_save_pending_tables() error: uninitialized symbol 'val'.
arch/arm64/kvm/vgic/vgic-its.c:311 update_lpi_config() warn: inconsistent returns '&irq->irq_lock'.
arch/arm64/kvm/vgic/vgic-its.c:311 update_lpi_config() warn: inconsistent returns 'flags'.
arch/arm64/kvm/vgic/vgic-its.c:466 its_sync_lpi_pending_table() error: uninitialized symbol 'pendmask'.
vim +476 arch/arm64/kvm/vgic/vgic.c
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 419
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 420 /**
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 421 * kvm_vgic_inject_irq - Inject an IRQ from a device to the vgic
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 422 * @kvm: The VM structure pointer
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 423 * @cpuid: The CPU for PPIs
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 424 * @intid: The INTID to inject a new state to.
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 425 * @level: Edge-triggered: true: to trigger the interrupt
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 426 * false: to ignore the call
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 427 * Level-sensitive true: raise the input signal
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 428 * false: lower the input signal
cb3f0ad881a6ce virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-05-16 429 * @owner: The opaque pointer to the owner of the IRQ being raised to verify
cb3f0ad881a6ce virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-05-16 430 * that the caller is allowed to inject this IRQ. Userspace
cb3f0ad881a6ce virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-05-16 431 * injections will have owner == NULL.
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 432 *
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 433 * The VGIC is not concerned with devices being active-LOW or active-HIGH for
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 434 * level-sensitive interrupts. You can think of the level parameter as 1
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 435 * being HIGH and 0 being LOW and all devices being active-HIGH.
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 436 */
11710dec8a4508 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-02-01 437 int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid, unsigned int intid,
cb3f0ad881a6ce virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-05-16 438 bool level, void *owner)
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 439 {
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 440 struct kvm_vcpu *vcpu;
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 441 struct vgic_irq *irq;
006df0f34930e1 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2016-10-16 442 unsigned long flags;
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 443 int ret;
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 444
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 445 trace_vgic_update_irq_pending(cpuid, intid, level);
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 446
ad275b8bb1e659 virt/kvm/arm/vgic/vgic.c Eric Auger 2015-12-21 447 ret = vgic_lazy_init(kvm);
ad275b8bb1e659 virt/kvm/arm/vgic/vgic.c Eric Auger 2015-12-21 448 if (ret)
ad275b8bb1e659 virt/kvm/arm/vgic/vgic.c Eric Auger 2015-12-21 449 return ret;
ad275b8bb1e659 virt/kvm/arm/vgic/vgic.c Eric Auger 2015-12-21 450
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 451 vcpu = kvm_get_vcpu(kvm, cpuid);
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 452 if (!vcpu && intid < VGIC_NR_PRIVATE_IRQS)
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 453 return -EINVAL;
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 454
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 455 irq = vgic_get_irq(kvm, vcpu, intid);
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 456 if (!irq)
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 457 return -EINVAL;
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 458
8fa3adb8c6beee virt/kvm/arm/vgic/vgic.c Julien Thierry 2019-01-07 459 raw_spin_lock_irqsave(&irq->irq_lock, flags);
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 460
cb3f0ad881a6ce virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-05-16 461 if (!vgic_validate_injection(irq, level, owner)) {
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 462 /* Nothing to see here, move along... */
8fa3adb8c6beee virt/kvm/arm/vgic/vgic.c Julien Thierry 2019-01-07 463 raw_spin_unlock_irqrestore(&irq->irq_lock, flags);
5dd4b924e390af virt/kvm/arm/vgic/vgic.c Andre Przywara 2016-07-15 464 vgic_put_irq(kvm, irq);
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 465 return 0;
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 466 }
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 467
8694e4da66a636 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-01-23 468 if (irq->config == VGIC_CONFIG_LEVEL)
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 469 irq->line_level = level;
8694e4da66a636 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-01-23 470 else
8694e4da66a636 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2017-01-23 471 irq->pending_latch = true;
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 472
006df0f34930e1 virt/kvm/arm/vgic/vgic.c Christoffer Dall 2016-10-16 473 vgic_queue_irq_unlock(kvm, irq, flags);
5dd4b924e390af virt/kvm/arm/vgic/vgic.c Andre Przywara 2016-07-15 474 vgic_put_irq(kvm, irq);
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 475
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 @476 return 0;
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 477 }
81eeb95ddbabbb virt/kvm/arm/vgic/vgic.c Christoffer Dall 2015-11-25 478
:::::: The code at line 476 was first introduced by commit
:::::: 81eeb95ddbabbb998a6b39f762bc7edaa2a979b4 KVM: arm/arm64: vgic-new: Implement virtual IRQ injection
:::::: TO: Christoffer Dall <christoffer.dall(a)linaro.org>
:::::: CC: Christoffer Dall <christoffer.dall(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months