Skip to contentSkip to conversation

sparc64: Increase size of boot string to 1024 bytes

PATCH In review Dave Kleikamp 2 participants 4 messages Oct 7, 2014 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc64: Increase size of boot string to 1024 bytes

This is the longest boot string that silo supports.

---
 arch/sparc/prom/bootstr_64.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/sparc/prom/bootstr_64.c +5 -1
index ab9ccc6..4dac9f7 100644
@@ -14,7 +14,11 @@
  *          the .bss section or it will break things.
  */
 
-#define BARG_LEN  256
+/*
+ * We limit BARG_LEN to 1024 rather than use COMMAND_LINE_SIZE because silo
+ * blindly copies however many bytes we tell it from a 1024-byte array.
+ */
+#define BARG_LEN 1024
 struct {
 	int bootstr_len;
 	int bootstr_valid;
Signature · 1 line
2.1.2
maintainer
#1 lore raw

From: Dave Kleikamp <[email protected]>
Date: Tue, 07 Oct 2014 08:12:37 -0500

Quoted 3 lines

This is the longest boot string that silo supports.

Ok, given how the rest of this thread went, the comment needs to be adjusted to match reality which is something like:

/* We limit BARG_LEN to 1024 because this is the size of the
* 'barg_out' command line buffer in the SILO bootloader. And
* it trusts bootstr_len over that buffer's size.
*/

Right?

#2 lore raw
In reply to Dave Kleikamp
Quoted 10 lines · David Miller

From: Dave Kleikamp <[email protected]>
Date: Tue, 07 Oct 2014 08:12:37 -0500

Quoted 3 lines

This is the longest boot string that silo supports.

Ok, given how the rest of this thread went, the comment needs to be adjusted to match reality which is something like:

Quoted 6 lines

/* We limit BARG_LEN to 1024 because this is the size of the
* 'barg_out' command line buffer in the SILO bootloader. And
* it trusts bootstr_len over that buffer's size.
*/

Right?

I'd leave off the last sentence:

/* We limit BARG_LEN to 1024 because this is the size of the
* 'barg_out' command line buffer in the SILO bootloader. */

maintainer
#3 lore raw
In reply to Dave Kleikamp

From: Dave Kleikamp <[email protected]>
Date: Tue, 07 Oct 2014 14:29:25 -0500

Quoted 5 lines

I'd leave off the last sentence:

/* We limit BARG_LEN to 1024 because this is the size of the
* 'barg_out' command line buffer in the SILO bootloader. */

Works for me.