Skip to content

Commit c88e98e

Browse files
sashalevingregkh
authored andcommitted
module: Remove module size limit
commit f946eeb upstream. Module size was limited to 64MB, this was legacy limitation due to vmalloc() which was removed a while ago. Limiting module size to 64MB is both pointless and affects real world use cases. Cc: Tim Abbott <tim.abbott@oracle.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 04cf7f7 commit c88e98e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎kernel/module.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,8 +2341,7 @@ static int copy_and_check(struct load_info *info,
23412341
return -ENOEXEC;
23422342

23432343
/* Suck in entire file: we'll want most of it. */
2344-
/* vmalloc barfs on "unusual" numbers. Check here */
2345-
if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL)
2344+
if ((hdr = vmalloc(len)) == NULL)
23462345
return -ENOMEM;
23472346

23482347
if (copy_from_user(hdr, umod, len) != 0) {

0 commit comments

Comments
 (0)