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

NIC我是一张网卡 noreply at github.com
Fri Nov 27 18:35:32 UTC 2020


  Branch: refs/heads/branch-2.12
  Home:   https://github.com/openvswitch/ovs
  Commit: c693facf07ae803fedd9e5c245ade099a604876e
      https://github.com/openvswitch/ovs/commit/c693facf07ae803fedd9e5c245ade099a604876e
  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: 818cd7ae13f23fa5ceadf628ba5a6b712936af9f
      https://github.com/openvswitch/ovs/commit/818cd7ae13f23fa5ceadf628ba5a6b712936af9f
  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: 94cfdef8d4a5c6d1e27e0a9ceedc965f64964f42
      https://github.com/openvswitch/ovs/commit/94cfdef8d4a5c6d1e27e0a9ceedc965f64964f42
  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: 423db5b251563e22c1f674b2f100b2adb82174d4
      https://github.com/openvswitch/ovs/commit/423db5b251563e22c1f674b2f100b2adb82174d4
  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: 8360599c7b8be7c2c2db5e2724783d9155d4780c
      https://github.com/openvswitch/ovs/commit/8360599c7b8be7c2c2db5e2724783d9155d4780c
  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>


Compare: https://github.com/openvswitch/ovs/compare/1269f340e887...8360599c7b8b


More information about the git mailing list