selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zhanglin <zhang.lin16@zte.com.cn>
To: paul@paul-moore.com
Cc: sds@tycho.nsa.gov, eparis@parisplace.org,
	selinux@vger.kernel.org, linux-kernel@vger.kernel.org,
	xue.zhihong@zte.com.cn, wang.yi59@zte.com.cn,
	jiang.xuexin@zte.com.cn, zhanglin <zhang.lin16@zte.com.cn>
Subject: [PATCH] selinux: Remove load size limit
Date: Sat, 21 Sep 2019 09:57:15 +0800	[thread overview]
Message-ID: <1569031035-12354-1-git-send-email-zhang.lin16@zte.com.cn> (raw)

Load size was limited to 64MB, this was legacy limitation due to vmalloc()
which was removed a while ago.

Limiting load size to 64MB is both pointless and affects real world use
cases.

Signed-off-by: zhanglin <zhang.lin16@zte.com.cn>
---
 security/selinux/selinuxfs.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index f3a5a138a096..4249400e9712 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -549,10 +549,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)
-- 
2.17.1


             reply	other threads:[~2019-09-21  1:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-21  1:57 zhanglin [this message]
2019-10-01 13:36 ` [PATCH] selinux: Remove load size limit Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1569031035-12354-1-git-send-email-zhang.lin16@zte.com.cn \
    --to=zhang.lin16@zte.com.cn \
    --cc=eparis@parisplace.org \
    --cc=jiang.xuexin@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@vger.kernel.org \
    --cc=wang.yi59@zte.com.cn \
    --cc=xue.zhihong@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).