Skip to contentSkip to conversation

Patch Upstream: module: Remove module size limit

DISCUSSION Greg KH 3 participants 7 messages Mar 28, 2012 – Mar 29, 2012 1 message not in the archive Stable branch

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Greg KH

author maintainer
#1 lore raw

For the patch below, what are the "real world use cases" that would cause this to be needed in the stable kernel trees? Is there an in-kernel module that is affected by this limitation?

Also, when was "a while ago" exactly?

thanks,

greg k-h

Quoted 35 lines · Gregs git-bot

commit: f946eeb9313ff1470758e171a60fe7438a2ded3f
From: Sasha Levin <[email protected]>
Date: Mon, 30 Jan 2012 23:07:22 -0500
Subject: module: Remove module size limit

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.

---
 kernel/module.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
kernel/module.c +1 -2
index 294692d..78ac6ec 100644
@@ -2411,8 +2411,7 @@ static int copy_and_check(struct load_info *info,
 		return -ENOEXEC;
 
 	/* Suck in entire file: we'll want most of it. */
-	/* vmalloc barfs on "unusual" numbers.  Check here */
-	if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL)
+	if ((hdr = vmalloc(len)) == NULL)
 		return -ENOMEM;
 
 	if (copy_from_user(hdr, umod, len) != 0) {
Signature · 1 line
1.7.3.4
#2 lore raw
Quoted 3 lines · Greg KH

For the patch below, what are the "real world use cases" that would cause this to be needed in the stable kernel trees?  Is there an in-kernel module that is affected by this limitation?

There are no in-kernel modules which are affected, the "real world" scenario is debug modules generated by Ksplice.

Quoted 1 line

Also, when was "a while ago" exactly?

Uncertain, but according to my tests for this patch vmalloc is fine with allocating large blocks on a 2.6.18 kernel.

Quoted 3 lines

thanks,

greg k-h

Thanks.

author maintainer
#3 lore raw
Quoted 7 lines · Sasha Levin
Quoted 3 lines · Greg KH

For the patch below, what are the "real world use cases" that would cause this to be needed in the stable kernel trees? �Is there an in-kernel module that is affected by this limitation?

There are no in-kernel modules which are affected, the "real world" scenario is debug modules generated by Ksplice.

So why is this needed for the stable kernels? This really looks like a feature not a bugfix to me, how about you?

greg k-h

#4 lore raw
Quoted 11 lines · Greg KH
Quoted 7 lines · Sasha Levin
Quoted 3 lines · Greg KH

For the patch below, what are the "real world use cases" that would cause this to be needed in the stable kernel trees?  Is there an in-kernel module that is affected by this limitation?

There are no in-kernel modules which are affected, the "real world" scenario is debug modules generated by Ksplice.

So why is this needed for the stable kernels?  This really looks like a feature not a bugfix to me, how about you?

I guess it depends on whether you consider the inability to load modules bigger than 64mb as a bug or not.

author maintainer
#5 lore raw
Quoted 7 lines · Sasha Levin
Quoted 6 lines · Greg KH
Quoted 5 lines · Sasha Levin
Quoted 3 lines · Greg KH

For the patch below, what are the "real world use cases" that would cause this to be needed in the stable kernel trees? �Is there an in-kernel module that is affected by this limitation?

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

There are no in-kernel modules which are affected, the "real world" scenario is debug modules generated by Ksplice.

So why is this needed for the stable kernels? �This really looks like a feature not a bugfix to me, how about you?

I guess it depends on whether you consider the inability to load modules bigger than 64mb as a bug or not.

As there is no in-kernel user with this problem, no, I don't think it's a bug that meets the rules documented in Documentation/stable_kernel_rules.txt, do you?

So I'll drop it, sorry.

greg k-h

#6 lore raw
Quoted 14 lines · Greg KH
Quoted 13 lines · Sasha Levin
Quoted 11 lines · Greg KH
Quoted 7 lines · Sasha Levin
Quoted 3 lines · Greg KH

For the patch below, what are the "real world use cases" that would cause this to be needed in the stable kernel trees?  Is there an in-kernel module that is affected by this limitation?

There are no in-kernel modules which are affected, the "real world" scenario is debug modules generated by Ksplice.

So why is this needed for the stable kernels?  This really looks like a feature not a bugfix to me, how about you?

Quoted 6 lines
Quoted 2 lines

I guess it depends on whether you consider the inability to load modules bigger than 64mb as a bug or not.

As there is no in-kernel user with this problem, no, I don't think it's a bug that meets the rules documented in Documentation/stable_kernel_rules.txt, do you?

Your call, but it has been my policy to support ksplice, such as making sure we export symbols it needs. And this really is a low-risk change.

Thanks,
Rusty.

Signature · 1 line
  How could I marry someone with more hair than me?  http://baldalex.org
author maintainer
#7 lore raw
Quoted 18 lines · Rusty Russell
Quoted 17 lines · Greg KH
Quoted 15 lines · Sasha Levin
Quoted 11 lines · Greg KH
Quoted 7 lines · Sasha Levin
Quoted 3 lines · Greg KH

For the patch below, what are the "real world use cases" that would cause this to be needed in the stable kernel trees? �Is there an in-kernel module that is affected by this limitation?

There are no in-kernel modules which are affected, the "real world" scenario is debug modules generated by Ksplice.

So why is this needed for the stable kernels? �This really looks like a feature not a bugfix to me, how about you?

I guess it depends on whether you consider the inability to load modules bigger than 64mb as a bug or not.

Quoted 6 lines
Quoted 3 lines

As there is no in-kernel user with this problem, no, I don't think it's a bug that meets the rules documented in Documentation/stable_kernel_rules.txt, do you?

Your call, but it has been my policy to support ksplice, such as making sure we export symbols it needs. And this really is a low-risk change.

Ok, but note, it really would be good if we could get the ksplice code into the kernel tree, I hate supporting out-of-tree modules...

thanks,

greg k-h