Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo-sources-2.6.23-r2 kernel append line max 153 chars
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
zuki
n00b
n00b


Joined: 05 Sep 2003
Posts: 32
Location: Kahla/Thuringia/Germany

PostPosted: Tue Nov 27, 2007 11:47 am    Post subject: gentoo-sources-2.6.23-r2 kernel append line max 153 chars Reply with quote

Hi,
I have tested the newest gentoo-sources. I dont know if this is a bug of the gentoo part or of the kernel it self. The append line will be cut to 153 chars, but the Documentation/i386/boot.txt say 255. Anyone with the same problem?

cat /proc/cmdline | wc -c

results in 153 if the appendline is bigger than 153 chars...

greetings mario[/code]
_________________
open world, open mind, open future
Back to top
View user's profile Send private message
mjf55
Guru
Guru


Joined: 25 Aug 2007
Posts: 372

PostPosted: Sun Dec 02, 2007 10:46 am    Post subject: Reply with quote

Key phrases from Documentation/i386/boot.txt
Code:
Protocol 2.06:  (Kernel 2.6.22) Added a field that contains the size of the boot command line

Code:
The kernel command line is a null-terminated string. The maximum length can be retrieved from the field cmdline_size. Before protocol version 2.06, the maximum was 255 characters.  A string that is too long will be automatically truncated by the kernel.

Code:
Field name:    cmdline_size
Type:            read
Offset/size:    0x238/4
Protocol:        2.06+

The maximum size of the command line without the terminating   zero. This means that the command line can contain at most   cmdline_size characters. With protocol version 2.05 and earlier, the   maximum size was 255.


So, with kernel 2.6.22 the cmd line length is no longer 255, but a different value defined by cmdline_size
_________________
Mark
No longer a n00b, but still a 'Kool Kid' wannabe
Back to top
View user's profile Send private message
zuki
n00b
n00b


Joined: 05 Sep 2003
Posts: 32
Location: Kahla/Thuringia/Germany

PostPosted: Tue Dec 18, 2007 1:47 pm    Post subject: Reply with quote

Hi,
thanks for the answer. But where to specify the cmdline_size? In 2.6.23-gentoo-r3 I got the same:
Code:

#cat /proc/cmdline | wc -c


153 chars. Not more. The cmdline is cutted after char 153.
_________________
open world, open mind, open future
Back to top
View user's profile Send private message
zuki
n00b
n00b


Joined: 05 Sep 2003
Posts: 32
Location: Kahla/Thuringia/Germany

PostPosted: Wed Dec 19, 2007 11:38 am    Post subject: Reply with quote

Hi.
I have found a bug related to this:

http://bugzilla.kernel.org/show_bug.cgi?id=9217

No solutions at this time. :-\
_________________
open world, open mind, open future
Back to top
View user's profile Send private message
mjf55
Guru
Guru


Joined: 25 Aug 2007
Posts: 372

PostPosted: Wed Dec 19, 2007 2:10 pm    Post subject: Reply with quote

Just to clarify, The bug posted above has to do with CONFIG_CMDLINE not passing parameters to the kernel. not to do with cmd line length.
The <256 characters appears to work as designed (no comment on the design, I am NOT qualified) per my previous post here.
_________________
Mark
No longer a n00b, but still a 'Kool Kid' wannabe
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum