On Wed, Jun 7, 2023 at 11:59 PM Ilya Maximets <[email protected]> wrote:
>
> On 6/6/23 20:33, Frode Nordahl wrote:
> > The tc module combines the use of the `tc_transact` helper
> > function for communication with the in-kernel tc infrastructure
> > with assertions on the reply data by `ofpbuf_at_assert` on the
> > received data prior to further processing.
> >
> > With the presence of bugs on the kernel side, we need to treat
> > the kernel as an unreliable service provider and replace assertions
> > on the reply from it with checks to avoid a fatal crash of OVS.
> >
> > For the record, the symptom of the crash is this in the log:
> > EMER|../include/openvswitch/ofpbuf.h:194: assertion offset + size <= 
> > b->size failed in ofpbuf_at_assert()
> >
> > And an excerpt of the backtrace looks like this:
> > 0x0000561dac1396d1 in ofpbuf_at_assert (b=0x7fb650005d20, b=0x7fb650005d20, 
> > offset=16, size=20) at ../include/openvswitch/ofpbuf.h:194
> > tc_replace_flower (id=<optimized out>, flower=<optimized out>) at 
> > ../lib/tc.c:3223
> > 0x0000561dac128155 in netdev_tc_flow_put (netdev=0x561dacf91840, 
> > match=<optimized out>, actions=<optimized out>, actions_len=<optimized out>,
> > ufid=<optimized out>, info=<optimized out>, stats=<optimized out>) at 
> > ../lib/netdev-offload-tc.c:2096
> > 0x0000561dac117541 in netdev_flow_put (stats=<optimized out>, 
> > info=0x7fb65b7ba780, ufid=<optimized out>, act_len=<optimized out>, 
> > actions=<optimized out>,
> > match=0x7fb65b7ba980, netdev=0x561dacf91840) at ../lib/netdev-offload.c:257
> > parse_flow_put (put=0x7fb65b7bcc50, dpif=0x561dad0ad550) at 
> > ../lib/dpif-netlink.c:2297
> > try_send_to_netdev (op=0x7fb65b7bcc48, dpif=0x561dad0ad550) at 
> > ../lib/dpif-netlink.c:2384
> >
> > Reported-At: https://launchpad.net/bugs/2018500
> > Fixes: 5c039ddc64ff ("netdev-linux: Add functions to manipulate tc police 
> > action")
> > Fixes: e7f6ba220e10 ("lib/tc: add ingress ratelimiting support for 
> > tc-offload")
> > Fixes: f98e418fbdb6 ("tc: Add tc flower functions")
> > Fixes: c1c9c9c4b636 ("Implement QoS framework.")
> > Signed-off-by: Frode Nordahl <[email protected]>
> > ---
> >  lib/netdev-linux.c | 33 +++++++++++++++++++++---------
> >  lib/tc.c           | 50 ++++++++++++++++++++++++++++++++--------------
> >  2 files changed, 59 insertions(+), 24 deletions(-)
>
> Thanks!  Applied and backported down to 2.17.

As always, thanks alot for thorough review and backports, much appreciated!

-- 
Frode Nordahl

> Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to