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

Mark Gray noreply at github.com
Fri Nov 27 18:34:54 UTC 2020


  Branch: refs/heads/branch-2.14
  Home:   https://github.com/openvswitch/ovs
  Commit: 526b1e8449dd9449d01d60a427c87e2a43146079
      https://github.com/openvswitch/ovs/commit/526b1e8449dd9449d01d60a427c87e2a43146079
  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: 54d1f4c745846888660e760678ababd4413be1b4
      https://github.com/openvswitch/ovs/commit/54d1f4c745846888660e760678ababd4413be1b4
  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: 37bf528b172ad5b4b7707abc5ea4a5b3d384076a
      https://github.com/openvswitch/ovs/commit/37bf528b172ad5b4b7707abc5ea4a5b3d384076a
  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: b2ed2c4738c8fa31dd23beb7fa71af5711e18715
      https://github.com/openvswitch/ovs/commit/b2ed2c4738c8fa31dd23beb7fa71af5711e18715
  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: acf2a3becd9f8d3030a311883ec56eaf22efe7c1
      https://github.com/openvswitch/ovs/commit/acf2a3becd9f8d3030a311883ec56eaf22efe7c1
  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: 0c17c9b611053554832da8c6fa11b64fd9a35fe8
      https://github.com/openvswitch/ovs/commit/0c17c9b611053554832da8c6fa11b64fd9a35fe8
  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/37de9acca0b8...0c17c9b61105


More information about the git mailing list