[syslinux] [PATCH] core: Fix 'trackbuf' descriptor list byte length

Ahmed S. Darwish darwish.07 at gmail.com
Sun Mar 6 16:03:00 PST 2011


On Sun, Mar 06, 2011 at 03:21:16PM -0800, H. Peter Anvin wrote:
> On 03/06/2011 04:21 AM, Ahmed S. Darwish wrote:
> > (Tested using a Linux bzImage, with and without an initrd.)
> > 
> > Per shuffle_and_boot documentation, %ecx must contain the descriptor
> > list byte length, but it's set with such list end address instead.  Fix.
> > 
> > Signed-off-by: Ahmed S. Darwish <darwish.07 at gmail.com>
> 
> Hmm... unless there are other code paths, it would be easier to simply
> "inc ax" before the imul here, no?
> 

It would've been neater, yes, but that will make a 12-byte hole between
last trackbuf descriptor and the termination entry. Check ..

> >  		imul di,ax,12
> > +		push di			; length of list
> >  		add di,bx		; DI <- end of list
> > -		push di
> >  

.. the DI pointer above, where the termination entry get written.

> >  		; Terminating entry...
> >  		lea eax,[replace_stub]	; Entrypoint

-- 
Darwish
http://darwish.07.googlepages.com




More information about the Syslinux mailing list