[ipxe-devel] [PATCH ipxe v2 4/4] [af_packet] new AF_PACKET driver for Linux

Michael Brown mcb30 at ipxe.org
Sun Jan 22 14:29:01 UTC 2017

On 20/01/17 18:29, David Decotigny wrote:
> This code largely inspired from tap.c.
> Allows to test ipxe on real NICs from Linux. Example:
>    make -j -C src bin-x86_64-linux/af_packet.linux
>    valgrind ./af_packet.linux --net af_packet,if=eth3 --settings uuid=$(uuidgen)
> Tested as x86_64 and i386 binary.

Applied; thank you!


I note that Valgrind issues one warning when I try it:

==18530== Syscall param socketcall.sendto(to.sa_data) points to 
uninitialised byte(s)
==18530==    at 0x400019: linux_syscall (in 
==18530==    by 0x403DBD: linux_sendto (linux_api.c:139)
==18530==    by 0x40015D: af_packet_nic_transmit (af_packet.c:149)
==18530==    by 0x405FC4: netdev_tx (netdevice.c:311)
==18530==    by 0x403522: ipv4_tx (ipv4.c:402)
==18530==    by 0x40C7D7: xfer_deliver (xfer.c:206)
==18530==    by 0x40E7E3: dhcp_tx (dhcp.c:1134)
==18530==    by 0x407D27: timer_expired (retry.c:187)
==18530==    by 0x407D27: retry_poll (retry.c:210)
==18530==    by 0x4074B1: step (process.c:116)
==18530==    by 0x4057D9: monojob_wait (monojob.c:88)
==18530==    by 0x40D333: netboot (autoboot.c:362)
==18530==    by 0x40D5F6: autoboot (autoboot.c:493)
==18530==    by 0x40D5F6: ipxe (autoboot.c:572)
==18530==  Address 0xffefffea0 is on thread 1's stack
==18530==  in frame #2, created by af_packet_nic_transmit (af_packet.c:135)

 From a quick look, it seems as though this is a known false positive 
from Valgrind, e.g.:


If you have a fix, that would be great!



More information about the ipxe-devel mailing list