diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-08-14 20:45:10 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-08-14 20:45:10 -0400 |
commit | e22a539824e8ddb82c87b4f415165ede82e6ab56 (patch) | |
tree | 39d68ab2ad811abc19a1fc1595fd71a37df43aae /Documentation/virtual | |
parent | c3c53a073247ee7522ca80393319540db9f4dc1e (diff) |
lguest: allow booting guest with CONFIG_RELOCATABLE=y
The CONFIG_RELOCATABLE code tries to align the unpack destination to
the value of 'kernel_alignment' in the setup_hdr. If that's 0, it
tries to unpack to address 0, which in fact causes the gunzip code
to call 'error("Out of memory while allocating output buffer")'.
The bootloader (ie. the lguest Launcher in this case) should be doing
setting this field; the normal bzImage is 16M, we can use the same.
Reported-by: Stefanos Geraggelos <sgerag@cslab.ece.ntua.gr>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
Diffstat (limited to 'Documentation/virtual')
-rw-r--r-- | Documentation/virtual/lguest/lguest.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/virtual/lguest/lguest.c b/Documentation/virtual/lguest/lguest.c index 043bd7df313..d928c134dee 100644 --- a/Documentation/virtual/lguest/lguest.c +++ b/Documentation/virtual/lguest/lguest.c | |||
@@ -1996,6 +1996,9 @@ int main(int argc, char *argv[]) | |||
1996 | /* We use a simple helper to copy the arguments separated by spaces. */ | 1996 | /* We use a simple helper to copy the arguments separated by spaces. */ |
1997 | concat((char *)(boot + 1), argv+optind+2); | 1997 | concat((char *)(boot + 1), argv+optind+2); |
1998 | 1998 | ||
1999 | /* Set kernel alignment to 16M (CONFIG_PHYSICAL_ALIGN) */ | ||
2000 | boot->hdr.kernel_alignment = 0x1000000; | ||
2001 | |||
1999 | /* Boot protocol version: 2.07 supports the fields for lguest. */ | 2002 | /* Boot protocol version: 2.07 supports the fields for lguest. */ |
2000 | boot->hdr.version = 0x207; | 2003 | boot->hdr.version = 0x207; |
2001 | 2004 | ||