Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-16 Thread Dmitry Torokhov
On Fri, Jun 16, 2017 at 1:56 PM, Arnd Bergmann wrote: > On Fri, Jun 16, 2017 at 7:29 PM, Dmitry Torokhov > wrote: >> On Fri, Jun 16, 2017 at 8:58 AM, Samuel Thibault >> wrote: >>> I'm however afraid we'd have to mark a lot

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-16 Thread Arnd Bergmann
On Fri, Jun 16, 2017 at 7:29 PM, Dmitry Torokhov wrote: > On Fri, Jun 16, 2017 at 8:58 AM, Samuel Thibault > wrote: >> Arnd Bergmann, on ven. 16 juin 2017 17:41:47 +0200, wrote: >>> The problem are the 'ch' and 'flag' variables that are

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-16 Thread Dmitry Torokhov
On Fri, Jun 16, 2017 at 8:58 AM, Samuel Thibault wrote: > Arnd Bergmann, on ven. 16 juin 2017 17:41:47 +0200, wrote: >> The problem are the 'ch' and 'flag' variables that are passed into >> tty_insert_flip_char by value, and from there into >>

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-16 Thread Andrey Ryabinin
On 06/16/2017 06:41 PM, Arnd Bergmann wrote: > On Fri, Jun 16, 2017 at 3:02 PM, Greg Kroah-Hartman > wrote: >> On Fri, Jun 16, 2017 at 02:01:57PM +0200, Arnd Bergmann wrote: >>> On Thu, Jun 15, 2017 at 6:53 AM, Greg Kroah-Hartman >>> wrote:

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-16 Thread Samuel Thibault
Arnd Bergmann, on ven. 16 juin 2017 17:41:47 +0200, wrote: > The problem are the 'ch' and 'flag' variables that are passed into > tty_insert_flip_char by value, and from there into > tty_insert_flip_string_flags by reference. In this case, kasan tries > to detect whether

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-16 Thread Arnd Bergmann
On Fri, Jun 16, 2017 at 3:02 PM, Greg Kroah-Hartman wrote: > On Fri, Jun 16, 2017 at 02:01:57PM +0200, Arnd Bergmann wrote: >> On Thu, Jun 15, 2017 at 6:53 AM, Greg Kroah-Hartman >> wrote: >> > On Thu, Jun 15, 2017 at 06:52:21AM +0200, Greg

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-16 Thread Greg Kroah-Hartman
On Fri, Jun 16, 2017 at 02:01:57PM +0200, Arnd Bergmann wrote: > On Thu, Jun 15, 2017 at 6:53 AM, Greg Kroah-Hartman > wrote: > > On Thu, Jun 15, 2017 at 06:52:21AM +0200, Greg Kroah-Hartman wrote: > >> On Wed, Jun 14, 2017 at 11:15:38PM +0200, Arnd Bergmann wrote: >

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-16 Thread Arnd Bergmann
On Thu, Jun 15, 2017 at 6:53 AM, Greg Kroah-Hartman wrote: > On Thu, Jun 15, 2017 at 06:52:21AM +0200, Greg Kroah-Hartman wrote: >> On Wed, Jun 14, 2017 at 11:15:38PM +0200, Arnd Bergmann wrote: >> > As reported by kernelci, some functions in the VT code use

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Greg Kroah-Hartman
On Thu, Jun 15, 2017 at 06:52:21AM +0200, Greg Kroah-Hartman wrote: > On Wed, Jun 14, 2017 at 11:15:38PM +0200, Arnd Bergmann wrote: > > As reported by kernelci, some functions in the VT code use significant > > amounts of kernel stack when local variables get inlined into the caller > > multiple

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Greg Kroah-Hartman
On Wed, Jun 14, 2017 at 11:15:38PM +0200, Arnd Bergmann wrote: > As reported by kernelci, some functions in the VT code use significant > amounts of kernel stack when local variables get inlined into the caller > multiple times: > > drivers/tty/vt/keyboard.c: In function 'kbd_keycode': >

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Samuel Thibault
Arnd Bergmann, on mer. 14 juin 2017 23:56:39 +0200, wrote: > > I however agree that it's a bad idea to inline it in functions where > > it's called so many times (and we're talking about the keyboard anyway). > > > >> -static void puts_queue(struct vc_data *vc, char *cp) > >> +static

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Arnd Bergmann
On Wed, Jun 14, 2017 at 11:28 PM, Samuel Thibault wrote: > Hello, > > Arnd Bergmann, on mer. 14 juin 2017 23:15:38 +0200, wrote: >> As reported by kernelci, some functions in the VT code use significant >> amounts of kernel stack when local variables get inlined into

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Samuel Thibault
Hello, Arnd Bergmann, on mer. 14 juin 2017 23:15:38 +0200, wrote: > As reported by kernelci, some functions in the VT code use significant > amounts of kernel stack when local variables get inlined into the caller > multiple times: > > drivers/tty/vt/keyboard.c: In function 'kbd_keycode': >

[PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-14 Thread Arnd Bergmann
As reported by kernelci, some functions in the VT code use significant amounts of kernel stack when local variables get inlined into the caller multiple times: drivers/tty/vt/keyboard.c: In function 'kbd_keycode': drivers/tty/vt/keyboard.c:1452:1: error: the frame size of 2240 bytes is larger