* How many params can be accept by kernel module at most?
@ 2010-11-01 6:17 tingwei liu
2010-11-01 9:29 ` Américo Wang
0 siblings, 1 reply; 8+ messages in thread
From: tingwei liu @ 2010-11-01 6:17 UTC (permalink / raw)
To: linux-kernel
How many params can be accept by kernel module at most?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How many params can be accept by kernel module at most?
2010-11-01 6:17 How many params can be accept by kernel module at most? tingwei liu
@ 2010-11-01 9:29 ` Américo Wang
2010-11-01 9:32 ` tingwei liu
0 siblings, 1 reply; 8+ messages in thread
From: Américo Wang @ 2010-11-01 9:29 UTC (permalink / raw)
To: tingwei liu; +Cc: linux-kernel
On Mon, Nov 01, 2010 at 02:17:23PM +0800, tingwei liu wrote:
>How many params can be accept by kernel module at most?
If you mean dynamically, these parameters are passed as a whole to kernel,
from the source code, you can see the max length is ~0UL>>1.
If you mean statically, IOW, the max paramenters you can provide in your module,
this is limited by ELF section size.
Hope this helps.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How many params can be accept by kernel module at most?
2010-11-01 9:29 ` Américo Wang
@ 2010-11-01 9:32 ` tingwei liu
2010-11-01 9:49 ` tingwei liu
0 siblings, 1 reply; 8+ messages in thread
From: tingwei liu @ 2010-11-01 9:32 UTC (permalink / raw)
To: Américo Wang; +Cc: linux-kernel
What's the meaning of dynamically and statically?
You response help me much. Thank you
2010/11/1 Américo Wang <xiyou.wangcong@gmail.com>:
> On Mon, Nov 01, 2010 at 02:17:23PM +0800, tingwei liu wrote:
>>How many params can be accept by kernel module at most?
>
> If you mean dynamically, these parameters are passed as a whole to kernel,
> from the source code, you can see the max length is ~0UL>>1.
>
> If you mean statically, IOW, the max paramenters you can provide in your module,
> this is limited by ELF section size.
>
> Hope this helps.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How many params can be accept by kernel module at most?
2010-11-01 9:32 ` tingwei liu
@ 2010-11-01 9:49 ` tingwei liu
2010-11-01 9:54 ` tingwei liu
2010-11-01 9:59 ` Américo Wang
0 siblings, 2 replies; 8+ messages in thread
From: tingwei liu @ 2010-11-01 9:49 UTC (permalink / raw)
To: Américo Wang; +Cc: linux-kernel
The params are transferred by command line. And the params are all in
program statically. So the stack size determine the params number. For
example: stack size is 4K,and params are unsigned int type with 4
bytes,so the max number of params is 1 thousand。
2010/11/1 tingwei liu <tingw.liu@gmail.com>:
> What's the meaning of dynamically and statically?
> You response help me much. Thank you
>
> 2010/11/1 Américo Wang <xiyou.wangcong@gmail.com>:
>> On Mon, Nov 01, 2010 at 02:17:23PM +0800, tingwei liu wrote:
>>>How many params can be accept by kernel module at most?
>>
>> If you mean dynamically, these parameters are passed as a whole to kernel,
>> from the source code, you can see the max length is ~0UL>>1.
>>
>> If you mean statically, IOW, the max paramenters you can provide in your module,
>> this is limited by ELF section size.
>>
>> Hope this helps.
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How many params can be accept by kernel module at most?
2010-11-01 9:49 ` tingwei liu
@ 2010-11-01 9:54 ` tingwei liu
2010-11-01 9:59 ` Américo Wang
1 sibling, 0 replies; 8+ messages in thread
From: tingwei liu @ 2010-11-01 9:54 UTC (permalink / raw)
To: Américo Wang; +Cc: linux-kernel
My description is correct or not ?
2010/11/1 tingwei liu <tingw.liu@gmail.com>:
> The params are transferred by command line. And the params are all in
> program statically. So the stack size determine the params number. For
> example: stack size is 4K,and params are unsigned int type with 4
> bytes,so the max number of params is 1 thousand。
>
> 2010/11/1 tingwei liu <tingw.liu@gmail.com>:
>> What's the meaning of dynamically and statically?
>> You response help me much. Thank you
>>
>> 2010/11/1 Américo Wang <xiyou.wangcong@gmail.com>:
>>> On Mon, Nov 01, 2010 at 02:17:23PM +0800, tingwei liu wrote:
>>>>How many params can be accept by kernel module at most?
>>>
>>> If you mean dynamically, these parameters are passed as a whole to kernel,
>>> from the source code, you can see the max length is ~0UL>>1.
>>>
>>> If you mean statically, IOW, the max paramenters you can provide in your module,
>>> this is limited by ELF section size.
>>>
>>> Hope this helps.
>>>
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How many params can be accept by kernel module at most?
2010-11-01 9:49 ` tingwei liu
2010-11-01 9:54 ` tingwei liu
@ 2010-11-01 9:59 ` Américo Wang
2010-11-01 13:42 ` tingwei liu
1 sibling, 1 reply; 8+ messages in thread
From: Américo Wang @ 2010-11-01 9:59 UTC (permalink / raw)
To: tingwei liu; +Cc: Américo Wang, linux-kernel
On Mon, Nov 01, 2010 at 05:49:53PM +0800, tingwei liu wrote:
>The params are transferred by command line. And the params are all in
>program statically. So the stack size determine the params number. For
>example: stack size is 4K,and params are unsigned int type with 4
>bytes,so the max number of params is 1 thousand。
>
Please don't top-reply.
That is not true, the parameters are passed via 'uargs' of init_module()
dynamically, this is when you invoke modprobe/insmod.
For your own kernel module, you may use module_param() to provide
parameters, the max of this is limited to the size of ELF section size,
since they are stored in "__param" section.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How many params can be accept by kernel module at most?
2010-11-01 9:59 ` Américo Wang
@ 2010-11-01 13:42 ` tingwei liu
2010-11-02 1:40 ` Thiago Farina
0 siblings, 1 reply; 8+ messages in thread
From: tingwei liu @ 2010-11-01 13:42 UTC (permalink / raw)
To: Américo Wang; +Cc: linux-kernel
2010/11/1 Américo Wang <xiyou.wangcong@gmail.com>:
> On Mon, Nov 01, 2010 at 05:49:53PM +0800, tingwei liu wrote:
>>The params are transferred by command line. And the params are all in
>>program statically. So the stack size determine the params number. For
>>example: stack size is 4K,and params are unsigned int type with 4
>>bytes,so the max number of params is 1 thousand。
>>
>
> Please don't top-reply.
>
> That is not true, the parameters are passed via 'uargs' of init_module()
> dynamically, this is when you invoke modprobe/insmod.
>
> For your own kernel module, you may use module_param() to provide
> parameters, the max of this is limited to the size of ELF section size,
> since they are stored in "__param" section.
>
I really use module_param() to provide parameters. How much of the ELF
section size? How can I find the document of the ELF.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How many params can be accept by kernel module at most?
2010-11-01 13:42 ` tingwei liu
@ 2010-11-02 1:40 ` Thiago Farina
0 siblings, 0 replies; 8+ messages in thread
From: Thiago Farina @ 2010-11-02 1:40 UTC (permalink / raw)
To: tingwei liu; +Cc: Américo Wang, linux-kernel
On Mon, Nov 1, 2010 at 11:42 AM, tingwei liu <tingw.liu@gmail.com> wrote:
> I really use module_param() to provide parameters. How much of the ELF
> section size? How can I find the document of the ELF.
Searching on Google might help?
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-11-02 1:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-01 6:17 How many params can be accept by kernel module at most? tingwei liu
2010-11-01 9:29 ` Américo Wang
2010-11-01 9:32 ` tingwei liu
2010-11-01 9:49 ` tingwei liu
2010-11-01 9:54 ` tingwei liu
2010-11-01 9:59 ` Américo Wang
2010-11-01 13:42 ` tingwei liu
2010-11-02 1:40 ` Thiago Farina
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.