From e40642dc01b87a8b202ce39013b0a4881025a816 Mon Sep 17 00:00:00 2001 From: zhanglin Date: Sat, 21 Sep 2019 09:57:15 +0800 Subject: 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 --- security/selinux/selinuxfs.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'security/selinux') diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index e6c7643c3fc0..ee94fa469c29 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) -- cgit v1.2.3-59-g8ed1b