[ovs-git] [openvswitch/ovs] 091bc4: compat: Add ct_state flags definitions.

Ilya Maximets noreply at github.com
Tue Apr 20 10:05:11 UTC 2021


  Branch: refs/heads/branch-2.15
  Home:   https://github.com/openvswitch/ovs
  Commit: 091bc48d9c7d4315236bb55f4c3a0a01af3bde58
      https://github.com/openvswitch/ovs/commit/091bc48d9c7d4315236bb55f4c3a0a01af3bde58
  Author: Paul Blakey <paulb at nvidia.com>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M acinclude.m4
    M include/linux/pkt_cls.h

  Log Message:
  -----------
  compat: Add ct_state flags definitions.

Add TCA_FLOWER_KEY_CT_FLAGS_REPLY, and TCA_FLOWER_KEY_CT_FLAGS_INVALID.

Signed-off-by: Paul Blakey <paulb at nvidia.com>
Acked-by: Roi Dayan <roid at nvidia.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>
(cherry picked from commit 0a8bd432ae0cf750b5560312343ddaa05af8c876)
Signed-off-by: Aaron Conole <aconole at redhat.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 2721606bd475f7474cf66e626b9a60e858e6cf45
      https://github.com/openvswitch/ovs/commit/2721606bd475f7474cf66e626b9a60e858e6cf45
  Author: Paul Blakey <paulb at nvidia.com>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M lib/netdev-offload-tc.c

  Log Message:
  -----------
  netdev-offload-tc: Probe for support for any of the ct_state flags.

Upstream kernel now rejects unsupported ct_state flags.
Earlier kernels, ignored it but still echoed back the requested ct_state,
if ct_state was supported. ct_state initial support had trk, new, est,
and rel flags.

If kernel echos back ct_state, assume support for trk, new, est, and
rel. If kernel rejects a specific unsupported flag, continue and
use reject mechanisim to probe for flags rep and inv.

Disallow inserting rules with unnsupported ct_state flags.

Signed-off-by: Paul Blakey <paulb at nvidia.com>
Acked-by: Roi Dayan <roid at nvidia.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>
(cherry picked from commit 1e4aa061ac8b71196c0b0c8ab23d1627cd2e4a27)
Signed-off-by: Aaron Conole <aconole at redhat.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: f473ee56890eb2348da406f134c2e40680af6f00
      https://github.com/openvswitch/ovs/commit/f473ee56890eb2348da406f134c2e40680af6f00
  Author: Yunjian Wang <wangyunjian at huawei.com>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M lib/dpif-netlink.c

  Log Message:
  -----------
  dpif-netlink: Fix using uninitialized info.tc_modify_flow_deleted in out label.

Before info.tc_modify_flow_deleted is assigned a value, error
processing of other statements goes to the out label. In the
out label, the uninitialized variant is used for condition
determination, which may cause uncertain behavior.

Fixes: 65b84d4a32bd ("dpif-netlink: avoid netlink modify flow put op failed after tc modify flow put op failed.")
Signed-off-by: Mengfan Lv <lvmengfan at huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Reviewed-by: Simon Horman <simon.horman at netronome.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: b1fded0208b7a0db2b7242fcb8417377c5522a09
      https://github.com/openvswitch/ovs/commit/b1fded0208b7a0db2b7242fcb8417377c5522a09
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Fix use of uninitialized erspan metadata.

'struct erspan_metadata' contains union with fields of different
sizes, hence not all the memory initiliazed.  This memory goes
to syscalls and also used to compare ukeys with memcmp which may
cause unexpected behavior.

 Thread 15 revalidator13:
 Conditional jump or move depends on uninitialised value(s)
    at 0x4C377B6: bcmp (vg_replace_strmem.c:1111)
    by 0x43F844: ofpbuf_equal (ofpbuf.h:273)
    by 0x43F844: revalidate_ukey__ (ofproto-dpif-upcall.c:2227)
    by 0x43F9C9: revalidate_ukey (ofproto-dpif-upcall.c:2294)
    by 0x4425C2: revalidate.isra.33 (ofproto-dpif-upcall.c:2734)
    by 0x4434B8: udpif_revalidator (ofproto-dpif-upcall.c:943)
    by 0x4FDE2C: ovsthread_wrapper (ovs-thread.c:383)
    by 0x5E19159: start_thread (in /usr/lib64/libpthread-2.28.so)
    by 0x69ECF72: clone (in /usr/lib64/libc-2.28.so)
  Uninitialised value was created by a stack allocation
    at 0x4B1CE0: tun_key_to_attr (odp-util.c:3129)

Fixes: 98514eea21f4 ("erspan: add kernel datapath support")
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: ab157ef34d71184eacfa3e65021b5988d4e55a4a
      https://github.com/openvswitch/ovs/commit/ab157ef34d71184eacfa3e65021b5988d4e55a4a
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M lib/dpif.c
    M lib/dpif.h

  Log Message:
  -----------
  dpif: Fix use of uninitialized execute hash.

'dpif_execute_helper_cb' doesn't initilalize the 'hash' field that
may be passed down to datapath and might cause execution of a different
set of actions, e.g. on recirculation.

 Thread 6 handler27:
 Conditional jump or move depends on uninitialised value(s)
    at 0x53A2C2: dpif_netlink_encode_execute (dpif-netlink.c:1841)
    by 0x53A2C2: dpif_netlink_operate__ (dpif-netlink.c:1919)
    by 0x53A82D: dpif_netlink_operate_chunks (dpif-netlink.c:2238)
    by 0x53A82D: dpif_netlink_operate (dpif-netlink.c:2297)
    by 0x48135F: dpif_operate (dpif.c:1366)
    by 0x481923: dpif_execute.part.24 (dpif.c:1320)
    by 0x481C46: dpif_execute (dpif.c:1312)
    by 0x481C46: dpif_execute_helper_cb (dpif.c:1243)
    by 0x4AE943: odp_execute_actions (odp-execute.c:865)
    by 0x47F272: dpif_execute_with_help (dpif.c:1296)
    by 0x4812FF: dpif_operate (dpif.c:1422)
    by 0x442226: handle_upcalls (ofproto-dpif-upcall.c:1617)
    by 0x442226: recv_upcalls.isra.36 (ofproto-dpif-upcall.c:855)
    by 0x442351: udpif_upcall_handler (ofproto-dpif-upcall.c:755)
    by 0x4FDE2C: ovsthread_wrapper (ovs-thread.c:383)
    by 0x5E19159: start_thread (in /usr/lib64/libpthread-2.28.so)
    by 0x69ECF72: clone (in /usr/lib64/libc-2.28.so)
  Uninitialised value was created by a stack allocation
    at 0x481966: dpif_execute_helper_cb (dpif.c:1159)

Additionally added a missing comment to the 'struct dpif_execute'.

Fixes: 0442bfb11d6c ("ofproto-dpif-upcall: Echo HASH attribute back to datapath.")
Acked-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/1307e90e3f5f...ab157ef34d71


More information about the git mailing list