[PATCH] selinux: Remove load size limit

2019-09-20 Thread zhanglin
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 --- security/selinux/selinuxfs.c | 4 1 file changed, 4 deletions(-) diff --git

[PATCH] selinux: improve performance of sel_write_load()

2019-09-17 Thread zhanglin
remove unecessary multiplications of sel_write_load(). Signed-off-by: zhanglin --- security/selinux/selinuxfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index f3a5a138a096..4b2d87b6fcf9 100644

[PATCH] [PATCH v3] sock: fix potential memory leak in proto_register()

2019-08-22 Thread zhanglin
If protocols registered exceeded PROTO_INUSE_NR, prot will be added to proto_list, but no available bit left for prot in proto_inuse_idx. Changes since v2: * Propagate the error code properly Signed-off-by: zhanglin --- net/core/sock.c | 31 +-- 1 file changed, 21

[PATCH v2] sock: fix potential memory leak in proto_register()

2019-08-20 Thread zhanglin
If protocols registered exceeded PROTO_INUSE_NR, prot will be added to proto_list, but no available bit left for prot in proto_inuse_idx. Signed-off-by: zhanglin --- net/core/sock.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/net/core/sock.c b

[PATCH] sock: fix potential memory leak in proto_register()

2019-08-18 Thread zhanglin
If protocols registered exceeded PROTO_INUSE_NR, prot will be added to proto_list, but no available bit left for prot in proto_inuse_idx. Signed-off-by: zhanglin --- net/core/sock.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/net/core/sock.c b/net