Re: [PATCH] block: sed-opal: reduce stack size of ioctl handler

2017-02-08 Thread Scott Bauer
On Wed, Feb 08, 2017 at 10:15:28PM +0100, Arnd Bergmann wrote: > When CONFIG_KASAN is in use, the sed_ioctl function uses unusually large > stack, > as each possible ioctl argument gets its own stack area plus redzone: > > block/sed-opal.c: In function 'sed_ioctl': > block/sed-opal.c:2447:1: erro

Re: [PATCH] block: sed-opal: reduce stack size of ioctl handler

2017-02-08 Thread Scott Bauer
On Wed, Feb 08, 2017 at 02:58:28PM -0700, Scott Bauer wrote: > On Wed, Feb 08, 2017 at 10:15:28PM +0100, Arnd Bergmann wrote: > > When CONFIG_KASAN is in use, the sed_ioctl function uses unusually large > > stack, > > as each possible ioctl argument gets its own stack area plus redzone: > > > > b

RE: [PATCH] block: sed-opal: reduce stack size of ioctl handler

2017-02-09 Thread David Laight
From: Arnd Bergmann > Sent: 08 February 2017 21:15 > > When CONFIG_KASAN is in use, the sed_ioctl function uses unusually large > stack, > as each possible ioctl argument gets its own stack area plus redzone: Why not do a single copy_from_user() at the top of sed_ioctl() based on the _IOC_DIR() a

Re: [PATCH] block: sed-opal: reduce stack size of ioctl handler

2017-02-09 Thread Arnd Bergmann
On Wed, Feb 8, 2017 at 11:12 PM, Scott Bauer wrote: > On Wed, Feb 08, 2017 at 02:58:28PM -0700, Scott Bauer wrote: >> Thank you for the report. We want to keep the function calls agnostic to >> userland. >> In the future we will have in-kernel callers and I don't want to have to do >> any >> get