* [linux-next:master 4491/4552] include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0
@ 2023-09-12 13:07 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-12 13:07 UTC (permalink / raw)
To: Kent Overstreet; +Cc: oe-kbuild-all, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3c13c772fc233a10342c8e1605ff0855dfdf0c89
commit: 977590f1aca51242a59e24bb9a50285107f29a98 [4491/4552] Merge branch 'for-next' of https://evilpiepirate.org/git/bcachefs.git
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230912/202309122155.dteFhtkC-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230912/202309122155.dteFhtkC-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309122155.dteFhtkC-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/bcachefs/bcachefs_format.h:870:14: warning: 'INODE_NEW_VARINT_OFFSET' defined but not used [-Wunused-const-variable=]
870 | LE32_BITMASK(INODE_NEW_VARINT, struct bch_inode, bi_flags, 31, 32);
| ^~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:870:1: note: in expansion of macro 'LE32_BITMASK'
870 | LE32_BITMASK(INODE_NEW_VARINT, struct bch_inode, bi_flags, 31, 32);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:869:14: warning: 'INODE_NR_FIELDS_MAX' defined but not used [-Wunused-const-variable=]
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:103:25: note: in definition of macro 'LE_BITMASK'
103 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1; \
| ^~~~
fs/bcachefs/bcachefs_format.h:869:1: note: in expansion of macro 'LE32_BITMASK'
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:869:14: warning: 'INODE_NR_FIELDS_BITS' defined but not used [-Wunused-const-variable=]
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:102:25: note: in definition of macro 'LE_BITMASK'
102 | static const unsigned name##_BITS = (end - offset); \
| ^~~~
fs/bcachefs/bcachefs_format.h:869:1: note: in expansion of macro 'LE32_BITMASK'
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:869:14: warning: 'INODE_NR_FIELDS_OFFSET' defined but not used [-Wunused-const-variable=]
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:869:1: note: in expansion of macro 'LE32_BITMASK'
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:868:14: warning: 'INODE_STR_HASH_MAX' defined but not used [-Wunused-const-variable=]
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:103:25: note: in definition of macro 'LE_BITMASK'
103 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1; \
| ^~~~
fs/bcachefs/bcachefs_format.h:868:1: note: in expansion of macro 'LE32_BITMASK'
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:868:14: warning: 'INODE_STR_HASH_BITS' defined but not used [-Wunused-const-variable=]
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:102:25: note: in definition of macro 'LE_BITMASK'
102 | static const unsigned name##_BITS = (end - offset); \
| ^~~~
fs/bcachefs/bcachefs_format.h:868:1: note: in expansion of macro 'LE32_BITMASK'
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:868:14: warning: 'INODE_STR_HASH_OFFSET' defined but not used [-Wunused-const-variable=]
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:868:1: note: in expansion of macro 'LE32_BITMASK'
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:678:14: warning: 'BTREE_PTR_RANGE_UPDATED_MAX' defined but not used [-Wunused-const-variable=]
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:103:25: note: in definition of macro 'LE_BITMASK'
103 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1; \
| ^~~~
fs/bcachefs/bcachefs_format.h:678:1: note: in expansion of macro 'LE16_BITMASK'
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:678:14: warning: 'BTREE_PTR_RANGE_UPDATED_BITS' defined but not used [-Wunused-const-variable=]
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:102:25: note: in definition of macro 'LE_BITMASK'
102 | static const unsigned name##_BITS = (end - offset); \
| ^~~~
fs/bcachefs/bcachefs_format.h:678:1: note: in expansion of macro 'LE16_BITMASK'
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:678:14: warning: 'BTREE_PTR_RANGE_UPDATED_OFFSET' defined but not used [-Wunused-const-variable=]
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:678:1: note: in expansion of macro 'LE16_BITMASK'
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~
In file included from include/linux/string.h:254,
from include/linux/bitmap.h:11,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/radix-tree.h:14,
from include/linux/backing-dev-defs.h:6,
from fs/bcachefs/bcachefs.h:186:
In function 'bch2_bkey_append_ptr',
inlined from 'bch2_alloc_sectors_append_ptrs_inlined' at fs/bcachefs/alloc_foreground.h:194:3:
>> include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=]
57 | #define __underlying_memcpy __builtin_memcpy
| ^
include/linux/fortify-string.h:648:9: note: in expansion of macro '__underlying_memcpy'
648 | __underlying_##op(p, q, __fortify_size); \
| ^~~~~~~~~~~~~
include/linux/fortify-string.h:693:26: note: in expansion of macro '__fortify_memcpy_chk'
693 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
| ^~~~~~~~~~~~~~~~~~~~
fs/bcachefs/extents.h:645:17: note: in expansion of macro 'memcpy'
645 | memcpy((void *) &k->v + bkey_val_bytes(&k->k),
| ^~~~~~
fs/bcachefs/bcachefs_format.h: In function 'bch2_alloc_sectors_append_ptrs_inlined':
fs/bcachefs/bcachefs_format.h:303:25: note: destination object 'v' of size 0
303 | struct bch_val v;
| ^
--
fs/bcachefs/bcachefs_format.h:870:14: warning: 'INODE_NEW_VARINT_OFFSET' defined but not used [-Wunused-const-variable=]
870 | LE32_BITMASK(INODE_NEW_VARINT, struct bch_inode, bi_flags, 31, 32);
| ^~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:870:1: note: in expansion of macro 'LE32_BITMASK'
870 | LE32_BITMASK(INODE_NEW_VARINT, struct bch_inode, bi_flags, 31, 32);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:869:14: warning: 'INODE_NR_FIELDS_MAX' defined but not used [-Wunused-const-variable=]
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:103:25: note: in definition of macro 'LE_BITMASK'
103 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1; \
| ^~~~
fs/bcachefs/bcachefs_format.h:869:1: note: in expansion of macro 'LE32_BITMASK'
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:869:14: warning: 'INODE_NR_FIELDS_BITS' defined but not used [-Wunused-const-variable=]
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:102:25: note: in definition of macro 'LE_BITMASK'
102 | static const unsigned name##_BITS = (end - offset); \
| ^~~~
fs/bcachefs/bcachefs_format.h:869:1: note: in expansion of macro 'LE32_BITMASK'
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:869:14: warning: 'INODE_NR_FIELDS_OFFSET' defined but not used [-Wunused-const-variable=]
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:869:1: note: in expansion of macro 'LE32_BITMASK'
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:868:14: warning: 'INODE_STR_HASH_MAX' defined but not used [-Wunused-const-variable=]
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:103:25: note: in definition of macro 'LE_BITMASK'
103 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1; \
| ^~~~
fs/bcachefs/bcachefs_format.h:868:1: note: in expansion of macro 'LE32_BITMASK'
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:868:14: warning: 'INODE_STR_HASH_BITS' defined but not used [-Wunused-const-variable=]
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:102:25: note: in definition of macro 'LE_BITMASK'
102 | static const unsigned name##_BITS = (end - offset); \
| ^~~~
fs/bcachefs/bcachefs_format.h:868:1: note: in expansion of macro 'LE32_BITMASK'
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:868:14: warning: 'INODE_STR_HASH_OFFSET' defined but not used [-Wunused-const-variable=]
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:868:1: note: in expansion of macro 'LE32_BITMASK'
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:678:14: warning: 'BTREE_PTR_RANGE_UPDATED_MAX' defined but not used [-Wunused-const-variable=]
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:103:25: note: in definition of macro 'LE_BITMASK'
103 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1; \
| ^~~~
fs/bcachefs/bcachefs_format.h:678:1: note: in expansion of macro 'LE16_BITMASK'
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:678:14: warning: 'BTREE_PTR_RANGE_UPDATED_BITS' defined but not used [-Wunused-const-variable=]
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:102:25: note: in definition of macro 'LE_BITMASK'
102 | static const unsigned name##_BITS = (end - offset); \
| ^~~~
fs/bcachefs/bcachefs_format.h:678:1: note: in expansion of macro 'LE16_BITMASK'
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:678:14: warning: 'BTREE_PTR_RANGE_UPDATED_OFFSET' defined but not used [-Wunused-const-variable=]
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:678:1: note: in expansion of macro 'LE16_BITMASK'
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~
In file included from include/linux/string.h:254,
from include/linux/bitmap.h:11,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/radix-tree.h:14,
from include/linux/backing-dev-defs.h:6,
from fs/bcachefs/bcachefs.h:186:
In function 'bch2_bkey_append_ptr',
inlined from 'bch2_alloc_sectors_append_ptrs_inlined' at fs/bcachefs/alloc_foreground.h:194:3:
>> include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=]
57 | #define __underlying_memcpy __builtin_memcpy
| ^
include/linux/fortify-string.h:648:9: note: in expansion of macro '__underlying_memcpy'
648 | __underlying_##op(p, q, __fortify_size); \
| ^~~~~~~~~~~~~
include/linux/fortify-string.h:693:26: note: in expansion of macro '__fortify_memcpy_chk'
693 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
| ^~~~~~~~~~~~~~~~~~~~
fs/bcachefs/extents.h:645:17: note: in expansion of macro 'memcpy'
645 | memcpy((void *) &k->v + bkey_val_bytes(&k->k),
| ^~~~~~
fs/bcachefs/bcachefs_format.h: In function 'bch2_alloc_sectors_append_ptrs_inlined':
fs/bcachefs/bcachefs_format.h:303:25: note: destination object 'v' of size 0
303 | struct bch_val v;
| ^
--
fs/bcachefs/bcachefs_format.h:870:14: warning: 'INODE_NEW_VARINT_OFFSET' defined but not used [-Wunused-const-variable=]
870 | LE32_BITMASK(INODE_NEW_VARINT, struct bch_inode, bi_flags, 31, 32);
| ^~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:870:1: note: in expansion of macro 'LE32_BITMASK'
870 | LE32_BITMASK(INODE_NEW_VARINT, struct bch_inode, bi_flags, 31, 32);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:869:14: warning: 'INODE_NR_FIELDS_MAX' defined but not used [-Wunused-const-variable=]
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:103:25: note: in definition of macro 'LE_BITMASK'
103 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1; \
| ^~~~
fs/bcachefs/bcachefs_format.h:869:1: note: in expansion of macro 'LE32_BITMASK'
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:869:14: warning: 'INODE_NR_FIELDS_BITS' defined but not used [-Wunused-const-variable=]
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:102:25: note: in definition of macro 'LE_BITMASK'
102 | static const unsigned name##_BITS = (end - offset); \
| ^~~~
fs/bcachefs/bcachefs_format.h:869:1: note: in expansion of macro 'LE32_BITMASK'
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:869:14: warning: 'INODE_NR_FIELDS_OFFSET' defined but not used [-Wunused-const-variable=]
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:869:1: note: in expansion of macro 'LE32_BITMASK'
869 | LE32_BITMASK(INODE_NR_FIELDS, struct bch_inode, bi_flags, 24, 31);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:868:14: warning: 'INODE_STR_HASH_MAX' defined but not used [-Wunused-const-variable=]
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:103:25: note: in definition of macro 'LE_BITMASK'
103 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1; \
| ^~~~
fs/bcachefs/bcachefs_format.h:868:1: note: in expansion of macro 'LE32_BITMASK'
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:868:14: warning: 'INODE_STR_HASH_BITS' defined but not used [-Wunused-const-variable=]
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:102:25: note: in definition of macro 'LE_BITMASK'
102 | static const unsigned name##_BITS = (end - offset); \
| ^~~~
fs/bcachefs/bcachefs_format.h:868:1: note: in expansion of macro 'LE32_BITMASK'
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:868:14: warning: 'INODE_STR_HASH_OFFSET' defined but not used [-Wunused-const-variable=]
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:868:1: note: in expansion of macro 'LE32_BITMASK'
868 | LE32_BITMASK(INODE_STR_HASH, struct bch_inode, bi_flags, 20, 24);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:678:14: warning: 'BTREE_PTR_RANGE_UPDATED_MAX' defined but not used [-Wunused-const-variable=]
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:103:25: note: in definition of macro 'LE_BITMASK'
103 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1; \
| ^~~~
fs/bcachefs/bcachefs_format.h:678:1: note: in expansion of macro 'LE16_BITMASK'
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:678:14: warning: 'BTREE_PTR_RANGE_UPDATED_BITS' defined but not used [-Wunused-const-variable=]
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:102:25: note: in definition of macro 'LE_BITMASK'
102 | static const unsigned name##_BITS = (end - offset); \
| ^~~~
fs/bcachefs/bcachefs_format.h:678:1: note: in expansion of macro 'LE16_BITMASK'
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:678:14: warning: 'BTREE_PTR_RANGE_UPDATED_OFFSET' defined but not used [-Wunused-const-variable=]
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/bcachefs_format.h:101:25: note: in definition of macro 'LE_BITMASK'
101 | static const unsigned name##_OFFSET = offset; \
| ^~~~
fs/bcachefs/bcachefs_format.h:678:1: note: in expansion of macro 'LE16_BITMASK'
678 | LE16_BITMASK(BTREE_PTR_RANGE_UPDATED, struct bch_btree_ptr_v2, flags, 0, 1);
| ^~~~~~~~~~~~
In file included from include/linux/string.h:254,
from include/linux/bitmap.h:11,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/radix-tree.h:14,
from include/linux/backing-dev-defs.h:6,
from fs/bcachefs/bcachefs.h:186:
In function 'bch2_bkey_append_ptr',
inlined from '__journal_write_alloc' at fs/bcachefs/journal_io.c:1363:3:
>> include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=]
57 | #define __underlying_memcpy __builtin_memcpy
| ^
include/linux/fortify-string.h:648:9: note: in expansion of macro '__underlying_memcpy'
648 | __underlying_##op(p, q, __fortify_size); \
| ^~~~~~~~~~~~~
include/linux/fortify-string.h:693:26: note: in expansion of macro '__fortify_memcpy_chk'
693 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
| ^~~~~~~~~~~~~~~~~~~~
fs/bcachefs/extents.h:645:17: note: in expansion of macro 'memcpy'
645 | memcpy((void *) &k->v + bkey_val_bytes(&k->k),
| ^~~~~~
fs/bcachefs/bcachefs_format.h: In function '__journal_write_alloc':
fs/bcachefs/bcachefs_format.h:303:25: note: destination object 'v' of size 0
303 | struct bch_val v;
| ^
vim +57 include/linux/fortify-string.h
78a498c3a227f2 Alexander Potapenko 2022-10-24 46
78a498c3a227f2 Alexander Potapenko 2022-10-24 47 #if defined(__SANITIZE_MEMORY__)
78a498c3a227f2 Alexander Potapenko 2022-10-24 48 /*
78a498c3a227f2 Alexander Potapenko 2022-10-24 49 * For KMSAN builds all memcpy/memset/memmove calls should be replaced by the
78a498c3a227f2 Alexander Potapenko 2022-10-24 50 * corresponding __msan_XXX functions.
78a498c3a227f2 Alexander Potapenko 2022-10-24 51 */
78a498c3a227f2 Alexander Potapenko 2022-10-24 52 #include <linux/kmsan_string.h>
78a498c3a227f2 Alexander Potapenko 2022-10-24 53 #define __underlying_memcpy __msan_memcpy
78a498c3a227f2 Alexander Potapenko 2022-10-24 54 #define __underlying_memmove __msan_memmove
78a498c3a227f2 Alexander Potapenko 2022-10-24 55 #define __underlying_memset __msan_memset
78a498c3a227f2 Alexander Potapenko 2022-10-24 56 #else
a28a6e860c6cf2 Francis Laniel 2021-02-25 @57 #define __underlying_memcpy __builtin_memcpy
a28a6e860c6cf2 Francis Laniel 2021-02-25 58 #define __underlying_memmove __builtin_memmove
a28a6e860c6cf2 Francis Laniel 2021-02-25 59 #define __underlying_memset __builtin_memset
78a498c3a227f2 Alexander Potapenko 2022-10-24 60 #endif
78a498c3a227f2 Alexander Potapenko 2022-10-24 61
:::::: The code at line 57 was first introduced by commit
:::::: a28a6e860c6cf231cf3c5171c75c342adcd00406 string.h: move fortified functions definitions in a dedicated header.
:::::: TO: Francis Laniel <laniel_francis@privacyrequired.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-12 13:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12 13:07 [linux-next:master 4491/4552] include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox