Re: [PATCH v11 05/26] dept: Tie to Lockdep and IRQ tracing

From: kernel test robot
Date: Sun Jan 28 2024 - 08:10:52 EST


Hi Byungchul,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 0dd3ee31125508cd67f7e7172247f05b7fd1753a]

url: https://github.com/intel-lab-lkp/linux/commits/Byungchul-Park/llist-Move-llist_-head-node-definition-to-types-h/20240124-200243
base: 0dd3ee31125508cd67f7e7172247f05b7fd1753a
patch link: https://lore.kernel.org/r/20240124115938.80132-6-byungchul%40sk.com
patch subject: [PATCH v11 05/26] dept: Tie to Lockdep and IRQ tracing
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20240128/202401282019.lvlmRwlL-lkp@xxxxxxxxx/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project a31a60074717fc40887cfe132b77eec93bedd307)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240128/202401282019.lvlmRwlL-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401282019.lvlmRwlL-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from fs/ext4/mballoc.c:12:
In file included from fs/ext4/ext4_jbd2.h:16:
In file included from include/linux/jbd2.h:23:
In file included from include/linux/buffer_head.h:12:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:12:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:337:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from fs/ext4/mballoc.c:12:
In file included from fs/ext4/ext4_jbd2.h:16:
In file included from include/linux/jbd2.h:23:
In file included from include/linux/buffer_head.h:12:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:12:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:337:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from fs/ext4/mballoc.c:12:
In file included from fs/ext4/ext4_jbd2.h:16:
In file included from include/linux/jbd2.h:23:
In file included from include/linux/buffer_head.h:12:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:12:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:337:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
In file included from fs/ext4/mballoc.c:7000:
>> fs/ext4/mballoc-test.c:246:13: warning: stack frame size (1288) exceeds limit (1024) in 'test_new_blocks_simple' [-Wframe-larger-than]
246 | static void test_new_blocks_simple(struct kunit *test)
| ^
7 warnings generated.
--
>> drivers/gpu/drm/tests/drm_exec_test.c:150:13: warning: stack frame size (1064) exceeds limit (1024) in 'test_prepare_array' [-Wframe-larger-than]
150 | static void test_prepare_array(struct kunit *test)
| ^
1 warning generated.
--
In file included from drivers/net/ethernet/microchip/vcap/vcap_api.c:9:
In file included from drivers/net/ethernet/microchip/vcap/vcap_api_private.h:11:
In file included from drivers/net/ethernet/microchip/vcap/vcap_api.h:11:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:12:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:337:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/net/ethernet/microchip/vcap/vcap_api.c:9:
In file included from drivers/net/ethernet/microchip/vcap/vcap_api_private.h:11:
In file included from drivers/net/ethernet/microchip/vcap/vcap_api.h:11:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:12:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:337:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/net/ethernet/microchip/vcap/vcap_api.c:9:
In file included from drivers/net/ethernet/microchip/vcap/vcap_api_private.h:11:
In file included from drivers/net/ethernet/microchip/vcap/vcap_api.h:11:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:12:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:337:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
In file included from drivers/net/ethernet/microchip/vcap/vcap_api.c:3598:
>> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1926:13: warning: stack frame size (1296) exceeds limit (1024) in 'vcap_api_next_lookup_advanced_test' [-Wframe-larger-than]
1926 | static void vcap_api_next_lookup_advanced_test(struct kunit *test)
| ^
7 warnings generated.

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS [=n]
Selected by [y]:
- DEPT [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] && !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86


vim +/test_new_blocks_simple +246 fs/ext4/mballoc-test.c

7c9fa399a36954 Kemeng Shi 2023-09-29 245
7c9fa399a36954 Kemeng Shi 2023-09-29 @246 static void test_new_blocks_simple(struct kunit *test)
7c9fa399a36954 Kemeng Shi 2023-09-29 247 {
7c9fa399a36954 Kemeng Shi 2023-09-29 248 struct super_block *sb = (struct super_block *)test->priv;
7c9fa399a36954 Kemeng Shi 2023-09-29 249 struct inode inode = { .i_sb = sb, };
7c9fa399a36954 Kemeng Shi 2023-09-29 250 struct ext4_allocation_request ar;
7c9fa399a36954 Kemeng Shi 2023-09-29 251 ext4_group_t i, goal_group = TEST_GOAL_GROUP;
7c9fa399a36954 Kemeng Shi 2023-09-29 252 int err = 0;
7c9fa399a36954 Kemeng Shi 2023-09-29 253 ext4_fsblk_t found;
7c9fa399a36954 Kemeng Shi 2023-09-29 254 struct ext4_sb_info *sbi = EXT4_SB(sb);
7c9fa399a36954 Kemeng Shi 2023-09-29 255
7c9fa399a36954 Kemeng Shi 2023-09-29 256 ar.inode = &inode;
7c9fa399a36954 Kemeng Shi 2023-09-29 257
7c9fa399a36954 Kemeng Shi 2023-09-29 258 /* get block at goal */
7c9fa399a36954 Kemeng Shi 2023-09-29 259 ar.goal = ext4_group_first_block_no(sb, goal_group);
7c9fa399a36954 Kemeng Shi 2023-09-29 260 found = ext4_mb_new_blocks_simple(&ar, &err);
7c9fa399a36954 Kemeng Shi 2023-09-29 261 KUNIT_ASSERT_EQ_MSG(test, ar.goal, found,
7c9fa399a36954 Kemeng Shi 2023-09-29 262 "failed to alloc block at goal, expected %llu found %llu",
7c9fa399a36954 Kemeng Shi 2023-09-29 263 ar.goal, found);
7c9fa399a36954 Kemeng Shi 2023-09-29 264
7c9fa399a36954 Kemeng Shi 2023-09-29 265 /* get block after goal in goal group */
7c9fa399a36954 Kemeng Shi 2023-09-29 266 ar.goal = ext4_group_first_block_no(sb, goal_group);
7c9fa399a36954 Kemeng Shi 2023-09-29 267 found = ext4_mb_new_blocks_simple(&ar, &err);
7c9fa399a36954 Kemeng Shi 2023-09-29 268 KUNIT_ASSERT_EQ_MSG(test, ar.goal + EXT4_C2B(sbi, 1), found,
7c9fa399a36954 Kemeng Shi 2023-09-29 269 "failed to alloc block after goal in goal group, expected %llu found %llu",
7c9fa399a36954 Kemeng Shi 2023-09-29 270 ar.goal + 1, found);
7c9fa399a36954 Kemeng Shi 2023-09-29 271
7c9fa399a36954 Kemeng Shi 2023-09-29 272 /* get block after goal group */
7c9fa399a36954 Kemeng Shi 2023-09-29 273 mbt_ctx_mark_used(sb, goal_group, 0, EXT4_CLUSTERS_PER_GROUP(sb));
7c9fa399a36954 Kemeng Shi 2023-09-29 274 ar.goal = ext4_group_first_block_no(sb, goal_group);
7c9fa399a36954 Kemeng Shi 2023-09-29 275 found = ext4_mb_new_blocks_simple(&ar, &err);
7c9fa399a36954 Kemeng Shi 2023-09-29 276 KUNIT_ASSERT_EQ_MSG(test,
7c9fa399a36954 Kemeng Shi 2023-09-29 277 ext4_group_first_block_no(sb, goal_group + 1), found,
7c9fa399a36954 Kemeng Shi 2023-09-29 278 "failed to alloc block after goal group, expected %llu found %llu",
7c9fa399a36954 Kemeng Shi 2023-09-29 279 ext4_group_first_block_no(sb, goal_group + 1), found);
7c9fa399a36954 Kemeng Shi 2023-09-29 280
7c9fa399a36954 Kemeng Shi 2023-09-29 281 /* get block before goal group */
7c9fa399a36954 Kemeng Shi 2023-09-29 282 for (i = goal_group; i < ext4_get_groups_count(sb); i++)
7c9fa399a36954 Kemeng Shi 2023-09-29 283 mbt_ctx_mark_used(sb, i, 0, EXT4_CLUSTERS_PER_GROUP(sb));
7c9fa399a36954 Kemeng Shi 2023-09-29 284 ar.goal = ext4_group_first_block_no(sb, goal_group);
7c9fa399a36954 Kemeng Shi 2023-09-29 285 found = ext4_mb_new_blocks_simple(&ar, &err);
7c9fa399a36954 Kemeng Shi 2023-09-29 286 KUNIT_ASSERT_EQ_MSG(test,
7c9fa399a36954 Kemeng Shi 2023-09-29 287 ext4_group_first_block_no(sb, 0) + EXT4_C2B(sbi, 1), found,
7c9fa399a36954 Kemeng Shi 2023-09-29 288 "failed to alloc block before goal group, expected %llu found %llu",
7c9fa399a36954 Kemeng Shi 2023-09-29 289 ext4_group_first_block_no(sb, 0 + EXT4_C2B(sbi, 1)), found);
7c9fa399a36954 Kemeng Shi 2023-09-29 290
7c9fa399a36954 Kemeng Shi 2023-09-29 291 /* no block available, fail to allocate block */
7c9fa399a36954 Kemeng Shi 2023-09-29 292 for (i = 0; i < ext4_get_groups_count(sb); i++)
7c9fa399a36954 Kemeng Shi 2023-09-29 293 mbt_ctx_mark_used(sb, i, 0, EXT4_CLUSTERS_PER_GROUP(sb));
7c9fa399a36954 Kemeng Shi 2023-09-29 294 ar.goal = ext4_group_first_block_no(sb, goal_group);
7c9fa399a36954 Kemeng Shi 2023-09-29 295 found = ext4_mb_new_blocks_simple(&ar, &err);
7c9fa399a36954 Kemeng Shi 2023-09-29 296 KUNIT_ASSERT_NE_MSG(test, err, 0,
7c9fa399a36954 Kemeng Shi 2023-09-29 297 "unexpectedly get block when no block is available");
7c9fa399a36954 Kemeng Shi 2023-09-29 298 }
7c9fa399a36954 Kemeng Shi 2023-09-29 299

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki