* Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" @ 2018-02-05 6:21 Heiner Kallweit 2018-02-05 7:17 ` Yury Norov 2018-02-06 16:17 ` David Miller 0 siblings, 2 replies; 7+ messages in thread From: Heiner Kallweit @ 2018-02-05 6:21 UTC (permalink / raw) To: Yury Norov; +Cc: Andrew Morton, Stephen Rothwell, netdev Recently ethtool started to give incomplete values for supported and advertised modes. There seems to be a regression in this commit: The bit number parameter in the calls to bitmap_to_arr32() in store_link_ksettings_for_user() should be __ETHTOOL_LINK_MODE_MASK_NBITS instead of __ETHTOOL_LINK_MODE_MASK_NU32. After having changed this ethtool behaves normally again. Heiner ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" 2018-02-05 6:21 Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" Heiner Kallweit @ 2018-02-05 7:17 ` Yury Norov 2018-02-06 16:17 ` David Miller 1 sibling, 0 replies; 7+ messages in thread From: Yury Norov @ 2018-02-05 7:17 UTC (permalink / raw) To: Heiner Kallweit; +Cc: Andrew Morton, Stephen Rothwell, netdev On Mon, Feb 05, 2018 at 07:21:32AM +0100, Heiner Kallweit wrote: > Recently ethtool started to give incomplete values for supported and > advertised modes. There seems to be a regression in this commit: > The bit number parameter in the calls to bitmap_to_arr32() in > store_link_ksettings_for_user() should be __ETHTOOL_LINK_MODE_MASK_NBITS > instead of __ETHTOOL_LINK_MODE_MASK_NU32. > > After having changed this ethtool behaves normally again. > > Heiner Hi Heiner, Thank you for discovering this, and sorry for my error. The patch is below. Yury >From af960f7ae1be8e86abfaa39300ba690c24a80e5b Mon Sep 17 00:00:00 2001 From: Yury Norov <ynorov@caviumnetworks.com> Date: Mon, 5 Feb 2018 10:01:59 +0300 Subject: [PATCH] Fix 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" During rework, bitmap_to_arr32() was erroneously passed with __ETHTOOL_LINK_MODE_MASK_NU32 instead of __ETHTOOL_LINK_MODE_MASK_NBITS. Fixes: 39461af74125fd268 (bitmap: replace bitmap_{from,to}_u32array) Reported-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> --- net/core/ethtool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 1822335518ea..494e6a5d7306 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -642,13 +642,13 @@ store_link_ksettings_for_user(void __user *to, memcpy(&link_usettings.base, &from->base, sizeof(link_usettings)); bitmap_to_arr32(link_usettings.link_modes.supported, from->link_modes.supported, - __ETHTOOL_LINK_MODE_MASK_NU32); + __ETHTOOL_LINK_MODE_MASK_NBITS); bitmap_to_arr32(link_usettings.link_modes.advertising, from->link_modes.advertising, - __ETHTOOL_LINK_MODE_MASK_NU32); + __ETHTOOL_LINK_MODE_MASK_NBITS); bitmap_to_arr32(link_usettings.link_modes.lp_advertising, from->link_modes.lp_advertising, - __ETHTOOL_LINK_MODE_MASK_NU32); + __ETHTOOL_LINK_MODE_MASK_NBITS); if (copy_to_user(to, &link_usettings, sizeof(link_usettings))) return -EFAULT; -- 2.14.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" 2018-02-05 6:21 Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" Heiner Kallweit 2018-02-05 7:17 ` Yury Norov @ 2018-02-06 16:17 ` David Miller 2018-02-06 16:26 ` Yury Norov 1 sibling, 1 reply; 7+ messages in thread From: David Miller @ 2018-02-06 16:17 UTC (permalink / raw) To: hkallweit1; +Cc: ynorov, akpm, sfr, netdev From: Heiner Kallweit <hkallweit1@gmail.com> Date: Mon, 5 Feb 2018 07:21:32 +0100 > Recently ethtool started to give incomplete values for supported and > advertised modes. There seems to be a regression in this commit: > The bit number parameter in the calls to bitmap_to_arr32() in > store_link_ksettings_for_user() should be __ETHTOOL_LINK_MODE_MASK_NBITS > instead of __ETHTOOL_LINK_MODE_MASK_NU32. > > After having changed this ethtool behaves normally again. I do not see the commit with the SHA1 ID from the Subject line in either Linus's nor my networking tree. Where is that change? [davem@dhcp-10-15-49-227 linux]$ git show 39461af74125 >x.diff fatal: ambiguous argument '39461af74125': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' [davem@dhcp-10-15-49-227 linux]$ cd ../net [davem@dhcp-10-15-49-227 net]$ git show 39461af74125 >x.diff fatal: ambiguous argument '39461af74125': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' [davem@dhcp-10-15-49-227 net]$ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" 2018-02-06 16:17 ` David Miller @ 2018-02-06 16:26 ` Yury Norov 2018-02-06 16:42 ` David Miller 0 siblings, 1 reply; 7+ messages in thread From: Yury Norov @ 2018-02-06 16:26 UTC (permalink / raw) To: David Miller; +Cc: hkallweit1, akpm, sfr, netdev On Tue, Feb 06, 2018 at 11:17:36AM -0500, David Miller wrote: > From: Heiner Kallweit <hkallweit1@gmail.com> > Date: Mon, 5 Feb 2018 07:21:32 +0100 > > > Recently ethtool started to give incomplete values for supported and > > advertised modes. There seems to be a regression in this commit: > > The bit number parameter in the calls to bitmap_to_arr32() in > > store_link_ksettings_for_user() should be __ETHTOOL_LINK_MODE_MASK_NBITS > > instead of __ETHTOOL_LINK_MODE_MASK_NU32. > > > > After having changed this ethtool behaves normally again. > > I do not see the commit with the SHA1 ID from the Subject line in > either Linus's nor my networking tree. > > Where is that change? It's in next-20180202. Yury ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" 2018-02-06 16:26 ` Yury Norov @ 2018-02-06 16:42 ` David Miller 2018-02-06 17:03 ` Yury Norov 0 siblings, 1 reply; 7+ messages in thread From: David Miller @ 2018-02-06 16:42 UTC (permalink / raw) To: ynorov; +Cc: hkallweit1, akpm, sfr, netdev From: Yury Norov <ynorov@caviumnetworks.com> Date: Tue, 6 Feb 2018 19:26:23 +0300 > On Tue, Feb 06, 2018 at 11:17:36AM -0500, David Miller wrote: >> From: Heiner Kallweit <hkallweit1@gmail.com> >> Date: Mon, 5 Feb 2018 07:21:32 +0100 >> >> > Recently ethtool started to give incomplete values for supported and >> > advertised modes. There seems to be a regression in this commit: >> > The bit number parameter in the calls to bitmap_to_arr32() in >> > store_link_ksettings_for_user() should be __ETHTOOL_LINK_MODE_MASK_NBITS >> > instead of __ETHTOOL_LINK_MODE_MASK_NU32. >> > >> > After having changed this ethtool behaves normally again. >> >> I do not see the commit with the SHA1 ID from the Subject line in >> either Linus's nor my networking tree. >> >> Where is that change? > > It's in next-20180202. Hmmm, then the fix should probably go into whatever tree that commit ultimately came from. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" 2018-02-06 16:42 ` David Miller @ 2018-02-06 17:03 ` Yury Norov 2018-02-06 17:53 ` David Miller 0 siblings, 1 reply; 7+ messages in thread From: Yury Norov @ 2018-02-06 17:03 UTC (permalink / raw) To: David Miller; +Cc: hkallweit1, akpm, sfr, netdev On Tue, Feb 06, 2018 at 11:42:18AM -0500, David Miller wrote: > From: Yury Norov <ynorov@caviumnetworks.com> > Date: Tue, 6 Feb 2018 19:26:23 +0300 > > > On Tue, Feb 06, 2018 at 11:17:36AM -0500, David Miller wrote: > >> From: Heiner Kallweit <hkallweit1@gmail.com> > >> Date: Mon, 5 Feb 2018 07:21:32 +0100 > >> > >> > Recently ethtool started to give incomplete values for supported and > >> > advertised modes. There seems to be a regression in this commit: > >> > The bit number parameter in the calls to bitmap_to_arr32() in > >> > store_link_ksettings_for_user() should be __ETHTOOL_LINK_MODE_MASK_NBITS > >> > instead of __ETHTOOL_LINK_MODE_MASK_NU32. > >> > > >> > After having changed this ethtool behaves normally again. > >> > >> I do not see the commit with the SHA1 ID from the Subject line in > >> either Linus's nor my networking tree. > >> > >> Where is that change? > > > > It's in next-20180202. > > Hmmm, then the fix should probably go into whatever tree that commit > ultimately came from. It's already in Andrew's tree. The original patch is not about networking, and Andrew's tree is probably better place for fix. My apologies for noise in your tree. http://ozlabs.org/~akpm/mmots/broken-out/bitmap-replace-bitmap_fromto_u32array-fix-2.patch ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" 2018-02-06 17:03 ` Yury Norov @ 2018-02-06 17:53 ` David Miller 0 siblings, 0 replies; 7+ messages in thread From: David Miller @ 2018-02-06 17:53 UTC (permalink / raw) To: ynorov; +Cc: hkallweit1, akpm, sfr, netdev From: Yury Norov <ynorov@caviumnetworks.com> Date: Tue, 6 Feb 2018 20:03:13 +0300 > On Tue, Feb 06, 2018 at 11:42:18AM -0500, David Miller wrote: >> From: Yury Norov <ynorov@caviumnetworks.com> >> Date: Tue, 6 Feb 2018 19:26:23 +0300 >> >> > On Tue, Feb 06, 2018 at 11:17:36AM -0500, David Miller wrote: >> >> From: Heiner Kallweit <hkallweit1@gmail.com> >> >> Date: Mon, 5 Feb 2018 07:21:32 +0100 >> >> >> >> > Recently ethtool started to give incomplete values for supported and >> >> > advertised modes. There seems to be a regression in this commit: >> >> > The bit number parameter in the calls to bitmap_to_arr32() in >> >> > store_link_ksettings_for_user() should be __ETHTOOL_LINK_MODE_MASK_NBITS >> >> > instead of __ETHTOOL_LINK_MODE_MASK_NU32. >> >> > >> >> > After having changed this ethtool behaves normally again. >> >> >> >> I do not see the commit with the SHA1 ID from the Subject line in >> >> either Linus's nor my networking tree. >> >> >> >> Where is that change? >> > >> > It's in next-20180202. >> >> Hmmm, then the fix should probably go into whatever tree that commit >> ultimately came from. > > It's already in Andrew's tree. The original patch is not about networking, > and Andrew's tree is probably better place for fix. My apologies for noise > in your tree. > > http://ozlabs.org/~akpm/mmots/broken-out/bitmap-replace-bitmap_fromto_u32array-fix-2.patch Thanks for the clarification. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-02-06 17:53 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-02-05 6:21 Regression in 39461af74125 "bitmap: replace bitmap_{from,to}_u32array" Heiner Kallweit 2018-02-05 7:17 ` Yury Norov 2018-02-06 16:17 ` David Miller 2018-02-06 16:26 ` Yury Norov 2018-02-06 16:42 ` David Miller 2018-02-06 17:03 ` Yury Norov 2018-02-06 17:53 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).