From 26e1a7a351626f770514f001457bb307e08a177c Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 17 Jun 2010 14:45:17 +0200 Subject: ioctl_compat: hide code from user, enable conditionally --- cryptodev_main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cryptodev_main.c') diff --git a/cryptodev_main.c b/cryptodev_main.c index d016931..9fac1e6 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -582,6 +582,9 @@ cryptodev_ioctl(struct inode *inode, struct file *filp, } } +/* compatibility code for 32bit userlands */ +#ifdef CONFIG_COMPAT + static inline void compat_to_session_op(struct compat_session_op *compat, struct session_op *sop) { @@ -674,12 +677,16 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) } } +#endif /* CONFIG_COMPAT */ + struct file_operations cryptodev_fops = { .owner = THIS_MODULE, .open = cryptodev_open, .release = cryptodev_release, .ioctl = cryptodev_ioctl, +#ifdef CONFIG_COMPAT .compat_ioctl = cryptodev_compat_ioctl, +#endif /* CONFIG_COMPAT */ }; struct miscdevice cryptodev = { -- cgit