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: <CA+FuTSf4mrJG48od153gec9-xtpAPwx_-OTkD=cMRCJMXnupjg@mail.gmail.com>
Date:   Thu, 4 Feb 2021 08:34:46 -0500
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     Vadim Fedorenko <vfedorenko@...ek.ru>
Cc:     Jakub Kicinski <kuba@...nel.org>, Jian Yang <jianyang@...gle.com>,
        Network Development <netdev@...r.kernel.org>
Subject: Re: [net] selftests: txtimestamp: fix compilation issue

On Wed, Feb 3, 2021 at 4:11 PM Vadim Fedorenko <vfedorenko@...ek.ru> wrote:
>
> PACKET_TX_TIMESTAMP is defined in if_packet.h but it is not included in
> test. But we cannot include it because we have definitions of struct and
> including leads to redefinition error. So define PACKET_TX_TIMESTAMP too.

The conflicts are with <netpacket/packet.h>. I think it will build if
you remove that.

> Fixes: 5ef5c90e3cb3 (selftests: move timestamping selftests to net folder)

This commit only moved the file. The file was moved twice. Even though
it cannot really be applied easily before the move, this goes back to
commit 8fe2f761cae9 ("net-timestamp: expand documentation").

> Signed-off-by: Vadim Fedorenko <vfedorenko@...ek.ru>

Do you also get the compiler warning about ambiguous control flow?

  tools/testing/selftests/net/txtimestamp.c:498:6: warning: suggest
explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]

When touching this file, might be good to also fix that up:

-               if (cfg_use_pf_packet || cfg_ipproto == IPPROTO_RAW)
+               if (cfg_use_pf_packet || cfg_ipproto == IPPROTO_RAW) {
                        if (family == PF_INET)
                                total_len += sizeof(struct iphdr);
                        else
                                total_len += sizeof(struct ipv6hdr);
+               }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ