* [net-next:master 630/633] net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes
@ 2015-10-05 2:42 kbuild test robot
2015-10-05 9:47 ` David Miller
2015-10-05 10:11 ` [PATCH net-next] bridge: netlink: make br_fill_info's frame size smaller Nikolay Aleksandrov
0 siblings, 2 replies; 6+ messages in thread
From: kbuild test robot @ 2015-10-05 2:42 UTC (permalink / raw)
To: Nikolay Aleksandrov; +Cc: kbuild-all, netdev
[-- Attachment #1: Type: text/plain, Size: 3145 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 3e087caa23ef36370bfb925d3bbca78e8302d3ce
commit: 7e4df51eb35deedd3ba8d4db92a6c36fb7eff90a [630/633] bridge: netlink: add support for igmp's intervals
config: x86_64-randconfig-s0-10051005 (attached as .config)
reproduce:
git checkout 7e4df51eb35deedd3ba8d4db92a6c36fb7eff90a
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
net/bridge/br_netlink.c: In function 'br_fill_info':
>> net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes [-Wframe-larger-than=]
}
^
vim +1110 net/bridge/br_netlink.c
7e4df51e Nikolay Aleksandrov 2015-10-04 1094 return -EMSGSIZE;
7e4df51e Nikolay Aleksandrov 2015-10-04 1095 clockval = jiffies_to_clock_t(br->multicast_querier_interval);
7e4df51e Nikolay Aleksandrov 2015-10-04 1096 if (nla_put_u64(skb, IFLA_BR_MCAST_QUERIER_INTVL, clockval))
7e4df51e Nikolay Aleksandrov 2015-10-04 1097 return -EMSGSIZE;
7e4df51e Nikolay Aleksandrov 2015-10-04 1098 clockval = jiffies_to_clock_t(br->multicast_query_interval);
7e4df51e Nikolay Aleksandrov 2015-10-04 1099 if (nla_put_u64(skb, IFLA_BR_MCAST_QUERY_INTVL, clockval))
7e4df51e Nikolay Aleksandrov 2015-10-04 1100 return -EMSGSIZE;
7e4df51e Nikolay Aleksandrov 2015-10-04 1101 clockval = jiffies_to_clock_t(br->multicast_query_response_interval);
7e4df51e Nikolay Aleksandrov 2015-10-04 1102 if (nla_put_u64(skb, IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, clockval))
7e4df51e Nikolay Aleksandrov 2015-10-04 1103 return -EMSGSIZE;
7e4df51e Nikolay Aleksandrov 2015-10-04 1104 clockval = jiffies_to_clock_t(br->multicast_startup_query_interval);
7e4df51e Nikolay Aleksandrov 2015-10-04 1105 if (nla_put_u64(skb, IFLA_BR_MCAST_STARTUP_QUERY_INTVL, clockval))
7e4df51e Nikolay Aleksandrov 2015-10-04 1106 return -EMSGSIZE;
a9a6bc70 Nikolay Aleksandrov 2015-10-04 1107 #endif
a9a6bc70 Nikolay Aleksandrov 2015-10-04 1108
e5c3ea5c Jiri Pirko 2014-09-05 1109 return 0;
e5c3ea5c Jiri Pirko 2014-09-05 @1110 }
e5c3ea5c Jiri Pirko 2014-09-05 1111
fed0a159 Roopa Prabhu 2015-02-25 1112 static size_t br_get_link_af_size(const struct net_device *dev)
fed0a159 Roopa Prabhu 2015-02-25 1113 {
2594e906 Nikolay Aleksandrov 2015-09-25 1114 struct net_bridge_port *p;
2594e906 Nikolay Aleksandrov 2015-09-25 1115 struct net_bridge *br;
2594e906 Nikolay Aleksandrov 2015-09-25 1116 int num_vlans = 0;
fed0a159 Roopa Prabhu 2015-02-25 1117
2594e906 Nikolay Aleksandrov 2015-09-25 1118 if (br_port_exists(dev)) {
:::::: The code at line 1110 was first introduced by commit
:::::: e5c3ea5c668033b303e7ac835d7d91da32d97958 bridge: implement rtnl_link_ops->get_size and rtnl_link_ops->fill_info
:::::: TO: Jiri Pirko <jiri@resnulli.us>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 28319 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next:master 630/633] net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes
2015-10-05 9:47 ` David Miller
@ 2015-10-05 9:33 ` Nikolay Aleksandrov
2015-10-05 9:43 ` Nikolay Aleksandrov
0 siblings, 1 reply; 6+ messages in thread
From: Nikolay Aleksandrov @ 2015-10-05 9:33 UTC (permalink / raw)
To: David Miller, fengguang.wu; +Cc: kbuild-all, netdev
On 10/05/2015 11:47 AM, David Miller wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
> Date: Mon, 5 Oct 2015 10:42:54 +0800
>
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
>> head: 3e087caa23ef36370bfb925d3bbca78e8302d3ce
>> commit: 7e4df51eb35deedd3ba8d4db92a6c36fb7eff90a [630/633] bridge: netlink: add support for igmp's intervals
>> config: x86_64-randconfig-s0-10051005 (attached as .config)
>> reproduce:
>> git checkout 7e4df51eb35deedd3ba8d4db92a6c36fb7eff90a
>> # save the attached .config to linux build tree
>> make ARCH=x86_64
>>
>> All warnings (new ones prefixed by >>):
>>
>> net/bridge/br_netlink.c: In function 'br_fill_info':
>>>> net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes [-Wframe-larger-than=]
>> }
>
> Nikolay, please look into this.
>
I am, this looks like to be caused by enabling KASAN (kernel address sanitizer), there's
a lot of additional code generated and the frame grows bigger.
The same thing is being discussed here:
http://www.spinics.net/lists/linux-media/msg93925.html
The real size is much smaller without kasan.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next:master 630/633] net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes
2015-10-05 9:33 ` Nikolay Aleksandrov
@ 2015-10-05 9:43 ` Nikolay Aleksandrov
0 siblings, 0 replies; 6+ messages in thread
From: Nikolay Aleksandrov @ 2015-10-05 9:43 UTC (permalink / raw)
To: David Miller, fengguang.wu; +Cc: kbuild-all, netdev
On 10/05/2015 11:33 AM, Nikolay Aleksandrov wrote:
> On 10/05/2015 11:47 AM, David Miller wrote:
>> From: kbuild test robot <fengguang.wu@intel.com>
>> Date: Mon, 5 Oct 2015 10:42:54 +0800
>>
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
>>> head: 3e087caa23ef36370bfb925d3bbca78e8302d3ce
>>> commit: 7e4df51eb35deedd3ba8d4db92a6c36fb7eff90a [630/633] bridge: netlink: add support for igmp's intervals
>>> config: x86_64-randconfig-s0-10051005 (attached as .config)
>>> reproduce:
>>> git checkout 7e4df51eb35deedd3ba8d4db92a6c36fb7eff90a
>>> # save the attached .config to linux build tree
>>> make ARCH=x86_64
>>>
>>> All warnings (new ones prefixed by >>):
>>>
>>> net/bridge/br_netlink.c: In function 'br_fill_info':
>>>>> net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes [-Wframe-larger-than=]
>>> }
>>
>> Nikolay, please look into this.
>>
>
> I am, this looks like to be caused by enabling KASAN (kernel address sanitizer), there's
> a lot of additional code generated and the frame grows bigger.
> The same thing is being discussed here:
> http://www.spinics.net/lists/linux-media/msg93925.html
>
> The real size is much smaller without kasan.
>
I'm not sure how to proceed, would you like me to shrink the frame size so it's
less than 2160 bytes with KASAN enabled ?
It's 216 (without kasan) bytes vs 2160 (with).
Thanks,
Nik
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next:master 630/633] net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes
2015-10-05 2:42 [net-next:master 630/633] net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes kbuild test robot
@ 2015-10-05 9:47 ` David Miller
2015-10-05 9:33 ` Nikolay Aleksandrov
2015-10-05 10:11 ` [PATCH net-next] bridge: netlink: make br_fill_info's frame size smaller Nikolay Aleksandrov
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2015-10-05 9:47 UTC (permalink / raw)
To: fengguang.wu; +Cc: nikolay, kbuild-all, netdev
From: kbuild test robot <fengguang.wu@intel.com>
Date: Mon, 5 Oct 2015 10:42:54 +0800
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
> head: 3e087caa23ef36370bfb925d3bbca78e8302d3ce
> commit: 7e4df51eb35deedd3ba8d4db92a6c36fb7eff90a [630/633] bridge: netlink: add support for igmp's intervals
> config: x86_64-randconfig-s0-10051005 (attached as .config)
> reproduce:
> git checkout 7e4df51eb35deedd3ba8d4db92a6c36fb7eff90a
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All warnings (new ones prefixed by >>):
>
> net/bridge/br_netlink.c: In function 'br_fill_info':
>>> net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes [-Wframe-larger-than=]
> }
Nikolay, please look into this.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next] bridge: netlink: make br_fill_info's frame size smaller
2015-10-05 2:42 [net-next:master 630/633] net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes kbuild test robot
2015-10-05 9:47 ` David Miller
@ 2015-10-05 10:11 ` Nikolay Aleksandrov
2015-10-07 11:16 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: Nikolay Aleksandrov @ 2015-10-05 10:11 UTC (permalink / raw)
To: netdev; +Cc: davem, Nikolay Aleksandrov
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
When KASAN is enabled the frame size grows > 2048 bytes and we get a
warning, so make it smaller.
net/bridge/br_netlink.c: In function 'br_fill_info':
>> net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes
>> is larger than 2048 bytes [-Wframe-larger-than=]
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
net/bridge/br_netlink.c | 42 +++++++++++++++++++-----------------------
1 file changed, 19 insertions(+), 23 deletions(-)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 70efe2edde2b..330abf4b033a 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -1057,28 +1057,27 @@ static size_t br_get_size(const struct net_device *brdev)
static int br_fill_info(struct sk_buff *skb, const struct net_device *brdev)
{
struct net_bridge *br = netdev_priv(brdev);
- u64 hello_timer, tcn_timer, topology_change_timer, gc_timer, clockval;
u32 forward_delay = jiffies_to_clock_t(br->forward_delay);
u32 hello_time = jiffies_to_clock_t(br->hello_time);
u32 age_time = jiffies_to_clock_t(br->max_age);
u32 ageing_time = jiffies_to_clock_t(br->ageing_time);
u32 stp_enabled = br->stp_enabled;
u16 priority = (br->bridge_id.prio[0] << 8) | br->bridge_id.prio[1];
- u16 group_fwd_mask = br->group_fwd_mask;
u8 vlan_enabled = br_vlan_enabled(br);
- struct ifla_bridge_id root_id, bridge_id;
-
- memset(&bridge_id, 0, sizeof(bridge_id));
- memset(&root_id, 0, sizeof(root_id));
- memcpy(root_id.prio, br->designated_root.prio, sizeof(root_id.prio));
- memcpy(root_id.addr, br->designated_root.addr, sizeof(root_id.addr));
- memcpy(bridge_id.prio, br->bridge_id.prio, sizeof(bridge_id.prio));
- memcpy(bridge_id.addr, br->bridge_id.addr, sizeof(bridge_id.addr));
- hello_timer = br_timer_value(&br->hello_timer);
- tcn_timer = br_timer_value(&br->tcn_timer);
- topology_change_timer = br_timer_value(&br->topology_change_timer);
- gc_timer = br_timer_value(&br->gc_timer);
- clockval = 0;
+ u64 clockval;
+
+ clockval = br_timer_value(&br->hello_timer);
+ if (nla_put_u64(skb, IFLA_BR_HELLO_TIMER, clockval))
+ return -EMSGSIZE;
+ clockval = br_timer_value(&br->tcn_timer);
+ if (nla_put_u64(skb, IFLA_BR_TCN_TIMER, clockval))
+ return -EMSGSIZE;
+ clockval = br_timer_value(&br->topology_change_timer);
+ if (nla_put_u64(skb, IFLA_BR_TOPOLOGY_CHANGE_TIMER, clockval))
+ return -EMSGSIZE;
+ clockval = br_timer_value(&br->gc_timer);
+ if (nla_put_u64(skb, IFLA_BR_GC_TIMER, clockval))
+ return -EMSGSIZE;
if (nla_put_u32(skb, IFLA_BR_FORWARD_DELAY, forward_delay) ||
nla_put_u32(skb, IFLA_BR_HELLO_TIME, hello_time) ||
@@ -1087,19 +1086,16 @@ static int br_fill_info(struct sk_buff *skb, const struct net_device *brdev)
nla_put_u32(skb, IFLA_BR_STP_STATE, stp_enabled) ||
nla_put_u16(skb, IFLA_BR_PRIORITY, priority) ||
nla_put_u8(skb, IFLA_BR_VLAN_FILTERING, vlan_enabled) ||
- nla_put_u16(skb, IFLA_BR_GROUP_FWD_MASK, group_fwd_mask) ||
- nla_put(skb, IFLA_BR_ROOT_ID, sizeof(root_id), &root_id) ||
- nla_put(skb, IFLA_BR_BRIDGE_ID, sizeof(bridge_id), &bridge_id) ||
+ nla_put_u16(skb, IFLA_BR_GROUP_FWD_MASK, br->group_fwd_mask) ||
+ nla_put(skb, IFLA_BR_BRIDGE_ID, sizeof(struct ifla_bridge_id),
+ &br->bridge_id) ||
+ nla_put(skb, IFLA_BR_ROOT_ID, sizeof(struct ifla_bridge_id),
+ &br->designated_root) ||
nla_put_u16(skb, IFLA_BR_ROOT_PORT, br->root_port) ||
nla_put_u32(skb, IFLA_BR_ROOT_PATH_COST, br->root_path_cost) ||
nla_put_u8(skb, IFLA_BR_TOPOLOGY_CHANGE, br->topology_change) ||
nla_put_u8(skb, IFLA_BR_TOPOLOGY_CHANGE_DETECTED,
br->topology_change_detected) ||
- nla_put_u64(skb, IFLA_BR_HELLO_TIMER, hello_timer) ||
- nla_put_u64(skb, IFLA_BR_TCN_TIMER, tcn_timer) ||
- nla_put_u64(skb, IFLA_BR_TOPOLOGY_CHANGE_TIMER,
- topology_change_timer) ||
- nla_put_u64(skb, IFLA_BR_GC_TIMER, gc_timer) ||
nla_put(skb, IFLA_BR_GROUP_ADDR, ETH_ALEN, br->group_addr))
return -EMSGSIZE;
--
2.4.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] bridge: netlink: make br_fill_info's frame size smaller
2015-10-05 10:11 ` [PATCH net-next] bridge: netlink: make br_fill_info's frame size smaller Nikolay Aleksandrov
@ 2015-10-07 11:16 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-10-07 11:16 UTC (permalink / raw)
To: razor; +Cc: netdev, nikolay
From: Nikolay Aleksandrov <razor@blackwall.org>
Date: Mon, 5 Oct 2015 12:11:21 +0200
> From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
>
> When KASAN is enabled the frame size grows > 2048 bytes and we get a
> warning, so make it smaller.
> net/bridge/br_netlink.c: In function 'br_fill_info':
>>> net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes
>>> is larger than 2048 bytes [-Wframe-larger-than=]
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-07 11:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-05 2:42 [net-next:master 630/633] net/bridge/br_netlink.c:1110:1: warning: the frame size of 2160 bytes is larger than 2048 bytes kbuild test robot
2015-10-05 9:47 ` David Miller
2015-10-05 9:33 ` Nikolay Aleksandrov
2015-10-05 9:43 ` Nikolay Aleksandrov
2015-10-05 10:11 ` [PATCH net-next] bridge: netlink: make br_fill_info's frame size smaller Nikolay Aleksandrov
2015-10-07 11:16 ` David Miller
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.