[syslinux] syslinux.efi pxeboot across multiple subnets

H. Peter Anvin hpa at zytor.com
Tue Nov 26 11:02:05 PST 2013


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



More information about the Syslinux mailing list