Re: UBSAN: Undefined behaviour in drivers/net/wireless/ath/ath10k/mac.c:3092:53: signed integer overflow

2018-01-19 Thread Andrey Ryabinin
2018-01-19 13:24 GMT+03:00 Kalle Valo : > Adding linux-wireless. > > For linux-wireless the full report is here: > > https://lkml.kernel.org/r/70aa931f-2f02-dd26-c98b-695d1321f...@molgen.mpg.de > > Paul Menzel writes: > >> I enabled the

Re: [PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-09-28 Thread Andrey Ryabinin
On 09/27/2017 04:26 PM, Arnd Bergmann wrote: > On Tue, Sep 26, 2017 at 9:49 AM, Andrey Ryabinin > <aryabi...@virtuozzo.com> wrote: >> >> >> On 09/26/2017 09:47 AM, Arnd Bergmann wrote: >>> On Mon, Sep 25, 2017 at 11:32 PM, Arnd Bergmann <a...@arndb.de>

Re: [PATCH v4 9/9] kasan: rework Kconfig settings

2017-09-26 Thread Andrey Ryabinin
ow_bug.cgi?id=81715) > and a workaround for older compilers, which means that KASAN_EXTRA is > now just as bad as before and will lead to an instant stack overflow in > a few extreme cases. > > This reverts parts of commit commit 3f181b4 ("lib/Kconfig.debug: disable > -Wframe-larger-than warnings with KASAN=y"). > > Signed-off-by: Arnd Bergmann <a...@arndb.de> Acked-by: Andrey Ryabinin <aryabi...@virtuozzo.com>

Re: [PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-09-26 Thread Andrey Ryabinin
On 09/26/2017 09:47 AM, Arnd Bergmann wrote: > On Mon, Sep 25, 2017 at 11:32 PM, Arnd Bergmann wrote: >> On Mon, Sep 25, 2017 at 7:41 AM, David Laight >> wrote: >>> From: Arnd Bergmann Sent: 22 September 2017 22:29 >>> ... It seems that this

Re: WARN_ON_ONCE(work > weight) in napi_poll()

2017-07-24 Thread Andrey Ryabinin
On 07/18/2017 09:47 AM, Ryan Hsu wrote: > On 07/11/2017 06:19 PM, Igor Mitsyanko wrote: > >> On 07/11/2017 10:28 AM, Andrey Ryabinin wrote: >>> >>> It gave me this: >>> >>> [118648.825347] #1 quota too big 72 64 16 >>> [11

Re: WARN_ON_ONCE(work > weight) in napi_poll()

2017-07-11 Thread Andrey Ryabinin
On 07/11/2017 12:24 AM, Ryan Hsu wrote: > On 07/04/2017 08:59 AM, Andrey Ryabinin wrote: > >> On 07/04/2017 04:49 PM, Kalle Valo wrote: >>> Andrey Ryabinin <aryabi...@virtuozzo.com> writes: >>> >>>> I occasionally hit WARN_ON_ONCE(work > weight

Re: WARN_ON_ONCE(work > weight) in napi_poll()

2017-07-04 Thread Andrey Ryabinin
On 07/04/2017 04:49 PM, Kalle Valo wrote: > Andrey Ryabinin <aryabi...@virtuozzo.com> writes: > >> I occasionally hit WARN_ON_ONCE(work > weight); in napi_poll() on a >> laptop with ath10k card. >> >> >> [37207.593370] [ cut here ]

WARN_ON_ONCE(work > weight) in napi_poll()

2017-06-30 Thread Andrey Ryabinin
I occasionally hit WARN_ON_ONCE(work > weight); in napi_poll() on a laptop with ath10k card. [37207.593370] [ cut here ] [37207.593380] WARNING: CPU: 0 PID: 7 at ../net/core/dev.c:5274 net_rx_action+0x258/0x360 [37207.593381] Modules linked in: snd_hda_codec_realtek

Re: [PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-03 Thread Andrey Ryabinin
On 03/02/2017 07:38 PM, Arnd Bergmann wrote: > When CONFIG_KASAN is set, we can run into some code that uses incredible > amounts of kernel stack: > > drivers/staging/dgnc/dgnc_neo.c:1056:1: error: the frame size of 2 bytes > is larger than 2048 bytes [-Werror=frame-larger-than=] >

Re: [PATCH 26/26] kasan: rework Kconfig settings

2017-03-03 Thread Andrey Ryabinin
On 03/02/2017 07:38 PM, Arnd Bergmann wrote: > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 97d62c2da6c2..27c838c40a36 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -216,10 +216,9 @@ config ENABLE_MUST_CHECK > config FRAME_WARN > int "Warn for stack

Re: [PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-03 Thread Andrey Ryabinin
On 03/03/2017 05:54 PM, Arnd Bergmann wrote: > On Fri, Mar 3, 2017 at 3:20 PM, Andrey Ryabinin <aryabi...@virtuozzo.com> > wrote: >> >> >> On 03/02/2017 07:38 PM, Arnd Bergmann wrote: >>> When CONFIG_KASAN is enabled, we have several functions that

Re: [PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-03 Thread Andrey Ryabinin
On 03/02/2017 07:38 PM, Arnd Bergmann wrote: > When CONFIG_KASAN is enabled, we have several functions that use rather > large kernel stacks, e.g. > > drivers/isdn/hardware/eicon/message.c: In function 'group_optimization': > drivers/isdn/hardware/eicon/message.c:14841:1: warning: the frame

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

[PATCH v4 2/3] mac80211: Prevent build failure with CONFIG_UBSAN=y

2015-12-03 Thread Andrey Ryabinin
array will trigger build failure) except it doesn't fail with CONFIG_UBSAN. As a bonus this patch slightly decreases size of hw_flag_names array. Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> Cc: Johannes Berg <johan...@sipsolutions.net> Cc: "David S. Miller" <da..

Re: [PATCH v4 2/3] mac80211: Prevent build failure with CONFIG_UBSAN=y

2015-12-03 Thread Andrey Ryabinin
2015-12-03 20:05 GMT+03:00 Johannes Berg <johan...@sipsolutions.net>: > On Thu, 2015-12-03 at 18:50 +0300, Andrey Ryabinin wrote: >> With upcoming CONFIG_UBSAN the following BUILD_BUG_ON in >> net/mac80211/debugfs.c starts to trigger: >> BUILD_BUG_ON(hw_flag_n