Re: [PATCH V5 3/4] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-13 Thread Arnd Bergmann
On Mon, Feb 13, 2017 at 6:07 PM, David Laight wrote: > From: Arnd Bergmann >> Sent: 13 February 2017 17:02 > ... >> >> > + ioctl_ptr = memdup_user(arg, _IOC_SIZE(cmd)); >> >> > + if (IS_ERR_OR_NULL(ioctl_ptr)) { >> >> > + ret = PTR_ERR(ioctl_ptr); >> >> > +

RE: [PATCH V5 3/4] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-13 Thread David Laight
From: Arnd Bergmann > Sent: 13 February 2017 17:02 ... > >> > + ioctl_ptr = memdup_user(arg, _IOC_SIZE(cmd)); > >> > + if (IS_ERR_OR_NULL(ioctl_ptr)) { > >> > + ret = PTR_ERR(ioctl_ptr); > >> > + goto out; > >> ... > >> > + out: > >> > + kfree(ioctl_ptr); > >> > +

Re: [PATCH V5 3/4] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-13 Thread Arnd Bergmann
On Mon, Feb 13, 2017 at 5:29 PM, Scott Bauer wrote: > On Mon, Feb 13, 2017 at 04:30:36PM +, David Laight wrote: >> From: Scott Bauer Sent: 13 February 2017 16:11 >> > When CONFIG_KASAN is enabled, compilation fails: >> > >> > block/sed-opal.c: In function 'sed_ioctl':

Re: [PATCH V5 3/4] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-13 Thread Scott Bauer
On Mon, Feb 13, 2017 at 04:30:36PM +, David Laight wrote: > From: Scott Bauer Sent: 13 February 2017 16:11 > > When CONFIG_KASAN is enabled, compilation fails: > > > > block/sed-opal.c: In function 'sed_ioctl': > > block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than >

RE: [PATCH V5 3/4] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-13 Thread David Laight
From: Scott Bauer Sent: 13 February 2017 16:11 > When CONFIG_KASAN is enabled, compilation fails: > > block/sed-opal.c: In function 'sed_ioctl': > block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than > 2048 bytes [-Werror=frame- > larger-than=] > > Moved all the ioctl

[PATCH V5 3/4] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-13 Thread Scott Bauer
When CONFIG_KASAN is enabled, compilation fails: block/sed-opal.c: In function 'sed_ioctl': block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Moved all the ioctl structures off the stack and dynamically activate using _IOC_SIZE()