lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.20.1904120731250.18008@dhcp-10-175-173-239.vpn.oracle.com>
Date:   Fri, 12 Apr 2019 07:32:23 +0100 (BST)
From:   Alan Maguire <alan.maguire@...cle.com>
To:     Song Liu <liu.song.a23@...il.com>
cc:     Stanislav Fomichev <sdf@...gle.com>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Alan Maguire <alan.maguire@...cle.com>,
        Willem de Bruijn <willemdebruijn.kernel@...il.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: bring back (void *) cast to
 set_ipv4_csum in test_tc_tunnel

On Thu, 11 Apr 2019, Song Liu wrote:

> On Thu, Apr 11, 2019 at 4:08 PM Stanislav Fomichev <sdf@...gle.com> wrote:
> >
> > It was removed in commit 166b5a7f2ca3 ("selftests_bpf: extend
> > test_tc_tunnel for UDP encap") without any explanation.
> >
> > Otherwise I see:
> > progs/test_tc_tunnel.c:160:17: warning: taking address of packed member 'ip' of class or structure
> >       'v4hdr' may result in an unaligned pointer value [-Waddress-of-packed-member]
> >         set_ipv4_csum(&h_outer.ip);
> >                        ^~~~~~~~~~
> > 1 warning generated.
> >
> > Cc: Alan Maguire <alan.maguire@...cle.com>
> > Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>
> > Fixes: 166b5a7f2ca3 ("selftests_bpf: extend test_tc_tunnel for UDP encap")
> > Signed-off-by: Stanislav Fomichev <sdf@...gle.com>
> 
> Acked-by: Song Liu <songliubraving@...com>
>

Thanks for fixing this Stanislav!

Reviewed-by: Alan Maguire <alan.maguire@...cle.com> 

> > ---
> >  tools/testing/selftests/bpf/progs/test_tc_tunnel.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/bpf/progs/test_tc_tunnel.c b/tools/testing/selftests/bpf/progs/test_tc_tunnel.c
> > index bcb00d737e95..ab56a6a72b7a 100644
> > --- a/tools/testing/selftests/bpf/progs/test_tc_tunnel.c
> > +++ b/tools/testing/selftests/bpf/progs/test_tc_tunnel.c
> > @@ -157,7 +157,7 @@ static __always_inline int encap_ipv4(struct __sk_buff *skb, __u8 encap_proto,
> >                                        bpf_ntohs(h_outer.ip.tot_len));
> >         h_outer.ip.protocol = encap_proto;
> >
> > -       set_ipv4_csum(&h_outer.ip);
> > +       set_ipv4_csum((void *)&h_outer.ip);
> >
> >         /* store new outer network header */
> >         if (bpf_skb_store_bytes(skb, ETH_HLEN, &h_outer, olen,
> > --
> > 2.21.0.392.gf8f6787159e-goog
> >
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ