[syslinux] pxelinux and DISPLAY

Marco Descher marco.descher at fhv.at
Thu Jul 7 06:39:24 PDT 2005


Hey,

I just wanted to mention that the same problem still exists for me in
version 3.09, altough the changelog mentions:

  Reduce the command line to 511 characters; 1023 caused memory
overflows.

Was this meant to be a solution for this problem, or does this entry of
the changelog apply to another bug? 

thx,
marco 

>Yesterday Curtis Doty said:
>
>  
>
>>I've begun tinkering with syslinux v3 and have uncovered an anomoly with 
>>the DISPLAY file when called by pxelinux.0.
>>
>>If I have:
>>
>>DISPLAY boot.msg
>>
>>With an "^Xsplash.lss\n" in the file boot.msg (exactly: 18 73 70 6C 61 
>>73 68 2E 6C 73 73 0A) file, it will fail to load the rle image. And 
>>produce some goofy results in the tftpd log:
>>
>>Jun  5 06:27:06 pxe in.tftpd[24649]: RRQ from 10.0.0.16 filename 
>>/pxe/boot.msg
>>Jun  5 06:27:06 pxe in.tftpd[24650]: RRQ from 10.0.0.16 filename 
>>/pxe/splash.lssæÿf\213F
>>
>>A network trace also concurs:
>>
>>23:27:06.804006 10.0.0.16.40707 > 10.0.0.2.tftp:  50 RRQ 
>>"/pxe/splash.lssM-fM-^?fM-^KF"
>>    
>>
>
>Answering my own question. This bug was introduced in 3.08. I've attache a 
>rather brutal hack that when patched with -R will rollback the max command 
>line changes. Problem vanishes.
>
>I don't speak more than just, "Donde esta el bano?" in assembler, so 
>hopefully someone else can explain why or provide a real patch.
>
>../C
>  
>
>------------------------------------------------------------------------
>
>  
>
diff -urN syslinux-3.08-pre10/NEWS syslinux-3.08-pre11/NEWS
--- syslinux-3.08-pre10/NEWS	
+++ syslinux-3.08-pre11/NEWS	2005-05-08 14:47:03.000000000 -0700
@@ -20,6 +20,9 @@
 	  BIOS flash programs.
 	* COM32 module to boot Multiboot systems, including Xen.  See
 	  com32/modules/mboot.doc.
+	* Max command line changed to 1024 characters.  Note that the
+	  kernel proper still can only handle 255 characters without
+	  patching, and COM16 binaries can only handle 125 characters.
 
 Changes in 3.07:
 	* Fix chainloading (chain.c32).
diff -urN syslinux-3.08-pre10/config.inc syslinux-3.08-pre11/config.inc
--- syslinux-3.08-pre10/config.inc	2005-01-03 00:31:59.000000000 -0800
+++ syslinux-3.08-pre11/config.inc	2005-05-08 14:47:03.000000000 -0700
@@ -1,7 +1,7 @@
-;; $Id: config.inc,v 1.7 2005/01/03 08:31:59 hpa Exp $
+;; $Id: config.inc,v 1.8 2005/05/08 21:47:03 hpa Exp $
 ;; -----------------------------------------------------------------------
 ;;   
-;;   Copyright 2002-2004 H. Peter Anvin - All Rights Reserved
+;;   Copyright 2002-2005 H. Peter Anvin - All Rights Reserved
 ;;
 ;;   This program is free software; you can redistribute it and/or modify
 ;;   it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
 %ifndef _CONFIG_INC
 %define _CONFIG_INC
 
-max_cmd_len	equ 255			; Must be odd; 255 is the kernel limit
+max_cmd_len	equ 1023		; Must be odd; 255 is the kernel limit
 HIGHMEM_MAX	equ 037FFFFFFh		; DEFAULT highest address for an initrd
 DEFAULT_BAUD	equ 9600		; Default baud rate for serial port
 BAUD_DIVISOR	equ 115200		; Serial port parameter
diff -urN syslinux-3.08-pre10/runkernel.inc syslinux-3.08-pre11/runkernel.inc
--- syslinux-3.08-pre10/runkernel.inc	2005-01-06 14:34:06.000000000 -0800
+++ syslinux-3.08-pre11/runkernel.inc	2005-05-08 14:47:03.000000000 -0700
@@ -1,4 +1,4 @@
-;; $Id: runkernel.inc,v 1.19 2005/01/06 22:34:06 hpa Exp $
+;; $Id: runkernel.inc,v 1.20 2005/05/08 21:47:03 hpa Exp $
 ;; -----------------------------------------------------------------------
 ;;   
 ;;   Copyright 1994-2005 H. Peter Anvin - All Rights Reserved
@@ -345,9 +345,12 @@
 		mov [fs:kern_cmd_offset],di	; Store pointer
 
 		mov cx,[CmdLineLen]
-		add cx,byte 3
-		shr cx,2			; Convert to dwords
-		fs rep movsd
+		cmp cx,255
+		jna .len_ok
+		mov cx,255			; Protocol < 0x202 has 255 as hard limit
+.len_ok:
+		fs rep movsb
+		fs stosb			; Final null, note AL == 0 here		
 
 		push fs
 		pop es




More information about the Syslinux mailing list