[syslinux] syslinux.efi pxeboot across multiple subnets
Gene Cumm
gene.cumm at gmail.com
Wed Nov 27 20:26:03 PST 2013
On Tue, Nov 26, 2013 at 2:02 PM, H. Peter Anvin <hpa at zytor.com> wrote:
> On 11/24/2013 03:29 AM, Gene Cumm wrote:
>>>
>>> (Sorry for the top posting.)
>>
>> I just started examining this and find it odd that the core_udp_recv()
>> doesn't zalloc() its token while core_udp_send()/core_udp_sendto() do.
>> All three are a part of commit fe283b78 by Matt Fleming. Should this
>> be made into a zalloc() rather than pushing it into the stack? It'd
>> seem like it could run some stack issues plus there's no guarantee
>> what's in it (unless there's some stack trickery just before the calls
>> to core_udp_recv() )
>>
>
> As long as it doesn't need to live longer than the function it is in,
> using the stack seems sensible, but there might be a good reason to
> memset() it to zero.
>
> I have to admit that the use of zalloc() in some places and on the stack
> in others looks odd. It is worth noting that the Syslinux malloc
> implementation is rather slow.
>
> -hpa
At least in these particular implementations of these functions, we're
probably not using Syslinux's malloc() since it's all EFI and appears
to use AllocatePool() (unless I misread it).
--
-Gene
More information about the Syslinux
mailing list