summaryrefslogtreecommitdiff
path: root/include/linux/sed-opal.h
diff options
context:
space:
mode:
authorScott Bauer <scott.bauer@intel.com>2017-02-14 17:29:36 -0700
committerJens Axboe <axboe@fb.com>2017-02-14 19:47:18 -0700
commite225c20eb0fd0b6657e640408f11ee392dc82b5b (patch)
tree16caa1d305159a1306478a58483278fe13d2e9b2 /include/linux/sed-opal.h
parent24bff4d78a572d25fe2a0818f55bebda8a2d4709 (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.h4
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 {
#ifdef CONFIG_BLK_SED_OPAL
bool opal_unlock_from_suspend(struct opal_dev *dev);
void init_opal_dev(struct opal_dev *opal_dev, sec_send_recv *send_recv);
-int sed_ioctl(struct opal_dev *dev, unsigned int cmd, unsigned long ptr);
+int sed_ioctl(struct opal_dev *dev, unsigned int cmd, void __user *ioctl_ptr);
static inline bool is_sed_ioctl(unsigned int cmd)
{
@@ -160,7 +160,7 @@ static inline bool is_sed_ioctl(unsigned int cmd)
}
static inline int sed_ioctl(struct opal_dev *dev, unsigned int cmd,
- unsigned long ptr)
+ void __user *ioctl_ptr)
{
return 0;
}