* [xilinx-xlnx:master 248/711] include/linux/fortify-string.h:187:4: error: call to __read_overflow2 declared with 'error' attribute: detected read beyond size of object passed as 2nd parameter
@ 2022-04-16 2:07 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-16 2:07 UTC (permalink / raw)
Cc: llvm, kbuild-all, linux-arm-kernel, Michal Simek
tree: https://github.com/Xilinx/linux-xlnx master
head: 0b70857ca66da7d471f5c17d1af67a2af273a960
commit: 9b62852ec04b7d48971ce8016b13c27403929908 [248/711] Merge tag 'v5.15' into master
config: x86_64-randconfig-a016 (https://download.01.org/0day-ci/archive/20220416/202204160956.OFscVu9U-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8e43cbab33765c476337571e5ed11b005199dd0d)
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/Xilinx/linux-xlnx/commit/9b62852ec04b7d48971ce8016b13c27403929908
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx master
git checkout 9b62852ec04b7d48971ce8016b13c27403929908
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2652:5: warning: no previous prototype for function 'axienet_ethtools_sset_count' [-Wmissing-prototypes]
int axienet_ethtools_sset_count(struct net_device *ndev, int sset)
^
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2652:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int axienet_ethtools_sset_count(struct net_device *ndev, int sset)
^
static
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2675:6: warning: no previous prototype for function 'axienet_ethtools_get_stats' [-Wmissing-prototypes]
void axienet_ethtools_get_stats(struct net_device *ndev,
^
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2675:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void axienet_ethtools_get_stats(struct net_device *ndev,
^
static
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2702:6: warning: no previous prototype for function 'axienet_ethtools_strings' [-Wmissing-prototypes]
void axienet_ethtools_strings(struct net_device *ndev, u32 sset, u8 *data)
^
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void axienet_ethtools_strings(struct net_device *ndev, u32 sset, u8 *data)
^
static
In file included from drivers/net/ethernet/xilinx/xilinx_axienet_main.c:25:
In file included from include/linux/clk.h:14:
In file included from include/linux/notifier.h:14:
In file included from include/linux/mutex.h:17:
In file included from include/linux/lockdep.h:14:
In file included from include/linux/smp.h:13:
In file included from include/linux/cpumask.h:12:
In file included from include/linux/bitmap.h:10:
In file included from include/linux/string.h:262:
>> include/linux/fortify-string.h:187:4: error: call to __read_overflow2 declared with 'error' attribute: detected read beyond size of object passed as 2nd parameter
__read_overflow2();
^
3 warnings and 1 error generated.
vim +/error +187 include/linux/fortify-string.h
a28a6e860c6cf2 Francis Laniel 2021-02-25 177
a28a6e860c6cf2 Francis Laniel 2021-02-25 178 __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
a28a6e860c6cf2 Francis Laniel 2021-02-25 179 {
a28a6e860c6cf2 Francis Laniel 2021-02-25 180 size_t p_size = __builtin_object_size(p, 0);
a28a6e860c6cf2 Francis Laniel 2021-02-25 181 size_t q_size = __builtin_object_size(q, 0);
a28a6e860c6cf2 Francis Laniel 2021-02-25 182
a28a6e860c6cf2 Francis Laniel 2021-02-25 183 if (__builtin_constant_p(size)) {
a28a6e860c6cf2 Francis Laniel 2021-02-25 184 if (p_size < size)
a28a6e860c6cf2 Francis Laniel 2021-02-25 185 __write_overflow();
a28a6e860c6cf2 Francis Laniel 2021-02-25 186 if (q_size < size)
a28a6e860c6cf2 Francis Laniel 2021-02-25 @187 __read_overflow2();
a28a6e860c6cf2 Francis Laniel 2021-02-25 188 }
a28a6e860c6cf2 Francis Laniel 2021-02-25 189 if (p_size < size || q_size < size)
a28a6e860c6cf2 Francis Laniel 2021-02-25 190 fortify_panic(__func__);
a28a6e860c6cf2 Francis Laniel 2021-02-25 191 return __underlying_memcpy(p, q, size);
a28a6e860c6cf2 Francis Laniel 2021-02-25 192 }
a28a6e860c6cf2 Francis Laniel 2021-02-25 193
:::::: The code at line 187 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://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* [xilinx-xlnx:master 248/711] include/linux/fortify-string.h:187:4: error: call to __read_overflow2 declared with 'error' attribute: detected read beyond size of object passed as 2nd parameter
@ 2022-04-16 2:07 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-16 2:07 UTC (permalink / raw)
Cc: llvm, kbuild-all, linux-arm-kernel, Michal Simek
tree: https://github.com/Xilinx/linux-xlnx master
head: 0b70857ca66da7d471f5c17d1af67a2af273a960
commit: 9b62852ec04b7d48971ce8016b13c27403929908 [248/711] Merge tag 'v5.15' into master
config: x86_64-randconfig-a016 (https://download.01.org/0day-ci/archive/20220416/202204160956.OFscVu9U-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8e43cbab33765c476337571e5ed11b005199dd0d)
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/Xilinx/linux-xlnx/commit/9b62852ec04b7d48971ce8016b13c27403929908
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx master
git checkout 9b62852ec04b7d48971ce8016b13c27403929908
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2652:5: warning: no previous prototype for function 'axienet_ethtools_sset_count' [-Wmissing-prototypes]
int axienet_ethtools_sset_count(struct net_device *ndev, int sset)
^
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2652:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int axienet_ethtools_sset_count(struct net_device *ndev, int sset)
^
static
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2675:6: warning: no previous prototype for function 'axienet_ethtools_get_stats' [-Wmissing-prototypes]
void axienet_ethtools_get_stats(struct net_device *ndev,
^
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2675:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void axienet_ethtools_get_stats(struct net_device *ndev,
^
static
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2702:6: warning: no previous prototype for function 'axienet_ethtools_strings' [-Wmissing-prototypes]
void axienet_ethtools_strings(struct net_device *ndev, u32 sset, u8 *data)
^
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void axienet_ethtools_strings(struct net_device *ndev, u32 sset, u8 *data)
^
static
In file included from drivers/net/ethernet/xilinx/xilinx_axienet_main.c:25:
In file included from include/linux/clk.h:14:
In file included from include/linux/notifier.h:14:
In file included from include/linux/mutex.h:17:
In file included from include/linux/lockdep.h:14:
In file included from include/linux/smp.h:13:
In file included from include/linux/cpumask.h:12:
In file included from include/linux/bitmap.h:10:
In file included from include/linux/string.h:262:
>> include/linux/fortify-string.h:187:4: error: call to __read_overflow2 declared with 'error' attribute: detected read beyond size of object passed as 2nd parameter
__read_overflow2();
^
3 warnings and 1 error generated.
vim +/error +187 include/linux/fortify-string.h
a28a6e860c6cf2 Francis Laniel 2021-02-25 177
a28a6e860c6cf2 Francis Laniel 2021-02-25 178 __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
a28a6e860c6cf2 Francis Laniel 2021-02-25 179 {
a28a6e860c6cf2 Francis Laniel 2021-02-25 180 size_t p_size = __builtin_object_size(p, 0);
a28a6e860c6cf2 Francis Laniel 2021-02-25 181 size_t q_size = __builtin_object_size(q, 0);
a28a6e860c6cf2 Francis Laniel 2021-02-25 182
a28a6e860c6cf2 Francis Laniel 2021-02-25 183 if (__builtin_constant_p(size)) {
a28a6e860c6cf2 Francis Laniel 2021-02-25 184 if (p_size < size)
a28a6e860c6cf2 Francis Laniel 2021-02-25 185 __write_overflow();
a28a6e860c6cf2 Francis Laniel 2021-02-25 186 if (q_size < size)
a28a6e860c6cf2 Francis Laniel 2021-02-25 @187 __read_overflow2();
a28a6e860c6cf2 Francis Laniel 2021-02-25 188 }
a28a6e860c6cf2 Francis Laniel 2021-02-25 189 if (p_size < size || q_size < size)
a28a6e860c6cf2 Francis Laniel 2021-02-25 190 fortify_panic(__func__);
a28a6e860c6cf2 Francis Laniel 2021-02-25 191 return __underlying_memcpy(p, q, size);
a28a6e860c6cf2 Francis Laniel 2021-02-25 192 }
a28a6e860c6cf2 Francis Laniel 2021-02-25 193
:::::: The code at line 187 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://01.org/lkp
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-16 2:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-16 2:07 [xilinx-xlnx:master 248/711] include/linux/fortify-string.h:187:4: error: call to __read_overflow2 declared with 'error' attribute: detected read beyond size of object passed as 2nd parameter kernel test robot
2022-04-16 2:07 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.