[ovs-git] [openvswitch/ovs] feec8e: tests: Add overflow test for the sha1 library.

Mark Gray noreply at github.com
Fri Nov 27 18:35:16 UTC 2020


  Branch: refs/heads/branch-2.13
  Home:   https://github.com/openvswitch/ovs
  Commit: feec8e6888b18dc788af8091877d284d58d9eae7
      https://github.com/openvswitch/ovs/commit/feec8e6888b18dc788af8091877d284d58d9eae7
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-27 (Fri, 27 Nov 2020)

  Changed paths:
    M tests/library.at
    M tests/test-sha1.c

  Log Message:
  -----------
  tests: Add overflow test for the sha1 library.

This is a unit test for the overflow detection issue fixed by commit
a1d2c5f5d9ed ("sha1: Fix algorithm for data bigger than 512 megabytes.")

Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Paolo Valerio <pvalerio at redhat.com>
Tested-by: Paolo Valerio <pvalerio at redhat.com>


  Commit: 1eb6abd6fc9c2b18d75fa10adefe70997b5978fc
      https://github.com/openvswitch/ovs/commit/1eb6abd6fc9c2b18d75fa10adefe70997b5978fc
  Author: Terry Wilson <twilson at redhat.com>
  Date:   2020-11-27 (Fri, 27 Nov 2020)

  Changed paths:
    M python/ovs/db/idl.py
    M tests/idltest.ovsschema
    M tests/ovsdb-idl.at
    M tests/test-ovsdb.py

  Log Message:
  -----------
  Handle refTable values with setkey()

For columns like QoS.queues where we have a map containing refTable
values, assigning w/ __setattr__ e.g. qos.queues={1: $queue_row}
works, but using using qos.setkey('queues', 1, $queue_row) results
in an Exception. The opdat argument can essentially just be the
JSON representation of the map column instead of trying to build
it.

Signed-off-by: Terry Wilson <twilson at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 505b916b0366a21ee011c4d66800948d2017b606
      https://github.com/openvswitch/ovs/commit/505b916b0366a21ee011c4d66800948d2017b606
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-11-27 (Fri, 27 Nov 2020)

  Changed paths:
    M lib/ovsdb-idl.c
    M tests/idltest.ovsschema
    M tests/ovsdb-idl.at
    M tests/test-ovsdb.c

  Log Message:
  -----------
  ovsdb-idl: Fix iteration over tracked rows with no actual data.

When idl removes orphan rows, those rows are inserted into the
'track_list'.  This allows iterators such as *_FOR_EACH_TRACKED () to
return orphan rows that never had any data to the IDL user.  In this
case, it is difficult for the user to understand whether it is a row
with no data (there was no "insert" / "modify" for this row) or it is
a row with zero data (columns were cleared by DB transaction).

The main problem with this condition is that rows without data will
have NULL pointers instead of references that should be there according
to the database schema.  For example, ovn-controller might crash:

 ERROR: AddressSanitizer: SEGV on unknown address 0x000000000100
       (pc 0x00000055e9b2 bp 0x7ffef6180880 sp 0x7ffef6180860 T0)
 The signal is caused by a READ memory access.
 Hint: address points to the zero page.
    #0 0x55e9b1 in handle_deleted_lport /controller/binding.c
    #1 0x55e903 in handle_deleted_vif_lport /controller/binding.c:2072:5
    #2 0x55e059 in binding_handle_port_binding_changes /controller/binding.c:2155:23
    #3 0x5a6395 in runtime_data_sb_port_binding_handler /controller/ovn-controller.c:1454:10
    #4 0x5e15b3 in engine_compute /lib/inc-proc-eng.c:306:18
    #5 0x5e0faf in engine_run_node /lib/inc-proc-eng.c:352:14
    #6 0x5e0e04 in engine_run /lib/inc-proc-eng.c:377:9
    #7 0x5a03de in main /controller/ovn-controller.c
    #8 0x7f4fd9c991a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)
    #9 0x483f0d in _start (/controller/ovn-controller+0x483f0d)

It doesn't make much sense to return non-real rows to the user, so it's
best to exclude them from iteration.

Test included.  Without the fix, provided test will print empty orphan
rows that was never received by idl as tracked changes.

Fixes: 932104f483ef ("ovsdb-idl: Add support for change tracking.")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Dumitru Ceara <dceara at redhat.com>


  Commit: d93d9181f5707f43a54857f6aa2401c0dfdc679e
      https://github.com/openvswitch/ovs/commit/d93d9181f5707f43a54857f6aa2401c0dfdc679e
  Author: Joel Fernandes (Google) <joel at joelfernandes.org>
  Date:   2020-11-27 (Fri, 27 Nov 2020)

  Changed paths:
    M datapath/linux/compat/include/linux/rculist.h

  Log Message:
  -----------
  compat: rcu: Add support for consolidated-RCU reader checking

Upstream commit:
    commit 28875945ba98d1b47a8a706812b6494d165bb0a0
    Author: Joel Fernandes (Google) <joel at joelfernandes.org>
    Date:   Tue Jul 16 18:12:22 2019 -0400

    rcu: Add support for consolidated-RCU reader checking

    This commit adds RCU-reader checks to list_for_each_entry_rcu() and
    hlist_for_each_entry_rcu().  These checks are optional, and are indicated
    by a lockdep expression passed to a new optional argument to these two
    macros.  If this optional lockdep expression is omitted, these two macros
    act as before, checking for an RCU read-side critical section.

    Signed-off-by: Joel Fernandes (Google) <joel at joelfernandes.org>
    [ paulmck: Update to eliminate return within macro and update comment. ]
    Signed-off-by: Paul E. McKenney <paulmck at linux.ibm.com>

Backport portion of upstream commit for hlist_for_each_entry_rcu() macro
so that it can be used in following bug fix.

Cc: Joel Fernandes (Google) <joel at joelfernandes.org>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 9342d27a2635f1a855f9e4b037721ca70d32b2e9
      https://github.com/openvswitch/ovs/commit/9342d27a2635f1a855f9e4b037721ca70d32b2e9
  Author: Tonghao Zhang <xiangxia.m.yue at gmail.com>
  Date:   2020-11-27 (Fri, 27 Nov 2020)

  Changed paths:
    M datapath/conntrack.c
    M datapath/datapath.c

  Log Message:
  -----------
  datapath: ovs_ct_exit to be done under ovs_lock

Upstream commit:
    commit 27de77cec985233bdf6546437b9761853265c505
    Author: Tonghao Zhang <xiangxia.m.yue at gmail.com>
    Date:   Fri Apr 17 02:57:31 2020 +0800

    net: openvswitch: ovs_ct_exit to be done under ovs_lock

    syzbot wrote:
    | =============================
    | WARNING: suspicious RCU usage
    | 5.7.0-rc1+ #45 Not tainted
    | -----------------------------
    | net/openvswitch/conntrack.c:1898 RCU-list traversed in non-reader section!!
    |
    | other info that might help us debug this:
    | rcu_scheduler_active = 2, debug_locks = 1
    | ...
    |
    | stack backtrace:
    | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014
    | Workqueue: netns cleanup_net
    | Call Trace:
    | ...
    | ovs_ct_exit
    | ovs_exit_net
    | ops_exit_list.isra.7
    | cleanup_net
    | process_one_work
    | worker_thread

    To avoid that warning, invoke the ovs_ct_exit under ovs_lock and add
    lockdep_ovsl_is_held as optional lockdep expression.

    Link: https://lore.kernel.org/lkml/000000000000e642a905a0cbee6e@google.com
    Fixes: 11efd5cb04a1 ("openvswitch: Support conntrack zone limit")
    Cc: Pravin B Shelar <pshelar at ovn.org>
    Cc: Yi-Hung Wei <yihung.wei at gmail.com>
    Reported-by: syzbot+7ef50afd3a211f879112 at syzkaller.appspotmail.com
    Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
    Acked-by: Pravin B Shelar <pshelar at ovn.org>
    Signed-off-by: David S. Miller <davem at davemloft.net>

Cc: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Fixes: cb2a5486a3a3 ("datapath: conntrack: Support conntrack zone limit")
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Acked-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 9ada310291ead5bb859c1cd8d52a00c25a01a9fa
      https://github.com/openvswitch/ovs/commit/9ada310291ead5bb859c1cd8d52a00c25a01a9fa
  Author: Mark Gray <mark.d.gray at redhat.com>
  Date:   2020-11-27 (Fri, 27 Nov 2020)

  Changed paths:
    M lib/automake.mk
    M python/automake.mk
    M python/ovs/.gitignore
    R python/ovs/dirs.py

  Log Message:
  -----------
  python: set ovs.dirs variables with build system values

ovs/dirs.py should be auto-generated using the template
ovs/dirs.py.template at build time. This will set the
ovs.dirs python variables with a value specified by the
environment or, if the environment variable is not set, from
the build system.

Signed-off-by: Mark Gray <mark.d.gray at redhat.com>
Acked-By: Timothy Redaelli <tredaelli at redhat.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: d853716dcb6f5b0720a0259e38faac505b2044e4
      https://github.com/openvswitch/ovs/commit/d853716dcb6f5b0720a0259e38faac505b2044e4
  Author: Mark Gray <mark.d.gray at redhat.com>
  Date:   2020-11-27 (Fri, 27 Nov 2020)

  Changed paths:
    M lib/automake.mk
    M ovsdb/automake.mk
    M python/automake.mk
    M python/ovs/.gitignore
    M python/setup.py

  Log Message:
  -----------
  python: Update build system to ensure dirs.py is created.

Update build system to ensure dirs.py is created when it is a
dependency for a build target. Also, update setup.py to
check for that dependency.

Fixes: 943c4a325045 ("python: set ovs.dirs variables with build system values")
Signed-off-by: Mark Gray <mark.d.gray at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/b5a39a7d7fec...d853716dcb6f


More information about the git mailing list