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

2017-03-03 Thread David Laight
From: Andrey Ryabinin > Sent: 03 March 2017 13:50 ... > noinline_iff_kasan might be a better name. noinline_for_kasan gives the > impression > that we always noinline function for the sake of kasan, while > noinline_iff_kasan > clearly indicates that function is noinline only if kasan is used.

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

2017-03-03 Thread David Laight
From: Andrey Ryabinin > Sent: 03 March 2017 13:50 ... > noinline_iff_kasan might be a better name. noinline_for_kasan gives the > impression > that we always noinline function for the sake of kasan, while > noinline_iff_kasan > clearly indicates that function is noinline only if kasan is used.

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

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 3:33 PM, Alexander Potapenko wrote: > On Fri, Mar 3, 2017 at 3:30 PM, Arnd Bergmann wrote: >> On Fri, Mar 3, 2017 at 2:55 PM, Alexander Potapenko >> wrote: >> >> Would KMSAN also force local variables to be

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

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 3:33 PM, Alexander Potapenko wrote: > On Fri, Mar 3, 2017 at 3:30 PM, Arnd Bergmann wrote: >> On Fri, Mar 3, 2017 at 2:55 PM, Alexander Potapenko >> wrote: >> >> Would KMSAN also force local variables to be non-overlapping the way that >> asan-stack=1 and

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

2017-03-03 Thread Alexander Potapenko
On Fri, Mar 3, 2017 at 3:30 PM, Arnd Bergmann wrote: > On Fri, Mar 3, 2017 at 2:55 PM, Alexander Potapenko wrote: >> On Fri, Mar 3, 2017 at 2:50 PM, Andrey Ryabinin >> wrote: > @@ -416,6 +416,17 @@ static __always_inline void

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

2017-03-03 Thread Alexander Potapenko
On Fri, Mar 3, 2017 at 3:30 PM, Arnd Bergmann wrote: > On Fri, Mar 3, 2017 at 2:55 PM, Alexander Potapenko wrote: >> On Fri, Mar 3, 2017 at 2:50 PM, Andrey Ryabinin >> wrote: > @@ -416,6 +416,17 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s

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

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 2:55 PM, Alexander Potapenko wrote: > On Fri, Mar 3, 2017 at 2:50 PM, Andrey Ryabinin > wrote: >>> @@ -416,6 +416,17 @@ static __always_inline void __write_once_size(volatile >>> void *p, void *res, int s >>> */ >>> #define

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

2017-03-03 Thread Arnd Bergmann
On Fri, Mar 3, 2017 at 2:55 PM, Alexander Potapenko wrote: > On Fri, Mar 3, 2017 at 2:50 PM, Andrey Ryabinin > wrote: >>> @@ -416,6 +416,17 @@ static __always_inline void __write_once_size(volatile >>> void *p, void *res, int s >>> */ >>> #define noinline_for_stack noinline >>> >>> +/* >>>

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

2017-03-03 Thread Alexander Potapenko
On Fri, Mar 3, 2017 at 2:50 PM, Andrey Ryabinin wrote: > > > 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

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

2017-03-03 Thread Alexander Potapenko
On Fri, Mar 3, 2017 at 2:50 PM, Andrey Ryabinin wrote: > > > 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 >>

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 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=] >

[PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-02 Thread Arnd Bergmann
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=] drivers/media/i2c/cx25840/cx25840-core.c:4960:1: error: the frame

[PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-02 Thread Arnd Bergmann
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=] drivers/media/i2c/cx25840/cx25840-core.c:4960:1: error: the frame