[syslinux] Question about vk_check and rllunpack

Sebastian Herbszt herbszt at gmx.de
Mon Apr 27 16:14:07 PDT 2009


H. Peter Anvin wrote:
> Sebastian Herbszt wrote:
>> 
>> ;
>> ; rllunpack:
>> ;       Unpack bytes from SI into EDI
>> ;       On return (E)SI, EDI are updated and
>> ;       (E)CX contains number of bytes output.
>> ;
>> rllunpack:
>>                push word .pmentry
>>                call simple_pm_call
>>                ret
>> 
>>                bits 32
>> .pmentry:
>>                push edi
>>                movzx esi,si
>>                xor ecx,ecx
>> 
>> It looks to me like rllunpack does trash esi value (upper part), the 
>> check at vk_check.scan succeeds
>> and we jump to vk_check.not_vk.
>> In my test i got esi before rllunpack (0x3fece980) and after it's 
>> 0x0000e97f.
>> 
>> Am i missing something?
>> 
> 
> Count me confused.  I wonder how that could ever not have completely 
> screwed over the system!
> 
> Could you try this patch and see if it works for you (although perhaps 
> the right thing is to make the caller responsible for zero-extending 
> pointers if necessary...)?

Seems to work with the patch. Thanks.

- Sebastian




More information about the Syslinux mailing list