RE: KASAN+netlink, was: [PATCH] [net-next?] hns: avoid stack overflow with CONFIG_KASAN

2017-02-08 Thread David Laight
> From: Johannes Berg > Sent: 08 February 2017 12:24 ... > Btw, what's causing this to start with? Can't the compiler reuse the > stack places? Only if it realises they've gone out of scope - which probably doesn't happen when the functions are inlined. The address of the parameter can be saved

Re: KASAN+netlink, was: [PATCH] [net-next?] hns: avoid stack overflow with CONFIG_KASAN

2017-02-08 Thread Andrey Ryabinin
2017-02-08 16:10 GMT+03:00 Arnd Bergmann : > On Wed, Feb 8, 2017 at 1:24 PM, Johannes Berg > wrote: > >> Btw, what's causing this to start with? Can't the compiler reuse the >> stack places? > > I have no idea. It's trying to find out of bounds accesses

Re: KASAN+netlink, was: [PATCH] [net-next?] hns: avoid stack overflow with CONFIG_KASAN

2017-02-08 Thread Arnd Bergmann
On Wed, Feb 8, 2017 at 1:24 PM, Johannes Berg wrote: > On Wed, 2017-02-08 at 13:03 +0100, Arnd Bergmann wrote: >> >> - Moving nla_put_{u8,u16,u32} out of line is probably uncontroversial >> and >> it helps enough with br_netlink.c, but nl820211 is worse and needs >>