* [PATCH] grub-legacy: fix 256 char limitation on kernel command line length
@ 2013-11-21 19:40 Paul Gortmaker
0 siblings, 0 replies; only message in thread
From: Paul Gortmaker @ 2013-11-21 19:40 UTC (permalink / raw)
To: grub-devel
The legacy grub only copies 0xff chars of cmdline, which means that
longer lines used with nfsroot and static network settings may get
truncated.
The code where this happens is in stage2/boot.c:
while (dest < linux_data_tmp_addr + LINUX_CL_END_OFFSET && *src)
*(dest++) = *(src++);
Bump everything up by 0x100 to give us 512 chars, or double what it
used to be. Current x86 kernels support up to 2048 chars, but this
will cover 99% of currently failing use cases.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
diff --git a/stage2/shared.h b/stage2/shared.h
index 818062c..8cf24da 100644
--- a/stage2/shared.h
+++ b/stage2/shared.h
@@ -160,8 +160,8 @@ extern char *grub_scratch_mem;
#define LINUX_VID_MODE_ASK 0xFFFD
#define LINUX_CL_OFFSET 0x9000
-#define LINUX_CL_END_OFFSET 0x90FF
-#define LINUX_SETUP_MOVE_SIZE 0x9100
+#define LINUX_CL_END_OFFSET 0x91FF
+#define LINUX_SETUP_MOVE_SIZE 0x9200
#define LINUX_CL_MAGIC 0xA33F
/*
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-21 21:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 19:40 [PATCH] grub-legacy: fix 256 char limitation on kernel command line length Paul Gortmaker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).