Re: [PATCH net-next v6 1/3] net: flow_dissector: extend bpf flow dissector support with vnet hdr
by kernel test robot
Hi Tanner,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Tanner-Love/virtio_net-add-optio...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git c7654495916e109f76a67fd3ae68f8fa70ab4faa
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/7d159f648961a7849f67e1c3d7ecb3d18...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tanner-Love/virtio_net-add-optional-flow-dissection-in-virtio_net_hdr_to_skb/20210616-193224
git checkout 7d159f648961a7849f67e1c3d7ecb3d18bf5c7c2
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> net/core/filter.c:8334:5: warning: no previous prototype for 'check_flow_keys_access' [-Wmissing-prototypes]
8334 | int check_flow_keys_access(int off, int size, enum bpf_access_type t,
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/check_flow_keys_access +8334 net/core/filter.c
8333
> 8334 int check_flow_keys_access(int off, int size, enum bpf_access_type t,
8335 struct bpf_insn_access_aux *info)
8336 {
8337 if (size < 0 || off < 0 ||
8338 (u64)off + size > sizeof(struct bpf_flow_keys))
8339 return -EACCES;
8340
8341 switch (off) {
8342 case bpf_ctx_range_ptr(struct bpf_flow_keys, vhdr):
8343 if (t == BPF_WRITE || off % size != 0 || size != sizeof(__u64))
8344 return -EACCES;
8345
8346 if (!bpf_flow_dissector_btf_ids[0])
8347 return -EINVAL;
8348
8349 info->btf_id = bpf_flow_dissector_btf_ids[0];
8350
8351 break;
8352 case offsetof(struct bpf_flow_keys, vhdr_is_little_endian):
8353 if (t == BPF_WRITE)
8354 return -EACCES;
8355
8356 break;
8357 }
8358
8359 return 0;
8360 }
8361
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/usb/serial/cp210x.c:1515:9: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20210616-152150/tu-pham/U...
head: 2231b2167ae347d41d081c3e62492ceb0c93c675
commit: 2231b2167ae347d41d081c3e62492ceb0c93c675 USB: serial: cp210x: add support for GPIOs on CP2108
date: 6 hours ago
config: sparc-randconfig-s032-20210615 (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.3.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.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/2231b2167ae347d41d081c3e62492ceb0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20210616-152150/tu-pham/USB-serial-cp210x-Add-support-for-GPIOs-on-CP2108/20210426-171349
git checkout 2231b2167ae347d41d081c3e62492ceb0c93c675
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=sparc
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/usb/serial/cp210x.c:1515:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] *p @@ got restricted __le16 [usertype] * @@
drivers/usb/serial/cp210x.c:1515:9: sparse: expected unsigned short [usertype] *p
drivers/usb/serial/cp210x.c:1515:9: sparse: got restricted __le16 [usertype] *
vim +1515 drivers/usb/serial/cp210x.c
1477
1478 static int cp210x_gpio_get(struct gpio_chip *gc, unsigned int gpio)
1479 {
1480 struct usb_serial *serial = gpiochip_get_data(gc);
1481 struct cp210x_serial_private *priv = usb_get_serial_data(serial);
1482 u8 req_type;
1483 u16 mask;
1484 int result;
1485 int len;
1486
1487 result = usb_autopm_get_interface(serial->interface);
1488 if (result)
1489 return result;
1490
1491 switch (priv->partnum) {
1492 case CP210X_PARTNUM_CP2105:
1493 req_type = REQTYPE_INTERFACE_TO_HOST;
1494 len = 1;
1495 break;
1496 case CP210X_PARTNUM_CP2108:
1497 req_type = REQTYPE_INTERFACE_TO_HOST;
1498 len = 2;
1499 break;
1500 default:
1501 req_type = REQTYPE_DEVICE_TO_HOST;
1502 len = 1;
1503 break;
1504 }
1505
1506 mask = 0;
1507 result = cp210x_read_vendor_block(serial, req_type, CP210X_READ_LATCH,
1508 &mask, len);
1509
1510 usb_autopm_put_interface(serial->interface);
1511
1512 if (result < 0)
1513 return result;
1514
> 1515 le16_to_cpus((__le16 *)&mask);
1516
1517 return !!(mask & BIT(gpio));
1518 }
1519
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [Intel-gfx] [PATCH 06/31] drm/i915: Drop the CONTEXT_CLONE API (v2)
by kernel test robot
Hi Jason,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next v5.13-rc6 next-20210615]
[cannot apply to drm/drm-next]
[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/Jason-Ekstrand/drm-i915-gem-ioct...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a002-20210616 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/b91148796ca5458a4a8b445e53d711d87...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jason-Ekstrand/drm-i915-gem-ioctl-clean-ups-v6/20210616-151016
git checkout b91148796ca5458a4a8b445e53d711d870391163
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> drivers/gpu/drm/i915/gem/i915_gem_context.c:364:1: error: unused function '__context_engines_static' [-Werror,-Wunused-function]
__context_engines_static(const struct i915_gem_context *ctx)
^
1 error generated.
vim +/__context_engines_static +364 drivers/gpu/drm/i915/gem/i915_gem_context.c
40521054fd46f9 drivers/gpu/drm/i915/i915_gem_context.c Ben Widawsky 2012-06-04 362
2e0986a58cc4f2 drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-23 363 static inline struct i915_gem_engines *
2e0986a58cc4f2 drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-23 @364 __context_engines_static(const struct i915_gem_context *ctx)
2e0986a58cc4f2 drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-23 365 {
2e0986a58cc4f2 drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-23 366 return rcu_dereference_protected(ctx->engines, true);
2e0986a58cc4f2 drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-23 367 }
2e0986a58cc4f2 drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-23 368
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/media/test-drivers/vidtv/vidtv_mux.c:379:13: warning: stack frame size of 3120 bytes in function 'vidtv_mux_tick'
by kernel test robot
Hi Daniel,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 94f0b2d4a1d0c52035aef425da5e022bd2cb1c71
commit: f90cf6079bf67988f8b1ad1ade70fc89d0080905 media: vidtv: add a bridge driver
date: 9 months ago
config: powerpc64-randconfig-r026-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f90cf6079bf67988f8b1ad1ade70fc89d0080905
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/media/test-drivers/vidtv/vidtv_mux.c:18:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:5:
In file included from include/linux/mmdebug.h:5:
In file included from include/linux/bug.h:5:
In file included from arch/powerpc/include/asm/bug.h:109:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:29:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
^
<built-in>:309:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
^
>> drivers/media/test-drivers/vidtv/vidtv_mux.c:379:13: warning: stack frame size of 3120 bytes in function 'vidtv_mux_tick' [-Wframe-larger-than=]
static void vidtv_mux_tick(struct work_struct *work)
^
2 warnings generated.
vim +/vidtv_mux_tick +379 drivers/media/test-drivers/vidtv/vidtv_mux.c
378
> 379 static void vidtv_mux_tick(struct work_struct *work)
380 {
381 struct vidtv_mux *m = container_of(work,
382 struct vidtv_mux,
383 mpeg_thread);
384 u32 nbytes;
385 u32 npkts;
386
387 while (m->streaming) {
388 nbytes = 0;
389
390 vidtv_mux_update_clk(m);
391
392 if (vidtv_mux_should_push_pcr(m))
393 nbytes += vidtv_mux_push_pcr(m);
394
395 if (vidtv_mux_should_push_si(m))
396 nbytes += vidtv_mux_push_si(m);
397
398 nbytes += vidtv_mux_poll_encoders(m);
399 nbytes += vidtv_mux_check_mux_rate(m);
400
401 npkts = nbytes / TS_PACKET_LEN;
402
403 /* if the buffer is not aligned there is a bug somewhere */
404 if (nbytes % TS_PACKET_LEN)
405 pr_err_ratelimited("Misaligned buffer\n");
406
407 if (m->on_new_packets_available_cb)
408 m->on_new_packets_available_cb(m->priv,
409 m->mux_buf,
410 npkts);
411
412 vidtv_mux_clear(m);
413
414 usleep_range(VIDTV_SLEEP_USECS, VIDTV_MAX_SLEEP_USECS);
415 }
416 }
417
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH v27 21/25] audit: add support for non-syscall auxiliary records
by kernel test robot
Hi Casey,
I love your patch! Yet something to improve:
[auto build test ERROR on nf/master]
[also build test ERROR on linus/master v5.13-rc6]
[cannot apply to security/next-testing pcmoore-audit/next nf-next/master next-20210616]
[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/Casey-Schaufler/LSM-Infrastructu...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: s390-randconfig-r022-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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://github.com/0day-ci/linux/commit/c6c28a65377a02c1aa05846e32c56cb01...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Casey-Schaufler/LSM-Infrastructure-management-of-the-sock-security/20210616-133254
git checkout c6c28a65377a02c1aa05846e32c56cb015da9904
# 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 >>):
In file included from fs/proc/base.c:68:
In file included from include/linux/swap.h:9:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from fs/proc/base.c:68:
In file included from include/linux/swap.h:9:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
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:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from fs/proc/base.c:68:
In file included from include/linux/swap.h:9:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
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);
~~~~~~~~~~ ^
In file included from fs/proc/base.c:81:
>> include/linux/audit.h:557:1: error: expected external declaration
+static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
^
12 warnings and 1 error generated.
--
In file included from fs/kernfs/file.c:16:
In file included from include/linux/fsnotify.h:16:
>> include/linux/audit.h:557:1: error: expected external declaration
+static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
^
fs/kernfs/file.c:128:15: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return NULL + !*ppos;
~~~~ ^
1 warning and 1 error generated.
--
In file included from fs/configfs/dir.c:14:
In file included from include/linux/fsnotify.h:16:
>> include/linux/audit.h:557:1: error: expected external declaration
+static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
^
1 error generated.
--
In file included from arch/s390/kernel/ptrace.c:20:
>> include/linux/audit.h:557:1: error: expected external declaration
+static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
^
In file included from arch/s390/kernel/ptrace.c:24:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from arch/s390/kernel/ptrace.c:24:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
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:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from arch/s390/kernel/ptrace.c:24:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
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);
~~~~~~~~~~ ^
12 warnings and 1 error generated.
--
In file included from kernel/module.c:58:
>> include/linux/audit.h:557:1: error: expected external declaration
+static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
^
kernel/module.c:4722:6: warning: no previous prototype for function 'module_layout' [-Wmissing-prototypes]
void module_layout(struct module *mod,
^
kernel/module.c:4722:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void module_layout(struct module *mod,
^
static
1 warning and 1 error generated.
--
In file included from kernel/fork.c:53:
In file included from include/linux/swap.h:9:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from kernel/fork.c:53:
In file included from include/linux/swap.h:9:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
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:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from kernel/fork.c:53:
In file included from include/linux/swap.h:9:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
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);
~~~~~~~~~~ ^
In file included from kernel/fork.c:63:
>> include/linux/audit.h:557:1: error: expected external declaration
+static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
^
kernel/fork.c:751:20: warning: no previous prototype for function 'arch_task_cache_init' [-Wmissing-prototypes]
void __init __weak arch_task_cache_init(void) { }
^
kernel/fork.c:751:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init __weak arch_task_cache_init(void) { }
^
static
13 warnings and 1 error generated.
--
In file included from ipc/msg.c:36:
>> include/linux/audit.h:557:1: error: expected external declaration
+static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
^
ipc/msg.c:496:20: warning: implicit conversion from 'int' to 'unsigned short' changes value from 32768000 to 0 [-Wconstant-conversion]
msginfo->msgseg = MSGSEG;
~ ^~~~~~
include/uapi/linux/msg.h:87:38: note: expanded from macro 'MSGSEG'
#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
^~~~~~~~
include/uapi/linux/msg.h:86:36: note: expanded from macro '__MSGSEG'
#define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */
~~~~~~~~~~~~~~~~~^~~~~~~~
1 warning and 1 error generated.
--
In file included from security/commoncap.c:6:
>> include/linux/audit.h:557:1: error: expected external declaration
+static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
^
In file included from security/commoncap.c:12:
include/linux/mman.h:156:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:133:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
In file included from security/commoncap.c:14:
In file included from include/linux/swap.h:9:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from security/commoncap.c:14:
In file included from include/linux/swap.h:9:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
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:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from security/commoncap.c:14:
In file included from include/linux/swap.h:9:
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:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
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);
~~~~~~~~~~ ^
13 warnings and 1 error generated.
vim +557 include/linux/audit.h
553
554 extern int audit_n_rules;
555 extern int audit_signals;
556 #else /* CONFIG_AUDITSYSCALL */
> 557 +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
558 {
559 return NULL;
560 }
561 static inline void audit_free_context(struct audit_context *context)
562 { }
563 static inline int audit_alloc(struct task_struct *task)
564 {
565 return 0;
566 }
567 static inline void audit_free(struct task_struct *task)
568 { }
569 static inline void audit_syscall_entry(int major, unsigned long a0,
570 unsigned long a1, unsigned long a2,
571 unsigned long a3)
572 { }
573 static inline void audit_syscall_exit(void *pt_regs)
574 { }
575 static inline bool audit_dummy_context(void)
576 {
577 return true;
578 }
579 static inline void audit_set_context(struct task_struct *task, struct audit_context *ctx)
580 { }
581 static inline struct audit_context *audit_context(void)
582 {
583 return NULL;
584 }
585 static inline struct filename *audit_reusename(const __user char *name)
586 {
587 return NULL;
588 }
589 static inline void audit_getname(struct filename *name)
590 { }
591 static inline void audit_inode(struct filename *name,
592 const struct dentry *dentry,
593 unsigned int aflags)
594 { }
595 static inline void audit_file(struct file *file)
596 {
597 }
598 static inline void audit_inode_parent_hidden(struct filename *name,
599 const struct dentry *dentry)
600 { }
601 static inline void audit_inode_child(struct inode *parent,
602 const struct dentry *dentry,
603 const unsigned char type)
604 { }
605 static inline void audit_core_dumps(long signr)
606 { }
607 static inline void audit_seccomp(unsigned long syscall, long signr, int code)
608 { }
609 static inline void audit_seccomp_actions_logged(const char *names,
610 const char *old_names, int res)
611 { }
612 static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
613 { }
614 static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
615 gid_t gid, umode_t mode)
616 { }
617 static inline void audit_bprm(struct linux_binprm *bprm)
618 { }
619 static inline int audit_socketcall(int nargs, unsigned long *args)
620 {
621 return 0;
622 }
623
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH v27 21/25] audit: add support for non-syscall auxiliary records
by kernel test robot
Hi Casey,
I love your patch! Yet something to improve:
[auto build test ERROR on nf/master]
[also build test ERROR on linus/master v5.13-rc6]
[cannot apply to security/next-testing pcmoore-audit/next nf-next/master next-20210616]
[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/Casey-Schaufler/LSM-Infrastructu...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: m68k-randconfig-r021-20210615 (attached as .config)
compiler: m68k-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/0day-ci/linux/commit/c6c28a65377a02c1aa05846e32c56cb01...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Casey-Schaufler/LSM-Infrastructure-management-of-the-sock-security/20210616-133254
git checkout c6c28a65377a02c1aa05846e32c56cb015da9904
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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/fsnotify.h:16,
from fs/configfs/dir.c:14:
>> include/linux/audit.h:557:1: error: expected identifier or '(' before '+' token
557 | +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
| ^
--
In file included from include/linux/fsnotify.h:16,
from fs/cachefiles/namei.c:12:
>> include/linux/audit.h:557:1: error: expected identifier or '(' before '+' token
557 | +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
| ^
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 fs/pipe.c:23:
>> include/linux/audit.h:557:1: error: expected identifier or '(' before '+' token
557 | +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
| ^
fs/pipe.c:741:15: warning: no previous prototype for 'account_pipe_buffers' [-Wmissing-prototypes]
741 | unsigned long account_pipe_buffers(struct user_struct *user,
| ^~~~~~~~~~~~~~~~~~~~
fs/pipe.c:747:6: warning: no previous prototype for 'too_many_pipe_buffers_soft' [-Wmissing-prototypes]
747 | bool too_many_pipe_buffers_soft(unsigned long user_bufs)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fs/pipe.c:754:6: warning: no previous prototype for 'too_many_pipe_buffers_hard' [-Wmissing-prototypes]
754 | bool too_many_pipe_buffers_hard(unsigned long user_bufs)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fs/pipe.c:761:6: warning: no previous prototype for 'pipe_is_unprivileged_user' [-Wmissing-prototypes]
761 | bool pipe_is_unprivileged_user(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
fs/pipe.c:1231:5: warning: no previous prototype for 'pipe_resize_ring' [-Wmissing-prototypes]
1231 | int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots)
| ^~~~~~~~~~~~~~~~
vim +557 include/linux/audit.h
553
554 extern int audit_n_rules;
555 extern int audit_signals;
556 #else /* CONFIG_AUDITSYSCALL */
> 557 +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
558 {
559 return NULL;
560 }
561 static inline void audit_free_context(struct audit_context *context)
562 { }
563 static inline int audit_alloc(struct task_struct *task)
564 {
565 return 0;
566 }
567 static inline void audit_free(struct task_struct *task)
568 { }
569 static inline void audit_syscall_entry(int major, unsigned long a0,
570 unsigned long a1, unsigned long a2,
571 unsigned long a3)
572 { }
573 static inline void audit_syscall_exit(void *pt_regs)
574 { }
575 static inline bool audit_dummy_context(void)
576 {
577 return true;
578 }
579 static inline void audit_set_context(struct task_struct *task, struct audit_context *ctx)
580 { }
581 static inline struct audit_context *audit_context(void)
582 {
583 return NULL;
584 }
585 static inline struct filename *audit_reusename(const __user char *name)
586 {
587 return NULL;
588 }
589 static inline void audit_getname(struct filename *name)
590 { }
591 static inline void audit_inode(struct filename *name,
592 const struct dentry *dentry,
593 unsigned int aflags)
594 { }
595 static inline void audit_file(struct file *file)
596 {
597 }
598 static inline void audit_inode_parent_hidden(struct filename *name,
599 const struct dentry *dentry)
600 { }
601 static inline void audit_inode_child(struct inode *parent,
602 const struct dentry *dentry,
603 const unsigned char type)
604 { }
605 static inline void audit_core_dumps(long signr)
606 { }
607 static inline void audit_seccomp(unsigned long syscall, long signr, int code)
608 { }
609 static inline void audit_seccomp_actions_logged(const char *names,
610 const char *old_names, int res)
611 { }
612 static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
613 { }
614 static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
615 gid_t gid, umode_t mode)
616 { }
617 static inline void audit_bprm(struct linux_binprm *bprm)
618 { }
619 static inline int audit_socketcall(int nargs, unsigned long *args)
620 {
621 return 0;
622 }
623
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[avpatel:riscv_ipi_domain_v1 5/5] do_mounts.c:(.text+0x7c): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
by kernel test robot
tree: https://github.com/avpatel/linux.git riscv_ipi_domain_v1
head: fc99da1943417514801d7a190ca8b1bf1be5bd13
commit: fc99da1943417514801d7a190ca8b1bf1be5bd13 [5/5] RISC-V: Move to IPI domain APIs
config: riscv-allnoconfig (attached as .config)
compiler: riscv64-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/avpatel/linux/commit/fc99da1943417514801d7a190ca8b1bf1...
git remote add avpatel https://github.com/avpatel/linux.git
git fetch --no-tags avpatel riscv_ipi_domain_v1
git checkout fc99da1943417514801d7a190ca8b1bf1be5bd13
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
riscv64-linux-ld: init/do_mounts.o: in function `riscv_ipi_setup':
>> do_mounts.c:(.text+0x7c): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: init/noinitramfs.o: in function `riscv_ipi_setup':
noinitramfs.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: init/init_task.o: in function `riscv_ipi_setup':
init_task.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/soc.o: in function `riscv_ipi_setup':
soc.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/cpu.o: in function `riscv_ipi_setup':
cpu.c:(.text+0x1f0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/cpufeature.o: in function `riscv_ipi_setup':
cpufeature.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/irq.o: in function `riscv_ipi_setup':
irq.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/process.o: in function `riscv_ipi_setup':
process.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/ptrace.o: in function `riscv_ipi_setup':
ptrace.c:(.text+0xf4): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/setup.o: in function `riscv_ipi_setup':
setup.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/signal.o: in function `riscv_ipi_setup':
signal.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/syscall_table.o: in function `riscv_ipi_setup':
syscall_table.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/sys_riscv.o: in function `riscv_ipi_setup':
sys_riscv.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/time.o: in function `riscv_ipi_setup':
time.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/traps.o: in function `riscv_ipi_setup':
traps.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/riscv_ksyms.o: in function `riscv_ipi_setup':
riscv_ksyms.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/stacktrace.o: in function `riscv_ipi_setup':
stacktrace.c:(.text+0x124): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `riscv_ipi_setup':
patch.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/traps_misaligned.o: in function `riscv_ipi_setup':
traps_misaligned.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/kernel/perf_regs.o: in function `riscv_ipi_setup':
perf_regs.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/mm/init.o: in function `riscv_ipi_setup':
init.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/mm/extable.o: in function `riscv_ipi_setup':
extable.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/mm/cacheflush.o: in function `riscv_ipi_setup':
cacheflush.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: arch/riscv/mm/context.o: in function `riscv_ipi_setup':
context.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/fork.o: in function `riscv_ipi_setup':
fork.c:(.text+0x4f8): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/exec_domain.o: in function `riscv_ipi_setup':
exec_domain.c:(.text+0x28): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/panic.o: in function `riscv_ipi_setup':
panic.c:(.text+0x178): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/cpu.o: in function `riscv_ipi_setup':
cpu.c:(.text+0x15c): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/exit.o: in function `riscv_ipi_setup':
exit.c:(.text+0x234): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/softirq.o: in function `riscv_ipi_setup':
softirq.c:(.text+0x20c): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/resource.o: in function `riscv_ipi_setup':
resource.c:(.text+0x744): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/sysctl.o: in function `riscv_ipi_setup':
sysctl.c:(.text+0x15d4): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/capability.o: in function `riscv_ipi_setup':
capability.c:(.text+0x118): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/ptrace.o: in function `riscv_ipi_setup':
ptrace.c:(.text+0x69c): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/user.o: in function `riscv_ipi_setup':
user.c:(.text+0x9c): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/signal.o: in function `riscv_ipi_setup':
signal.c:(.text+0x8e0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/sys.o: in function `riscv_ipi_setup':
sys.c:(.text+0x974): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/umh.o: in function `riscv_ipi_setup':
umh.c:(.text+0x444): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/workqueue.o: in function `riscv_ipi_setup':
workqueue.c:(.text+0x2b38): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/pid.o: in function `riscv_ipi_setup':
pid.c:(.text+0x60): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/task_work.o: in function `riscv_ipi_setup':
task_work.c:(.text+0x10): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/extable.o: in function `riscv_ipi_setup':
extable.c:(.text+0x0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/params.o: in function `riscv_ipi_setup':
params.c:(.text+0xaa4): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/kthread.o: in function `riscv_ipi_setup':
kthread.c:(.text+0x72c): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/nsproxy.o: in function `riscv_ipi_setup':
nsproxy.c:(.text+0x200): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/notifier.o: in function `riscv_ipi_setup':
notifier.c:(.text+0x174): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/ksysfs.o: in function `riscv_ipi_setup':
ksysfs.c:(.text+0xa0): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/cred.o: in function `riscv_ipi_setup':
cred.c:(.text+0x9c): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/reboot.o: in function `riscv_ipi_setup':
reboot.c:(.text+0x238): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/smpboot.o: in function `riscv_ipi_setup':
smpboot.c:(.text+0x304): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
riscv64-linux-ld: kernel/regset.o: in function `riscv_ipi_setup':
regset.c:(.text+0x124): multiple definition of `riscv_ipi_setup'; init/main.o:main.c:(.text+0x0): first defined here
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from arch/riscv/include/asm/uaccess.h:11,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/proc_fs.h:10,
from init/main.c:18:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
init/main.c:764:20: warning: no previous prototype for 'arch_post_acpi_subsys_init' [-Wmissing-prototypes]
764 | void __init __weak arch_post_acpi_subsys_init(void) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
init/main.c:776:20: warning: no previous prototype for 'mem_encrypt_init' [-Wmissing-prototypes]
776 | void __init __weak mem_encrypt_init(void) { }
| ^~~~~~~~~~~~~~~~
init/main.c:778:20: warning: no previous prototype for 'poking_init' [-Wmissing-prototypes]
778 | void __init __weak poking_init(void) { }
| ^~~~~~~~~~~
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from arch/riscv/include/asm/uaccess.h:11,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/tty.h:5,
from init/do_mounts.c:6:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from arch/riscv/include/asm/uaccess.h:11,
from include/linux/uaccess.h:11,
from arch/riscv/kernel/signal.c:10:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
arch/riscv/kernel/signal.c:309:27: warning: no previous prototype for 'do_notify_resume' [-Wmissing-prototypes]
309 | asmlinkage __visible void do_notify_resume(struct pt_regs *regs,
| ^~~~~~~~~~~~~~~~
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from arch/riscv/kernel/traps_misaligned.c:7:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
arch/riscv/kernel/traps_misaligned.c:240:5: warning: no previous prototype for 'handle_misaligned_load' [-Wmissing-prototypes]
240 | int handle_misaligned_load(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/traps_misaligned.c:323:5: warning: no previous prototype for 'handle_misaligned_store' [-Wmissing-prototypes]
323 | int handle_misaligned_store(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from arch/riscv/include/asm/uaccess.h:11,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from kernel/fork.c:23:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
kernel/fork.c:162:13: warning: no previous prototype for 'arch_release_task_struct' [-Wmissing-prototypes]
162 | void __weak arch_release_task_struct(struct task_struct *tsk)
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/fork.c:751:20: warning: no previous prototype for 'arch_task_cache_init' [-Wmissing-prototypes]
751 | void __init __weak arch_task_cache_init(void) { }
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from include/linux/pgtable.h:6,
from arch/riscv/include/asm/io.h:15,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from ./arch/riscv/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from kernel/panic.c:14:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
kernel/panic.c: In function '__warn':
kernel/panic.c:590:3: warning: function '__warn' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
590 | vprintk(args->fmt, args->args);
| ^~~~~~~
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from kernel/exit.c:8:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
kernel/exit.c:1811:13: warning: no previous prototype for 'abort' [-Wmissing-prototypes]
1811 | __weak void abort(void)
| ^~~~~
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from include/linux/kallsyms.h:12,
from kernel/kallsyms.c:15:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
kernel/kallsyms.c:502:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes]
502 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
| ^~~~~~~~~~~~~~~~
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from include/linux/pgtable.h:6,
from arch/riscv/include/asm/io.h:15,
from include/linux/io.h:13,
from kernel/iomem.c:4:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
kernel/iomem.c:9:22: warning: no previous prototype for 'ioremap_cache' [-Wmissing-prototypes]
9 | __weak void __iomem *ioremap_cache(resource_size_t offset, unsigned long size)
| ^~~~~~~~~~~~~
--
In file included from arch/riscv/include/asm/tlbflush.h:11,
from arch/riscv/include/asm/pgtable.h:87,
from arch/riscv/include/asm/uaccess.h:11,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/sched/cputime.h:5,
from kernel/sched/sched.h:11,
from kernel/sched/core.c:13:
>> arch/riscv/include/asm/smp.h:93:6: warning: no previous prototype for 'riscv_ipi_setup' [-Wmissing-prototypes]
93 | void riscv_ipi_setup(void)
| ^~~~~~~~~~~~~~~
kernel/sched/core.c: In function 'ttwu_stat':
kernel/sched/core.c:2916:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
2916 | struct rq *rq;
| ^~
..
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH nf 2/2] netfilter: nft_osf: check for TCP packet before further processing
by kernel test robot
Hi Pablo,
I love your patch! Yet something to improve:
[auto build test ERROR on nf/master]
url: https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-nft_...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: arm-randconfig-r001-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/f572a05becf9cc86053b01e0f0f898334...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pablo-Neira-Ayuso/netfilter-nft_exthdr-check-for-IPv6-packet-before-further-processing/20210616-144640
git checkout f572a05becf9cc86053b01e0f0f898334583692a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 >>):
>> net/netfilter/nft_osf.c:33:3: error: 'break' statement not in loop or switch statement
break;
^
1 error generated.
vim +/break +33 net/netfilter/nft_osf.c
19
20 static void nft_osf_eval(const struct nft_expr *expr, struct nft_regs *regs,
21 const struct nft_pktinfo *pkt)
22 {
23 struct nft_osf *priv = nft_expr_priv(expr);
24 u32 *dest = ®s->data[priv->dreg];
25 struct sk_buff *skb = pkt->skb;
26 char os_match[NFT_OSF_MAXGENRELEN + 1];
27 const struct tcphdr *tcp;
28 struct nf_osf_data data;
29 struct tcphdr _tcph;
30
31 if (pkt->tprot != IPPROTO_TCP) {
32 regs->verdict.code = NFT_BREAK;
> 33 break;
34 }
35
36 tcp = skb_header_pointer(skb, ip_hdrlen(skb),
37 sizeof(struct tcphdr), &_tcph);
38 if (!tcp) {
39 regs->verdict.code = NFT_BREAK;
40 return;
41 }
42 if (!tcp->syn) {
43 regs->verdict.code = NFT_BREAK;
44 return;
45 }
46
47 if (!nf_osf_find(skb, nf_osf_fingers, priv->ttl, &data)) {
48 strncpy((char *)dest, "unknown", NFT_OSF_MAXGENRELEN);
49 } else {
50 if (priv->flags & NFT_OSF_F_VERSION)
51 snprintf(os_match, NFT_OSF_MAXGENRELEN, "%s:%s",
52 data.genre, data.version);
53 else
54 strlcpy(os_match, data.genre, NFT_OSF_MAXGENRELEN);
55
56 strncpy((char *)dest, os_match, NFT_OSF_MAXGENRELEN);
57 }
58 }
59
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH] tpm2_load_command leaks memory
by kernel test robot
Hi Dhiraj,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.13-rc6]
[also build test ERROR on next-20210616]
[cannot apply to security/next-testing]
[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/Dhiraj-Shah/tpm2_load_command-le...
base: 009c9aa5be652675a06d5211e1640e02bbb1c33d
config: s390-randconfig-r014-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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://github.com/0day-ci/linux/commit/985c6fcde5d80fed97392f94b906e6b43...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dhiraj-Shah/tpm2_load_command-leaks-memory/20210616-184020
git checkout 985c6fcde5d80fed97392f94b906e6b43c164f47
# 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 error/warnings (new ones prefixed by >>):
>> security/keys/trusted-keys/trusted_tpm2.c:426:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
goto out;
^
security/keys/trusted-keys/trusted_tpm2.c:424:2: note: previous statement is here
if (tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_LOAD) != 0)
^
>> security/keys/trusted-keys/trusted_tpm2.c:426:8: error: use of undeclared label 'out'
goto out;
^
>> security/keys/trusted-keys/trusted_tpm2.c:383:8: error: use of undeclared label 'err'
goto err;
^
>> security/keys/trusted-keys/trusted_tpm2.c:428:21: error: expected parameter declarator
tpm_buf_append_u32(&buf, options->keyhandle);
^
>> security/keys/trusted-keys/trusted_tpm2.c:428:21: error: expected ')'
security/keys/trusted-keys/trusted_tpm2.c:428:20: note: to match this '('
tpm_buf_append_u32(&buf, options->keyhandle);
^
>> security/keys/trusted-keys/trusted_tpm2.c:428:2: warning: declaration specifier missing, defaulting to 'int'
tpm_buf_append_u32(&buf, options->keyhandle);
^
int
>> security/keys/trusted-keys/trusted_tpm2.c:428:20: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
tpm_buf_append_u32(&buf, options->keyhandle);
^
void
>> security/keys/trusted-keys/trusted_tpm2.c:428:2: error: conflicting types for 'tpm_buf_append_u32'
tpm_buf_append_u32(&buf, options->keyhandle);
^
include/linux/tpm.h:394:20: note: previous definition is here
static inline void tpm_buf_append_u32(struct tpm_buf *buf, const u32 value)
^
security/keys/trusted-keys/trusted_tpm2.c:429:23: error: expected parameter declarator
tpm2_buf_append_auth(&buf, TPM2_RS_PW,
^
security/keys/trusted-keys/trusted_tpm2.c:429:23: error: expected ')'
security/keys/trusted-keys/trusted_tpm2.c:429:22: note: to match this '('
tpm2_buf_append_auth(&buf, TPM2_RS_PW,
^
security/keys/trusted-keys/trusted_tpm2.c:429:2: warning: declaration specifier missing, defaulting to 'int'
tpm2_buf_append_auth(&buf, TPM2_RS_PW,
^
int
security/keys/trusted-keys/trusted_tpm2.c:429:22: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
tpm2_buf_append_auth(&buf, TPM2_RS_PW,
^
>> security/keys/trusted-keys/trusted_tpm2.c:429:2: error: conflicting types for 'tpm2_buf_append_auth'
tpm2_buf_append_auth(&buf, TPM2_RS_PW,
^
security/keys/trusted-keys/trusted_tpm2.c:199:13: note: previous definition is here
static void tpm2_buf_append_auth(struct tpm_buf *buf, u32 session_handle,
^
security/keys/trusted-keys/trusted_tpm2.c:435:17: error: expected parameter declarator
tpm_buf_append(&buf, blob, blob_len);
^
security/keys/trusted-keys/trusted_tpm2.c:435:17: error: expected ')'
security/keys/trusted-keys/trusted_tpm2.c:435:16: note: to match this '('
tpm_buf_append(&buf, blob, blob_len);
^
security/keys/trusted-keys/trusted_tpm2.c:435:2: warning: declaration specifier missing, defaulting to 'int'
tpm_buf_append(&buf, blob, blob_len);
^
int
security/keys/trusted-keys/trusted_tpm2.c:435:16: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
tpm_buf_append(&buf, blob, blob_len);
^
void
>> security/keys/trusted-keys/trusted_tpm2.c:435:2: error: conflicting types for 'tpm_buf_append'
tpm_buf_append(&buf, blob, blob_len);
^
include/linux/tpm.h:361:20: note: previous definition is here
static inline void tpm_buf_append(struct tpm_buf *buf,
^
>> security/keys/trusted-keys/trusted_tpm2.c:437:2: error: expected identifier or '('
if (buf.flags & TPM_BUF_OVERFLOW) {
^
security/keys/trusted-keys/trusted_tpm2.c:442:2: warning: declaration specifier missing, defaulting to 'int'
rc = tpm_transmit_cmd(chip, &buf, 4, "loading blob");
^
int
>> security/keys/trusted-keys/trusted_tpm2.c:442:24: error: use of undeclared identifier 'chip'
rc = tpm_transmit_cmd(chip, &buf, 4, "loading blob");
^
>> security/keys/trusted-keys/trusted_tpm2.c:442:31: error: use of undeclared identifier 'buf'
rc = tpm_transmit_cmd(chip, &buf, 4, "loading blob");
^
security/keys/trusted-keys/trusted_tpm2.c:443:2: error: expected identifier or '('
if (!rc)
^
security/keys/trusted-keys/trusted_tpm2.c:447:1: warning: declaration specifier missing, defaulting to 'int'
out:
^
int
>> security/keys/trusted-keys/trusted_tpm2.c:447:4: error: expected ';' after top level declarator
out:
^
;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
vim +/out +426 security/keys/trusted-keys/trusted_tpm2.c
346
347 /**
348 * tpm2_load_cmd() - execute a TPM2_Load command
349 *
350 * @chip: TPM chip to use
351 * @payload: the key data in clear and encrypted form
352 * @options: authentication values and other options
353 * @blob_handle: returned blob handle
354 *
355 * Return: 0 on success.
356 * -E2BIG on wrong payload size.
357 * -EPERM on tpm error status.
358 * < 0 error from tpm_send.
359 */
360 static int tpm2_load_cmd(struct tpm_chip *chip,
361 struct trusted_key_payload *payload,
362 struct trusted_key_options *options,
363 u32 *blob_handle)
364 {
365 struct tpm_buf buf;
366 unsigned int private_len;
367 unsigned int public_len;
368 unsigned int blob_len;
369 u8 *blob, *pub;
370 int rc;
371 u32 attrs;
372
373 rc = tpm2_key_decode(payload, options, &blob);
374 if (rc) {
375 /* old form */
376 blob = payload->blob;
377 payload->old_format = 1;
378 }
379
380 /* new format carries keyhandle but old format doesn't */
381 if (!options->keyhandle) {
382 rc = -EINVAL;
> 383 goto err;
384 }
385
386 /* must be big enough for at least the two be16 size counts */
387 if (payload->blob_len < 4) {
388 rc = -EINVAL;
389 goto err;
390 }
391
392 private_len = get_unaligned_be16(blob);
393
394 /* must be big enough for following public_len */
395 if (private_len + 2 + 2 > (payload->blob_len)) {
396 rc = -E2BIG;
397 goto err;
398 }
399
400 public_len = get_unaligned_be16(blob + 2 + private_len);
401
402 if (private_len + 2 + public_len + 2 > payload->blob_len) {
403 rc = -E2BIG;
404 goto err;
405 }
406
407 pub = blob + 2 + private_len + 2;
408 /* key attributes are always at offset 4 */
409 attrs = get_unaligned_be32(pub + 4);
410
411 if ((attrs & (TPM2_OA_FIXED_TPM | TPM2_OA_FIXED_PARENT)) ==
412 (TPM2_OA_FIXED_TPM | TPM2_OA_FIXED_PARENT))
413 payload->migratable = 0;
414 else
415 payload->migratable = 1;
416
417 blob_len = private_len + public_len + 4;
418
419 if (blob_len > payload->blob_len) {
420 rc = -E2BIG;
421 goto err;
422 }
423
> 424 if (tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_LOAD) != 0)
425 rc = -ENOMEM;
> 426 goto out;
427 }
> 428 tpm_buf_append_u32(&buf, options->keyhandle);
> 429 tpm2_buf_append_auth(&buf, TPM2_RS_PW,
430 NULL /* nonce */, 0,
431 0 /* session_attributes */,
432 options->keyauth /* hmac */,
433 TPM_DIGEST_SIZE);
434
> 435 tpm_buf_append(&buf, blob, blob_len);
436
> 437 if (buf.flags & TPM_BUF_OVERFLOW) {
438 rc = -E2BIG;
439 goto out;
440 }
441
> 442 rc = tpm_transmit_cmd(chip, &buf, 4, "loading blob");
> 443 if (!rc)
444 *blob_handle = be32_to_cpup(
445 (__be32 *) &buf.data[TPM_HEADER_SIZE]);
446
> 447 out:
448 tpm_buf_destroy(&buf);
449 err:
450 if (blob != payload->blob)
451 kfree(blob);
452
453 if (rc > 0)
454 rc = -EPERM;
455
456 return rc;
457 }
458
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months