]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
selinux: remove load size limit
authorzhanglin <zhang.lin16@zte.com.cn>
Sat, 21 Sep 2019 01:57:15 +0000 (09:57 +0800)
committerPaul Moore <paul@paul-moore.com>
Tue, 1 Oct 2019 13:29:04 +0000 (09:29 -0400)
Load size was limited to 64MB, this was legacy limitation due to vmalloc()
which was removed a while ago.

Signed-off-by: zhanglin <zhang.lin16@zte.com.cn>
[PM: removed comments in the description about 'real world use cases']
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/selinuxfs.c

index e6c7643c3fc08219e07b3fd8894abb3a8df4ff1d..ee94fa469c29edb0fbfc07d151d91710df86b265 100644 (file)
@@ -548,10 +548,6 @@ static ssize_t sel_write_load(struct file *file, const char __user *buf,
        if (*ppos != 0)
                goto out;
 
-       length = -EFBIG;
-       if (count > 64 * 1024 * 1024)
-               goto out;
-
        length = -ENOMEM;
        data = vmalloc(count);
        if (!data)