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] [day] [month] [year] [list]
Message-ID: <20201217171057.734c79d8@carbon>
Date:   Thu, 17 Dec 2020 17:10:57 +0100
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     Daniel Borkmann <daniel@...earbox.net>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        maze@...gle.com, lmb@...udflare.com, shaun@...era.io,
        Lorenzo Bianconi <lorenzo@...nel.org>, marek@...udflare.com,
        John Fastabend <john.fastabend@...il.com>,
        Jakub Kicinski <kuba@...nel.org>, eyal.birger@...il.com,
        colrack@...il.com, brouer@...hat.com
Subject: Re: [PATCH bpf-next V8 5/8] bpf: drop MTU check when doing TC-BPF
 redirect to ingress

On Thu, 17 Dec 2020 15:46:55 +0100
Jesper Dangaard Brouer <brouer@...hat.com> wrote:

> > > diff --git a/net/core/filter.c b/net/core/filter.c
> > > index d6125cfc49c3..4673afe59533 100644
> > > --- a/net/core/filter.c
> > > +++ b/net/core/filter.c
> > > @@ -2083,13 +2083,21 @@ static const struct bpf_func_proto bpf_csum_level_proto = {
> > >   
> > >   static inline int __bpf_rx_skb(struct net_device *dev, struct sk_buff *skb)
> > >   {
> > > -	return dev_forward_skb(dev, skb);
> > > +	int ret = ____dev_forward_skb(dev, skb, false);
> > > +
> > > +	if (likely(!ret)) {
> > > +		skb->protocol = eth_type_trans(skb, dev);
> > > +		skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN);
> > > +		ret = netif_rx(skb);    
> > 
> > Why netif_rx() and not netif_rx_internal() as in dev_forward_skb() originally?
> > One extra call otherwise.  
> 
> This is because the function below calls netif_rx(), which is just
> outside patch-diff-window.  Thus, it looked wrong/strange to call
> netif_rx_internal(), but sure I can use netif_rx_internal() instead.

Well, when building I found that we obviously cannot call
netif_rx_internal() as this is filter.c, else we get a build error:

net/core/filter.c:2091:9: error: implicit declaration of function ‘netif_rx_internal’ [-Werror=implicit-function-declaration]
 2091 |   ret = netif_rx_internal(skb);
      |         ^~~~~~~~~~~~~~~~~

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ