Skip to contentSkip to conversation

powerpc: Increase COMMAND_LINE_SIZE to 2048 from 512.

PATCH In review Joseph Salisbury 2 participants 4 messages Apr 14, 2014 – Apr 16, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 powerpc: Increase COMMAND_LINE_SIZE to 2048 from 512.

In reply to a message not in the archive

While booting the PPC64EL kernel, the command line gets truncated to 512 characters. This is due to a hard limit of 512 defined for COMMAND_LINE_SIZE. It would be beneficial to have a command line longer than 512 characters, as iscsi targets and cloud-init parameters are passed through the kernel command line.

Cc Benjamin Herrenschmidt <[email protected]> (supporter:LINUX FOR POWERPC...)
Cc Paul Mackerras <[email protected]> (supporter:LINUX FOR POWERPC...)
Cc [email protected] (open list:LINUX FOR POWERPC...)
Cc [email protected] (open list)
---
 arch/powerpc/boot/ops.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/boot/ops.h +1 -1
index b3218ce..5a01fb1 100644
@@ -15,7 +15,7 @@
 #include "types.h"
 #include "string.h"
 
-#define	COMMAND_LINE_SIZE	512
+#define	COMMAND_LINE_SIZE	2048	
 #define	MAX_PATH_LEN		256
 #define	MAX_PROP_LEN		256 /* What should this be? */
 
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 20 lines · Joseph Salisbury

While booting the PPC64EL kernel, the command line gets truncated to 512 characters. This is due to a hard limit of 512 defined for COMMAND_LINE_SIZE. It would be beneficial to have a command line longer than 512 characters, as iscsi targets and cloud-init parameters are passed through the kernel command line.

Cc Benjamin Herrenschmidt <[email protected]> (supporter:LINUX FOR POWERPC...)
Cc Paul Mackerras <[email protected]> (supporter:LINUX FOR POWERPC...)
Cc [email protected] (open list:LINUX FOR POWERPC...)
Cc [email protected] (open list)
---
 arch/powerpc/boot/ops.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/boot/ops.h +0 -0
index b3218ce..5a01fb1 100644

arch/powerpc/boot/ops.h line 21

Quoted 8 lines
arch/powerpc/boot/ops.h +1 -1
@@ -15,7 +15,7 @@
 #include "types.h"
 #include "string.h"
 
-#define	COMMAND_LINE_SIZE	512
+#define	COMMAND_LINE_SIZE	2048	
 #define	MAX_PATH_LEN		256
 #define	MAX_PROP_LEN		256 /* What should this be? */
 

After further review, it appears ppc does not actually use the define in the ppc headers but uses the common generic default(include/uapi/asm-generic/setup.h). COMMAND_LINE_SIZE should probably become a kernel config option. Do folks agree that is the correct thing to do? If so, I can re-work the patch.

Thanks,

Joe

#3 lore raw
Quoted 7 lines · Joseph Salisbury

After further review, it appears ppc does not actually use the define in
the ppc headers but uses the common generic default(include/uapi/asm-generic/setup.h). COMMAND_LINE_SIZE should probably become a kernel config option. Do folks agree that is the correct thing to do? If so, I can re-work the patch.

No objection on my side.

Make sure you remove any unused arch define while at it.

Cheers,
Ben.

#4 lore raw
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 6 lines · Joseph Salisbury

After further review, it appears ppc does not actually use the define in
the ppc headers but uses the common generic default(include/uapi/asm-generic/setup.h). COMMAND_LINE_SIZE should probably become a kernel config option. Do folks agree that is the correct thing to do? If so, I can re-work the patch.

Quoted 8 lines

No objection on my side.

Make sure you remove any unused arch define while at it.

Cheers,
Ben.

Hi Ben,

I can think of two ways to add the new config option. One would be to have a large entry in ~/arch/Kconfig, with a default COMMAND_LINE_SIZE line for each architecture. The other way would be to have the default value for COMMAND_LINE_SIZE in the architecture sub-directory Kconfig
file: ~/arch/powerpc/Kconfig for example.

Do you have a preference for either way?

Thanks,

Joe