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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220304214000.597c7165@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Fri, 4 Mar 2022 21:40:00 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Jeffrey Ji <jeffreyjilinux@...il.com>
Cc:     Brian Vazquez <brianvv@...gle.com>,
        "David S . Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Antoine Tenart <atenart@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Alexander Lobakin <alexandr.lobakin@...el.com>,
        Kumar Kartikeya Dwivedi <memxor@...il.com>,
        Arnd Bergmann <arnd@...db.de>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, jeffreyji <jeffreyji@...gle.com>
Subject: Re: [PATCH v2 net-next] net-core: add rx_otherhost_dropped counter

On Thu, 3 Mar 2022 13:59:58 -0800 Brian Vazquez wrote:
> LGTM, thanks Jeffrey!
> 
> Reviewed-by: Brian Vazquez <brianvv@...gle.com>

Please keep Brian's review tag..

> On Wed, Mar 2, 2022 at 4:30 PM Jeffrey Ji <jeffreyjilinux@...il.com> wrote:
> >
> > From: jeffreyji <jeffreyji@...gle.com>
> >
> > Increment rx_otherhost_dropped counter when packet dropped due to
> > mismatched dest MAC addr.
> >
> > An example when this drop can occur is when manually crafting raw
> > packets that will be consumed by a user space application via a tap
> > device. For testing purposes local traffic was generated using trafgen
> > for the client and netcat to start a server
> >
> > Tested: Created 2 netns, sent 1 packet using trafgen from 1 to the other
> > with "{eth(daddr=$INCORRECT_MAC...}", verified that iproute2 showed the
> > counter was incremented. (Also had to modify iproute2 to show the stat,
> > additional patch for that coming next.)
> >
> > changelog:
> >
> > v2: add kdoc comment

move the changelog under the '---' separator

> > Signed-off-by: jeffreyji <jeffreyji@...gle.com>
> > ---
> >  include/linux/netdevice.h    | 3 +++
> >  include/uapi/linux/if_link.h | 5 +++++
> >  net/core/dev.c               | 2 ++
> >  net/ipv4/ip_input.c          | 1 +
> >  net/ipv6/ip6_input.c         | 1 +
> >  5 files changed, 12 insertions(+)

> > diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
> > index e315e53125f4..17e74385fca8 100644
> > --- a/include/uapi/linux/if_link.h
> > +++ b/include/uapi/linux/if_link.h
> > @@ -211,6 +211,9 @@ struct rtnl_link_stats {
> >   * @rx_nohandler: Number of packets received on the interface
> >   *   but dropped by the networking stack because the device is
> >   *   not designated to receive packets (e.g. backup link in a bond).
> > + *
> > + * @rx_otherhost_dropped: Number of packets dropped due to mismatch in
> > + * packet's destination MAC address.
> >   */
> >  struct rtnl_link_stats64 {
> >         __u64   rx_packets;
> > @@ -243,6 +246,8 @@ struct rtnl_link_stats64 {
> >         __u64   rx_compressed;
> >         __u64   tx_compressed;
> >         __u64   rx_nohandler;
> > +
> > +       __u64   rx_otherhost_dropped;
> >  };
> >
> >  /* The struct should be in sync with struct ifmap */

rebase on latest net-next/master and repost. 

Looks like it's conflicting with recently merged 
commit 9309f97aef6d ("net: dev: Add hardware stats support")

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ