* [PATCH net] bonding: fix send_peer_notif data truncation
@ 2021-01-26 11:52 liaichun
2021-01-27 2:19 ` Jakub Kicinski
2021-01-27 5:05 ` kernel test robot
0 siblings, 2 replies; 4+ messages in thread
From: liaichun @ 2021-01-26 11:52 UTC (permalink / raw)
To: Stephen Hemminger, David Ahern, davem, kuba; +Cc: netdev
send_peer_notif is u8, the value of this parameter is obtained from u8*int, the data may be truncated.
And in practice, more than u8(256) characters are used.
Fixes: 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications")
Signed-off-by: Aichun Li <liaichun@huawei.com>
---
include/net/bonding.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/bonding.h b/include/net/bonding.h index 0960d9af7b8e..65394566d556 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -215,7 +215,7 @@ struct bonding {
*/
spinlock_t mode_lock;
spinlock_t stats_lock;
- u8 send_peer_notif;
+ u64 send_peer_notif;
u8 igmp_retrans;
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_entry;
--
2.19.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] bonding: fix send_peer_notif data truncation
2021-01-26 11:52 [PATCH net] bonding: fix send_peer_notif data truncation liaichun
@ 2021-01-27 2:19 ` Jakub Kicinski
2021-01-27 5:05 ` kernel test robot
1 sibling, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2021-01-27 2:19 UTC (permalink / raw)
To: liaichun; +Cc: Stephen Hemminger, David Ahern, davem, netdev
On Tue, 26 Jan 2021 11:52:01 +0000 liaichun wrote:
> send_peer_notif is u8, the value of this parameter is obtained from u8*int, the data may be truncated.
> And in practice, more than u8(256) characters are used.
New line before Fixes
> Fixes: 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications")
>
no new line after Fixes
> Signed-off-by: Aichun Li <liaichun@huawei.com>
Please CC these folks on v2:
BONDING DRIVER
M: Jay Vosburgh <j.vosburgh@gmail.com>
M: Veaceslav Falico <vfalico@gmail.com>
M: Andy Gospodarek <andy@greyhouse.net>
> diff --git a/include/net/bonding.h b/include/net/bonding.h index 0960d9af7b8e..65394566d556 100644
> --- a/include/net/bonding.h
> +++ b/include/net/bonding.h
> @@ -215,7 +215,7 @@ struct bonding {
> */
> spinlock_t mode_lock;
> spinlock_t stats_lock;
> - u8 send_peer_notif;
> + u64 send_peer_notif;
> u8 igmp_retrans;
> #ifdef CONFIG_PROC_FS
> struct proc_dir_entry *proc_entry;
This breaks 32bit builds, as the value is used in divisions.
Please fix and resend.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] bonding: fix send_peer_notif data truncation
2021-01-26 11:52 [PATCH net] bonding: fix send_peer_notif data truncation liaichun
@ 2021-01-27 5:05 ` kernel test robot
2021-01-27 5:05 ` kernel test robot
1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-01-27 5:05 UTC (permalink / raw)
To: liaichun, Stephen Hemminger, David Ahern, davem, kuba; +Cc: kbuild-all, netdev
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]
Hi liaichun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net/master]
url: https://github.com/0day-ci/linux/commits/liaichun/bonding-fix-send_peer_notif-data-truncation/20210127-081947
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 07d46d93c9acdfe0614071d73c415dd5f745cc6e
config: parisc-defconfig (attached as .config)
compiler: hppa-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/2cc126f82ce8efc1217f123cfeac750b3a7fba2c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review liaichun/bonding-fix-send_peer_notif-data-truncation/20210127-081947
git checkout 2cc126f82ce8efc1217f123cfeac750b3a7fba2c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>, old ones prefixed by <<):
>> ERROR: modpost: "__umoddi3" [drivers/net/bonding/bonding.ko] undefined!
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 18363 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] bonding: fix send_peer_notif data truncation
@ 2021-01-27 5:05 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-01-27 5:05 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]
Hi liaichun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net/master]
url: https://github.com/0day-ci/linux/commits/liaichun/bonding-fix-send_peer_notif-data-truncation/20210127-081947
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 07d46d93c9acdfe0614071d73c415dd5f745cc6e
config: parisc-defconfig (attached as .config)
compiler: hppa-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/2cc126f82ce8efc1217f123cfeac750b3a7fba2c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review liaichun/bonding-fix-send_peer_notif-data-truncation/20210127-081947
git checkout 2cc126f82ce8efc1217f123cfeac750b3a7fba2c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>, old ones prefixed by <<):
>> ERROR: modpost: "__umoddi3" [drivers/net/bonding/bonding.ko] undefined!
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 18363 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-27 5:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 11:52 [PATCH net] bonding: fix send_peer_notif data truncation liaichun
2021-01-27 2:19 ` Jakub Kicinski
2021-01-27 5:05 ` kernel test robot
2021-01-27 5:05 ` 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.