[arnd-playground:set_fs 6/11] arch/arc/kernel/process.c:63:15: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git set_fs
head: 2a0bc55bf1de54742196464620860bbc46592f11
commit: e7e49ac844a31b9eebb95e85b0e20696aa646280 [6/11] uaccess: generalize access_ok()
config: arc-randconfig-s031-20220213 (https://download.01.org/0day-ci/archive/20220214/202202140815.nUkV6yfz-lk...)
compiler: arc-elf-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground set_fs
git checkout e7e49ac844a31b9eebb95e85b0e20696aa646280
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash arch/arc/kernel/
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 >>)
>> arch/arc/kernel/process.c:63:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got int *uaddr @@
arch/arc/kernel/process.c:63:15: sparse: expected void const [noderef] __user *ptr
arch/arc/kernel/process.c:63:15: sparse: got int *uaddr
arch/arc/kernel/process.c:70:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int *uaddr @@
arch/arc/kernel/process.c:70:15: sparse: expected void const volatile [noderef] __user *ptr
arch/arc/kernel/process.c:70:15: sparse: got int *uaddr
arch/arc/kernel/process.c:77:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int *uaddr @@
arch/arc/kernel/process.c:77:15: sparse: expected void const volatile [noderef] __user *ptr
arch/arc/kernel/process.c:77:15: sparse: got int *uaddr
vim +63 arch/arc/kernel/process.c
bf90e1eab682dc Vineet Gupta 2013-01-18 45
91e040a79df73d Vineet Gupta 2016-10-20 46 SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
91e040a79df73d Vineet Gupta 2016-10-20 47 {
e6e335bf3a400b Vineet Gupta 2016-11-07 48 struct pt_regs *regs = current_pt_regs();
e8708786d4fe21 Peter Zijlstra 2018-06-19 49 u32 uval;
e8708786d4fe21 Peter Zijlstra 2018-06-19 50 int ret;
91e040a79df73d Vineet Gupta 2016-10-20 51
91e040a79df73d Vineet Gupta 2016-10-20 52 /*
f79f7a2d96769d Bhaskar Chowdhury 2021-03-22 53 * This is only for old cores lacking LLOCK/SCOND, which by definition
91e040a79df73d Vineet Gupta 2016-10-20 54 * can't possibly be SMP. Thus doesn't need to be SMP safe.
91e040a79df73d Vineet Gupta 2016-10-20 55 * And this also helps reduce the overhead for serializing in
91e040a79df73d Vineet Gupta 2016-10-20 56 * the UP case
91e040a79df73d Vineet Gupta 2016-10-20 57 */
91e040a79df73d Vineet Gupta 2016-10-20 58 WARN_ON_ONCE(IS_ENABLED(CONFIG_SMP));
91e040a79df73d Vineet Gupta 2016-10-20 59
f79f7a2d96769d Bhaskar Chowdhury 2021-03-22 60 /* Z indicates to userspace if operation succeeded */
e6e335bf3a400b Vineet Gupta 2016-11-07 61 regs->status32 &= ~STATUS_Z_MASK;
e6e335bf3a400b Vineet Gupta 2016-11-07 62
96d4f267e40f95 Linus Torvalds 2019-01-03 @63 ret = access_ok(uaddr, sizeof(*uaddr));
e8708786d4fe21 Peter Zijlstra 2018-06-19 64 if (!ret)
e8708786d4fe21 Peter Zijlstra 2018-06-19 65 goto fail;
91e040a79df73d Vineet Gupta 2016-10-20 66
e8708786d4fe21 Peter Zijlstra 2018-06-19 67 again:
91e040a79df73d Vineet Gupta 2016-10-20 68 preempt_disable();
91e040a79df73d Vineet Gupta 2016-10-20 69
e8708786d4fe21 Peter Zijlstra 2018-06-19 70 ret = __get_user(uval, uaddr);
e8708786d4fe21 Peter Zijlstra 2018-06-19 71 if (ret)
e8708786d4fe21 Peter Zijlstra 2018-06-19 72 goto fault;
e8708786d4fe21 Peter Zijlstra 2018-06-19 73
e8708786d4fe21 Peter Zijlstra 2018-06-19 74 if (uval != expected)
e8708786d4fe21 Peter Zijlstra 2018-06-19 75 goto out;
e8708786d4fe21 Peter Zijlstra 2018-06-19 76
e8708786d4fe21 Peter Zijlstra 2018-06-19 77 ret = __put_user(new, uaddr);
e8708786d4fe21 Peter Zijlstra 2018-06-19 78 if (ret)
e8708786d4fe21 Peter Zijlstra 2018-06-19 79 goto fault;
91e040a79df73d Vineet Gupta 2016-10-20 80
e6e335bf3a400b Vineet Gupta 2016-11-07 81 regs->status32 |= STATUS_Z_MASK;
91e040a79df73d Vineet Gupta 2016-10-20 82
e8708786d4fe21 Peter Zijlstra 2018-06-19 83 out:
91e040a79df73d Vineet Gupta 2016-10-20 84 preempt_enable();
e6e335bf3a400b Vineet Gupta 2016-11-07 85 return uval;
e8708786d4fe21 Peter Zijlstra 2018-06-19 86
e8708786d4fe21 Peter Zijlstra 2018-06-19 87 fault:
e8708786d4fe21 Peter Zijlstra 2018-06-19 88 preempt_enable();
e8708786d4fe21 Peter Zijlstra 2018-06-19 89
e8708786d4fe21 Peter Zijlstra 2018-06-19 90 if (unlikely(ret != -EFAULT))
e8708786d4fe21 Peter Zijlstra 2018-06-19 91 goto fail;
e8708786d4fe21 Peter Zijlstra 2018-06-19 92
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 93 mmap_read_lock(current->mm);
64019a2e467a28 Peter Xu 2020-08-11 94 ret = fixup_user_fault(current->mm, (unsigned long) uaddr,
e8708786d4fe21 Peter Zijlstra 2018-06-19 95 FAULT_FLAG_WRITE, NULL);
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 96 mmap_read_unlock(current->mm);
e8708786d4fe21 Peter Zijlstra 2018-06-19 97
e8708786d4fe21 Peter Zijlstra 2018-06-19 98 if (likely(!ret))
e8708786d4fe21 Peter Zijlstra 2018-06-19 99 goto again;
e8708786d4fe21 Peter Zijlstra 2018-06-19 100
e8708786d4fe21 Peter Zijlstra 2018-06-19 101 fail:
3cf5d076fb4d48 Eric W. Biederman 2019-05-23 102 force_sig(SIGSEGV);
e8708786d4fe21 Peter Zijlstra 2018-06-19 103 return ret;
91e040a79df73d Vineet Gupta 2016-10-20 104 }
91e040a79df73d Vineet Gupta 2016-10-20 105
:::::: The code at line 63 was first introduced by commit
:::::: 96d4f267e40f9509e8a66e2b39e8b95655617693 Remove 'type' argument from access_ok() function
:::::: TO: Linus Torvalds <torvalds(a)linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH v9 1/1] ceph: add getvxattr op
by kernel test robot
Hi Milind,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on ceph-client/for-linus]
[also build test ERROR on v5.17-rc4 next-20220211]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Milind-Changire/ceph-add-getvxat...
base: https://github.com/ceph/ceph-client.git for-linus
config: arc-randconfig-r043-20220213 (https://download.01.org/0day-ci/archive/20220214/202202140832.lVpTfiK0-lk...)
compiler: arc-elf-gcc (GCC) 11.2.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/0day-ci/linux/commit/a3c4729dbc82d1234f75f72b863709bda...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Milind-Changire/ceph-add-getvxattr-support/20220211-201353
git checkout a3c4729dbc82d1234f75f72b863709bdab51ce99
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash fs/ceph/
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 >>):
fs/ceph/mds_client.c: In function 'parse_reply_info_getvxattr':
>> fs/ceph/mds_client.c:563:13: error: variable 'struct_len' set but not used [-Werror=unused-but-set-variable]
563 | u32 struct_len;
| ^~~~~~~~~~
>> fs/ceph/mds_client.c:562:22: error: variable 'struct_compat' set but not used [-Werror=unused-but-set-variable]
562 | u8 struct_v, struct_compat;
| ^~~~~~~~~~~~~
>> fs/ceph/mds_client.c:562:12: error: variable 'struct_v' set but not used [-Werror=unused-but-set-variable]
562 | u8 struct_v, struct_compat;
| ^~~~~~~~
cc1: all warnings being treated as errors
vim +/struct_len +563 fs/ceph/mds_client.c
557
558 static int parse_reply_info_getvxattr(void **p, void *end,
559 struct ceph_mds_reply_info_parsed *info,
560 u64 features)
561 {
> 562 u8 struct_v, struct_compat;
> 563 u32 struct_len;
564 u32 value_len;
565
566 ceph_decode_8_safe(p, end, struct_v, bad);
567 ceph_decode_8_safe(p, end, struct_compat, bad);
568 ceph_decode_32_safe(p, end, struct_len, bad);
569 ceph_decode_32_safe(p, end, value_len, bad);
570
571 if (value_len == end - *p) {
572 info->xattr_info.xattr_value = *p;
573 info->xattr_info.xattr_value_len = value_len;
574 *p = end;
575 return value_len;
576 }
577 bad:
578 return -EIO;
579 }
580
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[linux-next:master 2763/5417] drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c:74:24: error: variable 'len' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 6d9bd4ad4ca08b1114e814c2c42383b8b13be631
commit: 9cf6d7f2c5549b47e0dbf09fd64557a4a69cbd28 [2763/5417] brcmfmac: of: Use devm_kstrdup for board_type & check for errors
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220214/202202140726.ktvzMGFl-lk...)
compiler: arceb-elf-gcc (GCC) 11.2.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/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 9cf6d7f2c5549b47e0dbf09fd64557a4a69cbd28
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the linux-next/master HEAD 6d9bd4ad4ca08b1114e814c2c42383b8b13be631 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c: In function 'brcmf_of_probe':
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c:74:24: error: variable 'len' set but not used [-Werror=unused-but-set-variable]
74 | int i, len;
| ^~~
cc1: all warnings being treated as errors
vim +/len +74 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
1a3ac5c651a0c8 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Shawn Guo 2021-04-17 60
e457a8a01a1927 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Rafał Miłecki 2017-01-07 61 void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
e457a8a01a1927 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Rafał Miłecki 2017-01-07 62 struct brcmf_mp_device *settings)
61f663dfc1a091 drivers/net/wireless/brcm80211/brcmfmac/of.c Chen-Yu Tsai 2014-06-29 63 {
e457a8a01a1927 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Rafał Miłecki 2017-01-07 64 struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio;
0ad4b55b2f2978 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Hans de Goede 2018-10-10 65 struct device_node *root, *np = dev->of_node;
61f663dfc1a091 drivers/net/wireless/brcm80211/brcmfmac/of.c Chen-Yu Tsai 2014-06-29 66 int irq;
1a3ac5c651a0c8 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Shawn Guo 2021-04-17 67 int err;
61f663dfc1a091 drivers/net/wireless/brcm80211/brcmfmac/of.c Chen-Yu Tsai 2014-06-29 68 u32 irqf;
61f663dfc1a091 drivers/net/wireless/brcm80211/brcmfmac/of.c Chen-Yu Tsai 2014-06-29 69 u32 val;
61f663dfc1a091 drivers/net/wireless/brcm80211/brcmfmac/of.c Chen-Yu Tsai 2014-06-29 70
0ad4b55b2f2978 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Hans de Goede 2018-10-10 71 /* Set board-type to the first string of the machine compatible prop */
0ad4b55b2f2978 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Hans de Goede 2018-10-10 72 root = of_find_node_by_path("/");
0ad4b55b2f2978 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Hans de Goede 2018-10-10 73 if (root) {
29e354ebeeecae drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c Matthias Brugger 2020-07-01 @74 int i, len;
:::::: The code at line 74 was first introduced by commit
:::::: 29e354ebeeecaee979e6fe22cd6272682d7552c9 brcmfmac: Transform compatible string for FW loading
:::::: TO: Matthias Brugger <mbrugger(a)suse.com>
:::::: CC: Kalle Valo <kvalo(a)codeaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week