[U-Boot] [PATCH] Use packed structures for networking

Tom Rini trini at konsulko.com
Fri Jul 21 19:00:30 UTC 2017


On Fri, Jul 21, 2017 at 07:28:42PM +0300, Denis Pynkin wrote:

> PXE boot is broken with GCC 7.1 due option '-fstore-merging' enabled
> by default for '-O2':
> 
> BOOTP broadcast 1
> data abort
> pc : [<8ff8bb30>]          lr : [<00004f1f>]
> reloc pc : [<17832b30>]    lr : [<878abf1f>]
> sp : 8f558bc0  ip : 00000000     fp : 8ffef5a4
> r10: 8ffed248  r9 : 8f558ee0     r8 : 8ffef594
> r7 : 0000000e  r6 : 8ffed700     r5 : 00000000  r4 : 8ffed74e
> r3 : 00060101  r2 : 8ffed230     r1 : 8ffed706  r0 : 00000ddd
> Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
> Resetting CPU ...
> 
> Core reason is usage of structures for network headers without packed
> attribute.
> 
> Reviewed-by: Yauheni Kaliuta <yauheni.kaliuta at redhat.com>
> Signed-off-by: Denis Pynkin <denis.pynkin at collabora.com>
> ---
>  include/net.h | 14 +++++++-------
>  net/bootp.h   |  2 +-
>  net/dns.h     |  2 +-
>  net/nfs.h     |  2 +-
>  net/sntp.h    |  2 +-
>  5 files changed, 11 insertions(+), 11 deletions(-)

So, what I've been wondering, and others have poked me about (who can
chime in if they like), how is the kernel not also tripping over this?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170721/4da72d93/attachment.sig>


More information about the U-Boot mailing list