tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 4ba26291c36f420273a2546b25d2c0db3115d226 commit: 56bc1719652e7a937bc9856f76f0c0fbf8ce1b23 [8162/22498] objtool: Support GCC 9 cold subfunction naming scheme config: x86_64-buildonly-randconfig-005-20240525 (https://download.01.org/0day-ci/archive/20240526/202405260123.NWtyQKRm-lkp@i...) compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240526/202405260123.NWtyQKRm-lkp@i...)
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@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202405260123.NWtyQKRm-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/md/dm-integrity.c:3606:12: warning: no previous prototype for 'dm_integrity_init' [-Wmissing-prototypes] 3606 | int __init dm_integrity_init(void) | ^~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:3625:6: warning: no previous prototype for 'dm_integrity_exit' [-Wmissing-prototypes] 3625 | void dm_integrity_exit(void) | ^~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c: In function '__journal_read_write': drivers/md/dm-integrity.c:1541:105: warning: array subscript s is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 1541 | *(commit_id_t *)(mem_ptr + JOURNAL_SECTOR_DATA) = je->last_bytes[s]; | ~~~~~~~~~~~~~~^~~ drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~ drivers/md/dm-integrity.c:87:58: warning: array subscript <unknown> is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 87 | #define journal_entry_tag(ic, je) ((__u8 *)&(je)->last_bytes[(ic)->sectors_per_block]) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:1561:49: note: in expansion of macro 'journal_entry_tag' 1561 | char *tag_ptr = journal_entry_tag(ic, je); | ^~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~ drivers/md/dm-integrity.c:87:58: warning: array subscript <unknown> is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 87 | #define journal_entry_tag(ic, je) ((__u8 *)&(je)->last_bytes[(ic)->sectors_per_block]) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:1561:49: note: in expansion of macro 'journal_entry_tag' 1561 | char *tag_ptr = journal_entry_tag(ic, je); | ^~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~ drivers/md/dm-integrity.c:1591:55: warning: array subscript s is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 1591 | je->last_bytes[s] = js[s].commit_id; | ~~~~~~~~~~~~~~^~~ drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~ drivers/md/dm-integrity.c:87:58: warning: array subscript <unknown> is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 87 | #define journal_entry_tag(ic, je) ((__u8 *)&(je)->last_bytes[(ic)->sectors_per_block]) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:1601:107: note: in expansion of macro 'journal_entry_tag' 1601 | integrity_sector_checksum(ic, logical_sector, (char *)js, journal_entry_tag(ic, je)); | ^~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~ drivers/md/dm-integrity.c:87:58: warning: array subscript <unknown> is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 87 | #define journal_entry_tag(ic, je) ((__u8 *)&(je)->last_bytes[(ic)->sectors_per_block]) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:1599:56: note: in expansion of macro 'journal_entry_tag' 1599 | memcpy(journal_entry_tag(ic, je), checksums_onstack, ic->tag_size); | ^~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~ In function 'restore_last_bytes', inlined from 'do_journal_write' at drivers/md/dm-integrity.c:1958:4: drivers/md/dm-integrity.c:1915:47: warning: array subscript s is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 1915 | js->commit_id = je->last_bytes[s]; | ~~~~~~~~~~~~~~^~~ drivers/md/dm-integrity.c: In function 'do_journal_write': drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~ In function 'restore_last_bytes', inlined from 'do_journal_write' at drivers/md/dm-integrity.c:1969:5: drivers/md/dm-integrity.c:1915:47: warning: array subscript s is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 1915 | js->commit_id = je->last_bytes[s]; | ~~~~~~~~~~~~~~^~~ drivers/md/dm-integrity.c: In function 'do_journal_write': drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~ In file included from drivers/md/dm-integrity.c:9: drivers/md/dm-integrity.c:87:58: warning: array subscript <unknown> is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 87 | #define journal_entry_tag(ic, je) ((__u8 *)&(je)->last_bytes[(ic)->sectors_per_block]) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:77:45: note: in definition of macro 'unlikely' 77 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ drivers/md/dm-integrity.c:2028:71: note: in expansion of macro 'journal_entry_tag' 2028 | if (unlikely(memcmp(test_tag, journal_entry_tag(ic, je2), ic->tag_size))) | ^~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~ drivers/md/dm-integrity.c:87:58: warning: array subscript <unknown> is outside array bounds of 'commit_id_t[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 87 | #define journal_entry_tag(ic, je) ((__u8 *)&(je)->last_bytes[(ic)->sectors_per_block]) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:2033:61: note: in expansion of macro 'journal_entry_tag' 2033 | r = dm_integrity_rw_tag(ic, journal_entry_tag(ic, je2), &metadata_block, &metadata_offset, | ^~~~~~~~~~~~~~~~~ drivers/md/dm-integrity.c:83:21: note: while referencing 'last_bytes' 83 | commit_id_t last_bytes[0]; | ^~~~~~~~~~
drivers/md/dm-integrity.o: warning: objtool: do_journal_write()+0x134d: stack state mismatch: cfa1=-4-40 cfa2=-1+0