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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADxym3aUZ5ng0K+kT3CBsKVG8-jSWe3fjVrSWQJLSXrm8oMHrQ@mail.gmail.com>
Date: Sun, 18 Aug 2024 11:35:48 +0800
From: Menglong Dong <menglong8.dong@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: pshelar@....org, davem@...emloft.net, edumazet@...gle.com, 
	pabeni@...hat.com, amorenoz@...hat.com, netdev@...r.kernel.org, 
	dev@...nvswitch.org, linux-kernel@...r.kernel.org, 
	Menglong Dong <dongml2@...natelecom.cn>
Subject: Re: [PATCH net-next] net: ovs: fix ovs_drop_reasons error

On Sat, Aug 17, 2024 at 9:01 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu, 15 Aug 2024 20:22:45 +0800 Menglong Dong wrote:
> > I'm sure if I understand it correctly, but it seems that there is
> > something wrong with ovs_drop_reasons.
> >
> > ovs_drop_reasons[0] is "OVS_DROP_LAST_ACTION", but
> > OVS_DROP_LAST_ACTION == __OVS_DROP_REASON + 1, which means that
> > ovs_drop_reasons[1] should be "OVS_DROP_LAST_ACTION".
> >
> > Fix this by initializing ovs_drop_reasons with index.
> >
> > Fixes: 9d802da40b7c ("net: openvswitch: add last-action drop reason")
> > Signed-off-by: Menglong Dong <dongml2@...natelecom.cn>
>
> Could you include output? Presumably from drop monitor?

I think I'm right. I'm not familiar with ovs, and it's hard to
create a drop case for me. So, I did some modification to
ovs_vport_receive link this:

@@ -510,6 +511,9 @@ int ovs_vport_receive(struct vport *vport, struct
sk_buff *skb,
                tun_info = NULL;
        }

+       ovs_kfree_skb_reason(skb, OVS_DROP_LAST_ACTION);
+       return -ENOMEM;
+
        /* Extract flow from 'skb' into 'key'. */
        error = ovs_flow_key_extract(tun_info, skb, &key);
        if (unlikely(error)) {

In the drop watch, I can have the output like this:

drop at: ovs_vport_receive+0x78/0xc0 [openvswitc (0xffffffffc068fa78)
origin: software
input port ifindex: 18
timestamp: Sun Aug 18 03:28:00 2024 142999108 nsec
protocol: 0x86dd
length: 70
original length: 70
drop reason: OVS_DROP_ACTION_ERROR

Obviously, the output is wrong, just like what I suspect.

> I think it should go to net rather than net-next.

Should I resend this patch to the net branch?

Thanks!
Menglong Dong

> --
> pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ