From: zhanglin Date: Sat, 21 Sep 2019 01:57:15 +0000 (+0800) Subject: selinux: remove load size limit X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e40642dc01b87a8b202ce39013b0a4881025a816;p=linux.git selinux: remove load size limit Load size was limited to 64MB, this was legacy limitation due to vmalloc() which was removed a while ago. Signed-off-by: zhanglin [PM: removed comments in the description about 'real world use cases'] Signed-off-by: Paul Moore --- diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index e6c7643c3fc08..ee94fa469c29e 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -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)