X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=security%2Fsecurity.c;h=840a3d58a29028a673adc759b631d09425d427e9;hb=da9c33a70f095d5d55c36d0bfeba969e31de08ae;hp=23b129d482a7c8f478d4fe8a709c7f4a7ed47ab8;hpb=5c5e0e81202667f9c052edb99699818363b19129;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/security/security.c b/security/security.c index 23b129d..840a3d5 100644 --- a/security/security.c +++ b/security/security.c @@ -2648,6 +2648,24 @@ int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) } EXPORT_SYMBOL_GPL(security_file_ioctl); +/** + * security_file_ioctl_compat() - Check if an ioctl is allowed in compat mode + * @file: associated file + * @cmd: ioctl cmd + * @arg: ioctl arguments + * + * Compat version of security_file_ioctl() that correctly handles 32-bit + * processes running on 64-bit kernels. + * + * Return: Returns 0 if permission is granted. + */ +int security_file_ioctl_compat(struct file *file, unsigned int cmd, + unsigned long arg) +{ + return call_int_hook(file_ioctl_compat, 0, file, cmd, arg); +} +EXPORT_SYMBOL_GPL(security_file_ioctl_compat); + static inline unsigned long mmap_prot(struct file *file, unsigned long prot) { /*