diff options
author | Scott Bauer <scott.bauer@intel.com> | 2017-02-14 19:29:36 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-02-14 21:47:18 -0500 |
commit | e225c20eb0fd0b6657e640408f11ee392dc82b5b (patch) | |
tree | 16caa1d305159a1306478a58483278fe13d2e9b2 /include/linux/sed-opal.h | |
parent | 24bff4d78a572d25fe2a0818f55bebda8a2d4709 (diff) |
Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN
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 allocate
using _IOC_SIZE()
Fixes: 455a7b238cd6 ("block: Add Sed-opal library")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Scott Bauer <scott.bauer@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/sed-opal.h')
-rw-r--r-- | include/linux/sed-opal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/sed-opal.h b/include/linux/sed-opal.h index af1a85eae193..205d520ea688 100644 --- a/include/linux/sed-opal.h +++ b/include/linux/sed-opal.h | |||
@@ -132,7 +132,7 @@ struct opal_dev { | |||
132 | #ifdef CONFIG_BLK_SED_OPAL | 132 | #ifdef CONFIG_BLK_SED_OPAL |
133 | bool opal_unlock_from_suspend(struct opal_dev *dev); | 133 | bool opal_unlock_from_suspend(struct opal_dev *dev); |
134 | void init_opal_dev(struct opal_dev *opal_dev, sec_send_recv *send_recv); | 134 | void init_opal_dev(struct opal_dev *opal_dev, sec_send_recv *send_recv); |
135 | int sed_ioctl(struct opal_dev *dev, unsigned int cmd, unsigned long ptr); | 135 | int sed_ioctl(struct opal_dev *dev, unsigned int cmd, void __user *ioctl_ptr); |
136 | 136 | ||
137 | static inline bool is_sed_ioctl(unsigned int cmd) | 137 | static inline bool is_sed_ioctl(unsigned int cmd) |
138 | { | 138 | { |
@@ -160,7 +160,7 @@ static inline bool is_sed_ioctl(unsigned int cmd) | |||
160 | } | 160 | } |
161 | 161 | ||
162 | static inline int sed_ioctl(struct opal_dev *dev, unsigned int cmd, | 162 | static inline int sed_ioctl(struct opal_dev *dev, unsigned int cmd, |
163 | unsigned long ptr) | 163 | void __user *ioctl_ptr) |
164 | { | 164 | { |
165 | return 0; | 165 | return 0; |
166 | } | 166 | } |